3 ��X� � @ sf d Z ddlmZmZmZmZmZmZ ddlm Z m Z mZmZm Z mZmZmZ dgZG dd� de�ZdS )z� pygments.lexers.qvt ~~~~~~~~~~~~~~~~~~~ Lexer for QVT Operational language. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� RegexLexer�bygroups�include�combined�default�words)�Text�Comment�Operator�Keyword�Punctuation�Name�String�Number� QVToLexerc ^ @ s� e Zd ZdZdZddgZdgZdefdefdee e e j e �fd e jfd efdej fdej fd efdefdefdejfdejjfdejfdejdfdeej eej�fdeej eej�fdejfdeeje�dfdeee�dfdejfed�deedd �fd!eedd"�fed#�ed$�gd%efd&ejfed'�gd(efd)eeejee�d'fgd*ed'fed'�ged�d�d��efgd�efd�efgd�ejfgded'fd�ejfed��gd!ed'fd�ejfed��gd�efgd�e j!fd�e j!fd�e j"fgd��Z#d�S )�r u� For the `QVT Operational Mapping language <http://www.omg.org/spec/QVT/1.1/>`_. Reference for implementing this: «Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification», Version 1.1 - January 2011 (http://www.omg.org/spec/QVT/1.1/), see §8.4, «Concrete Syntax» in particular. Notable tokens assignments: - Name.Class is assigned to the identifier following any of the following keywords: metamodel, class, exception, primitive, enum, transformation or library - Name.Function is assigned to the names of mappings and queries - Name.Builtin.Pseudo is assigned to the pre-defined variables 'this', 'self' and 'result'. ZQVTOZqvtoZqvtz*.qvtoz\nz[^\S\n]+z(--|//)(\s*)(directive:)?(.*)$z/[*](.|\n)*?[*]/z\\\nz(and|not|or|xor|##?)\bz(:{1,2}=|[-+]=)\bz(@|<<|>>)\bz,!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]z[]{}:(),;[]z(true|false|unlimited|null)\bz(this|self|result)\bz(var)\bz(from|import)\b� fromimportzK(metamodel|class|exception|primitive|enum|transformation|library)(\s+)(\w+)z(exception)(\s+)(\w+)z(main)\bz(mapping|helper|query)(\s+)� operationz(assert)(\s+)\b�assertz:(Bag|Collection|Dict|OrderedSet|Sequence|Set|Tuple|List)\b�keywords�"�stringescape�dqs�'�sqs�name�numbersz(?:[ \t]|\\\n)+z[a-zA-Z_][\w.]*z#popz::z (.*::)([a-zA-Z_]\w*)([ \t]*)(\()z(warning|error|fatal)\b�abstract�access�any�blackbox�break�case�collect� collectNested� collectOne� collectselect�collectselectOne�composes�compute� configuration�constructor�continue�datatyper �derived� disjuncts�do�elif�else�end�endif�except�exists�extends�forAll�forEach�forOne�from�if�implies�in�inherits�init�inout�intermediate� invresolve�invresolveIn� invresolveone�invresolveoneIn�isUnique�iterate�late�let�literal�log�map�merges� modeltype�new�object�one�ordered�out�package� population�property�raise�readonly� references�refines�reject�resolve� resolveIn� resolveone�resolveoneIn�return�select� selectOne�sortedBy�static�switch�tag�then�try�typedef� unlimited�uses�when�where�while�with�xcollect�xmap�xselectz\b)�suffixz[^\\\'"\n]+z[\'"\\]z+\\([\\btnfr"\']|u[0-3][0-7]{2}|u[0-7]{1,2})z\\\\|\\"�stringsz\\\\|\\'z[a-zA-Z_]\w*z%(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?z\d+[eE][+-]?[0-9]+z\d+)�rootr r r r rt r r r r r N)Yr r r r r r r! r"