3 ��X� � @ s0 d Z ddlZddlmZmZmZmZmZmZ ddl m Z mZmZm Z mZmZmZmZmZmZmZ ddlmZmZmZ dddd d ddd ddg ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG dd � d e�ZG dd� de�ZG dd� de�Z G dd � d e�Z!G dd� de�Z"G dd� de�Z#dS )z� pygments.lexers.scripting ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for scripting and embedded languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)� RegexLexer�include�bygroups�default�combined�words)�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Error� Whitespace�Other)�get_bool_opt�get_list_opt� iteritems�LuaLexer�MoonScriptLexer�ChaiscriptLexer�LSLLexer�AppleScriptLexer� RexxLexer�MOOCodeLexer�HybrisLexer�EasytrieveLexer�JclLexerc @ s� e Zd ZdZdZdgZddgZddgZdZd Z d Z dee e f ZdZd e jfed�gee jfe e jfe efged�dejfdejfdejfdejfdefdedfdefdefdefdejfdejfdejdfdejfdejfd ejd!fd"e fd#eje!d$d%�fd&ej"e!d$d'�fged�d(efd)eef e j#fee j$d*fd+ed*fged�ee j%d*fged�ded*fee j%fgd,ej&fgd#ejd*fd-ejfgd&ej"d*fd.ej"fgd/� Z'd0d1� Z(d2d3� Z)d4S )5r a� For `Lua <http://www.lua.org>`_ source code. Additional options accepted: `func_name_highlighting` If given and ``True``, highlight builtin function names (default: ``True``). `disabled_modules` If given, must be a list of module names whose function names should not be highlighted. By default all modules are highlighted. To get a list of allowed modules have a look into the `_lua_builtins` module: .. sourcecode:: pycon >>> from pygments.lexers._lua_builtins import MODULES >>> MODULES.keys() ['string', 'coroutine', 'modules', 'io', 'basic', ...] ZLuaZluaz*.luaz*.wluaz text/x-luazapplication/x-luaz-(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])z (?:--.*$)z(?:\s+)z(?:%s|%s|%s)z(?:[^\W\d]\w*)z#!.*�base�wsz'(?i)0x[\da-f]*(\.[\da-f]*)?(p[+-]?\d+)?z#(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?z(?i)\d+e[+-]?\d+z\d+z(?s)\[(=*)\[.*?\]\1\]z::�labelz\.{3}z[=<>|~&+\-*/%#^]+|\.\.z[\[\]{}().,:;]z(and|or|not)\bzE(break|do|else|elseif|end|for|if|in|repeat|return|then|until|while)\bzgoto\b�gotoz (local)\bz(true|false|nil)\bz(function)\b�funcnamez[A-Za-z_]\w*(\.[A-Za-z_]\w*)?�'�stringescape�sqs�"�dqsz[.:]z %s(?=%s*[.:])z#popz\(zM\\([abfnrtv\\"\']|[\r\n]{1,2}|z\s*|x[0-9a-fA-F]{2}|\d{1,3}|u\{[0-9a-fA-F]+\})z[^\\']+z[^\\"]+) �rootr! r r$ r# r"