3 ��X� � @ sN d Z ddlmZmZmZ ddlmZmZmZm Z m Z dgZG dd� de�ZdS )z� pygments.lexers.hexdump ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for hexadecimal dumps. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� RegexLexer�bygroups�include)�Text�Name�Number�String�Punctuation�HexdumpLexerc @ s� e Zd ZdZdZdgZdZdefed�de d e d e e jee j�fed e jfde eee e�dfd e eee e�dfde eee e�fde eee e�fde ee �fde ee �dfdefdefgde d e eje�dfde d ejfgdedfed ejfdefgdefed�ed e jfde eee e�fdefdefgdefed�ed e jfde eee e�fdefdefgdefed�de d e d e e jee j�fed e jfde ee �fd e ee �fdefdefgd!�Zd"S )#r a� For typical hex dump output formats by the UNIX and GNU/Linux tools ``hexdump``, ``hd``, ``hexcat``, ``od`` and ``xxd``, and the DOS tool ``DEBUG``. For example: .. sourcecode:: hexdump 00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............| 00000010 02 00 3e 00 01 00 00 00 c5 48 40 00 00 00 00 00 |..>......H@.....| The specific supported formats are the outputs of: * ``hexdump FILE`` * ``hexdump -C FILE`` -- the `canonical` format used in the example. * ``hd FILE`` -- same as ``hexdump -C FILE``. * ``hexcat FILE`` * ``od -t x1z FILE`` * ``xxd FILE`` * ``DEBUG.EXE FILE.COM`` and entering ``d`` to the prompt. .. versionadded:: 2.1 ZHexdumpZhexdumpz[0-9A-Ha-h]z\n�offset�(z {2})(\-)(z{2})z{2}z(\s{2,3})(\>)(.{16})(\<)$zbracket-stringsz(\s{2,3})(\|)(.{16})(\|)$z piped-stringsz(\s{2,3})(\>)(.{1,15})(\<)$z(\s{2,3})(\|)(.{1,15})(\|)$z(\s{2,3})(.{1,15})$z(\s{2,3})(.{16}|.{20})$znonpiped-stringsz\sz^\*z^(z+)(:)zoffset-mode�^�+z#pop�:z(\s{2,3})(\|)(.{1,16})(\|)$z(\s{2,3})(\>)(.{1,16})(\<)$z(\s{19,})(.{1,20}?)$z(\s{2,3})(.{1,20})$)�rootr zoffset-modez piped-stringszbracket-stringsznonpiped-stringsN)�__name__� __module__�__qualname__�__doc__�name�aliasesZhdr r r r ZHexr r r ZLabel�tokens� r r �/usr/lib/python3.6/hexdump.pyr sb N) r Zpygments.lexerr r r Zpygments.tokenr r r r r �__all__r r r r r �<module> s