3 ��X+ � @ sf d Z ddlmZmZmZ ddlmZmZmZm Z m Z mZmZ ddl mZmZ dgZG dd� de�ZdS )z� pygments.lexers.stata ~~~~~~~~~~~~~~~~~~~~~ Lexer for Stata :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� RegexLexer�include�words)�Comment�Keyword�Name�Number�String�Text�Operator)� builtins_base�builtins_functions� StataLexerc @ s� e Zd ZdZdZddgZddgZddd gZed �ed�ed�ed �de fgde jjdfde jfde dfde dfgde dfde jfde jjdfde jdfde fde fgde dfde jfde jjdfde jdfde fde fgde jjdfde jjdfgd e jdfgd!efd"ejfd#ejfd$ejfgeed%d&d'�e jfeed(d%d'�efgd)efd*efgd+efgd,e jfd-e jfd.e jfd/e jfgd0�Zd1S )2r zS For `Stata <http://www.stata.com/>`_ do files. .. versionadded:: 2.2 ZStataZstataZdoz*.doz*.adoztext/x-stataz text/statazapplication/x-stata�commentszvars-strings�numbers�keywords�.z\$[\w{]�var_validglobalz`\w{0,31}\'�"� string_dquotez`"� string_mquotez#popz \\\\|\\"|\\\nz\$�`�var_validlocalz [^$`"\\]+z[$"\\]z"\'z\{\w{0,32}\}z\w{1,32}z \w{0,31}\'z ^\s*\*.*$z//.*z /\*.*?\*/z/[*](.|\n)*?[*]/z\bz\()�prefix�suffixz (^\s*|\s)z-|==|<=|>=|<|>|&|!=z\*|\+|\^|/|!|~|==|~=z>\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[i]?\bz%-?\d{1,2}(\.\d{1,2})?[gfe]c?z%(21x|16H|16L|8H|8L)z&%-?(tc|tC|td|tw|tm|tq|th|ty|tg).{0,32}z%[-~]?\d{1,4}s)�rootzvars-stringsr r r r r r Z operatorsr �formatN)�__name__� __module__�__qualname__�__doc__�name�aliases� filenamesZ mimetypesr r r ZVariableZGlobalr ZEscaper �SingleZ Multiliner r ZFunctionr r r r �tokens� r&