3 ��X�b � @ sJ d Z ddlZddlmZmZmZmZmZmZ ddl m Z mZ ddlm Z ddlmZmZmZmZmZmZmZmZmZ ddd d ddd ddddgZG dd� de�Zdd� ZG dd� de�ZG dd � d e�ZG dd � d e�ZG dd� de�ZG dd� de�ZG dd � d e�Z G dd� de�Z!G dd� de�Z"G dd� de�Z#G dd� de�Z$dS )z� pygments.lexers.asm ~~~~~~~~~~~~~~~~~~~ Lexers for assembly languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)� RegexLexer�include�bygroups�using�words�DelegatingLexer)�CppLexer�CLexer)�DLexer) �Text�Name�Number�String�Comment�Punctuation�Other�Keyword�Operator�GasLexer�ObjdumpLexer� DObjdumpLexer�CppObjdumpLexer� CObjdumpLexer� HsailLexer� LlvmLexer� NasmLexer�NasmObjdumpLexer� TasmLexer� Ca65Lexerc @ sv e Zd ZdZdZddgZddgZdgZdZd Z d e d e d Z d Zed�e d e jfde e jdfde jfe e jdfdefge e jfeefde e jfeejfdedfed�ed�gde d eejeee je�fde d e d eejeee jeeje�fe e jfeejfde e jfde ejfdejfdedfed�ed�g defdefd efgd!efgd"�Zd#d$� Zd%S )&r z' For Gas (AT&T) assembly code. ZGASZgas�asmz*.sz*.Sz text/x-gasz "(\\"|[^"])*"z[\w$.@-]z (?:[a-zA-Z$_]z*|\.z+)z(?:0[xX][a-zA-Z0-9]+|\d+)� whitespace�:z\.zdirective-argszlock|rep(n?z)?|data\d+zinstruction-argsz[\r\n]+�@z#pop�punctuationz([a-z0-9]+)( )(<)(z)(>)z)([-+])(�%�$z $'(.|\\')'z\nz\s+z [;#].*?\nz[-*,.()\[\]!:]+)�rootzdirective-argszinstruction-argsr r# c C s, t jd| t j�rdS t jd| t j�r(dS d S )Nz^\.(text|data|section)Tz^\.\w+g�������?)�re�match�M)�text� r+ �/usr/lib/python3.6/asm.py�analyse_text] s zGasLexer.analyse_textN)�__name__� __module__�__qualname__�__doc__�name�aliases� filenames� mimetypes�string�char� identifierZnumberr r �LabelZ Attribute�Functionr �Constantr r �Integerr �Hexr �Variable�Charr �tokensr- r+ r+ r+ r, r sR c C sR d}ddt tjttt�fdt ttjt�fd| d t tjtttjttjt�fd| d t tjtttjt�fd| d | | d t ttjttjtt | ��fd| d | | d t ttjttjtt�fd| d | | d t ttjttj�fd tfd| d | d t ttjttj ttjttj�fd| d t ttjttj ttj�fdtfgiS )z; Common objdump lexer tokens to wrap an ASM lexer. z[0-9A-Za-z]r&