3 ��X�( � @ s� d Z ddlZddlmZmZmZmZmZ ddlm Z m Z mZmZm Z mZmZmZmZmZ dddgZG dd� de�ZG d d� de�ZG d d� de�ZdS )z� pygments.lexers.dylan ~~~~~~~~~~~~~~~~~~~~~ Lexers for the Dylan language. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)�Lexer� RegexLexer�bygroups� do_insertions�default) �Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic�Literal� DylanLexer�DylanConsoleLexer� DylanLidLexerc � @ s$ e Zd ZdZdZdgZdddgZdgZej Z e�d �Ze�d!�Z e�d"�Ze�d#�Zd�Zd�d�� Zd�efd�ejfd�eejeee�fed��gd�efd�ejfd�ejd�f�d e�df�dejf�dejf�dejf�dej f�dej!f�dej"f�de �d eej#eej$�f�d eej#eej$�f�de ej#f�de%f�d ef�de&f�dej'df�de(fe�d e(fdVe dX ej)f�de �d ej*j+f�de ej,feefg�dejfd�ej�df�dej�df�dejfg�d ej'�df�dej'fg�d e�df�dej-f�def�def�defg�d�Z.�dS ($ r z[ For the `Dylan <http://www.opendylan.org/>`_ language. .. versionadded:: 0.7 ZDylanZdylanz*.dylanz*.dylz*.intrztext/x-dylan�subclass�abstract�block�concrete�constant�class� compiler-open�compiler-sideways�domain�dynamic� each-subclass� exception�exclude�function�generic�handler� inherited�inline�inline-only�instance� interface�import�keyword�library�macro�method�module�open�primary�required�sealed�sideways� singleton�slot�thread�variable�virtual�above� afterwards�begin�below�by�case�cleanup�create�define�else�elseif�end�export�finally�for�from�if�in�let�local� otherwise�rename�select�signal�then�to�unless�until�use�when�while�~�+�-�*�|�^�=�==�~=�~==�<�<=�>�>=�&�abort�abs�add�add!� add-method�add-new�add-new!�all-superclasses�always�any?�applicable-method?�apply�aref�aref-setter�as�as-lowercase� as-lowercase!�as-uppercase� as-uppercase!�ash�backward-iteration-protocol�break�ceiling�ceiling/�cerror� check-type�choose� choose-by� complement�compose�concatenate�concatenate-as�condition-format-arguments�condition-format-string�conjoin� copy-sequence�curry�default-handler� dimension� dimensions�direct-subclasses�direct-superclasses�disjoin�do�do-handlers�element�element-setter�empty?�error�even?�every?�false-or�fill!�find-key�find-method�first�first-setter�floor�floor/�forward-iteration-protocol�function-arguments�function-return-values�function-specializers�gcd�#generic-function-mandatory-keywords�generic-function-methods�head�head-setter�identity� initialize� instance?� integral?�intersection�key-sequence�key-test�last�last-setter�lcm�limited�list�logand�logbit?�logior�lognot�logxor�make�map�map-as�map-into�max�member?�merge-hash-codes�min�modulo�negative� negative?�next-method�object-class�object-hash�odd?�one-of�pair�pop�pop-last� positive?�push� push-last�range�rank�rcurry�reduce�reduce1� remainder�remove�remove!�remove-duplicates�remove-duplicates!�remove-key!� remove-method�replace-elements!�replace-subsequence!� restart-query�return-allowed?�return-description�return-query�reverse�reverse!�round�round/�row-major-index�second� second-setter�shallow-copy�size�size-setter�slot-initialized?�sort�sort!�sorted-applicable-methods�subsequence-position�subtype?�table-protocol�tail�tail-setter�third�third-setter�truncate� truncate/�type-error-expected-type�type-error-value� type-for-copy� type-union�union�values�vector�zero?z\\?[\w!&*<>|^$%@\-+~?/=]+c c s� x�t j| |�D ]�\}}}|tkr�|j� }|| jkrB|tj|fV q|| jkrZ|t|fV q|| jkrt|tj|fV q|| j kr�|t |fV q|||fV qW d S )N)r �get_tokens_unprocessedr �lower�builtins�Builtin�keywordsr � functions� operatorsr )�self�text�index�token�valueZlowercase_value� r �/usr/lib/python3.6/dylan.pyr ] s z!DylanLexer.get_tokens_unprocessedz\s+z//.*?\nz)([a-z0-9-]+)(:)([ \t]*)(.*(?:\n[ \t].+)*)�codez/\*�comment�"�stringz/'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'z#b[01]+z#o[0-7]+z0[-+]?(\d*\.\d+(e[-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)z[-+]?\d+z#x[0-9a-f]+z(\?z6)(:)(token|name|variable|expression|body|case-body|\*)z9(\?)(:)(token|name|variable|expression|body|case-body|\*)z\?z,(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])z:=z#[tf]z#"z#[a-z0-9-]+�:z\*z\$z[^*/]z#pushz\*/z#popz[*/]z[^\\"]+z,\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})z [^\\"\n]+z\\\nz\\)�rootr r r* r N)%r r r r r r r r r r r r r r! r"