3
V'ícâ ã @ sV d Z ddlmZmZmZ ddlmZmZmZm Z m
Z
mZmZ dgZ
G dd deZdS )z÷
pygments.lexers.elpi
~~~~~~~~~~~~~~~~~~~~
Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming language.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚbygroupsÚinclude)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚ ElpiLexerc @ s¾ e Zd ZdZdZdZdgZdgZdgZdZ dZ
d Zd
Zdj
eZdj
e e
eeZd
j
ee e
eZdj
e e
eeZdj
e
ee eeeeZdZdj
eeZdj
eeeZedgeddeejejejdfdeejejdfdj
eeejejej dfdj
eeejejej dfdj
eeejejej dfdj
eeejejej dfdeejejejdfdj
eeejejefd j
eeejejefd!eejejej!efd"j
eeejejej d#fd$j
eej!fd%j
eej!fd&ej!fd'j
eejfeefd(ejfd)ejdfd*ejd+fd,ejd-fd.ed/fd0ed1fd2e"j#fd3e"j$fd4e%fgd5e&fd6e&d7fd8ejfgd9e&d:fd;e&fgd<e"j#fd=ed:fgd>eej'ejdfd?ej'feej'fd@ej'fdAed:fedgdBedCfedgdDejfdEejfdFedGfedgdHejdIfdAed:fedgd>eej'ejdfd?ej'feej'fd@ej'fdJed:fdAedGfedgdKejfd*ejd:fgdLejfd,ejd:fgdMejfd)ejd:fgd.edNfdOed:fedgd0e%dNfd=e%d:fedgdPZ(dQS )Rr zN
Lexer for the Elpi programming language.
.. versionadded:: 2.11
ZElpizhttp://github.com/LPCIC/elpiÚelpiz*.elpiztext/x-elpiz[a-z]z[A-Z]z[0-9]z([+*^?/<>`'@#~=&!])z({}|-|\$|_)z
({}|{}|{}|{})z({}*(\.({}|{}){}*)*)z({}|{}|{}|{}|:)z({}{}*|{}{}|{}{}*|_{}+)zß(,|<=>|->|:-|;|\?-|->|&|=>|\bas\b|\buvar\b|<|=<|=|==|>=|>|\bi<|\bi=<|\bi>=|\bi>|\bis\b|\br<|\br=<|\br>=|\br>|\bs<|\bs=<|\bs>=|\bs>|@|::|\[\]|`->|`:|`:=|\^|-|\+|\bi-|\bi\+|r-|r\+|/|\*|\bdiv\b|\bi\*|\bmod\b|\br\*|~|\bi~|\br~)z\(({}|{})\)z
({}|{}|{})z
_elpi-commentz#(:before|:after|:if|:name)(\s*)(\")zelpi-stringz(:index)(\s*\()zelpi-indexing-exprz\b(external pred|pred)(\s+)({})zelpi-pred-itemz)\b(external type|type)(\s+)(({}(,\s*)?)+)z elpi-typez\b(kind)(\s+)(({}|,)+)z\b(typeabbrev)(\s+)({})z\b(accumulate)(\s+)(\")z'\b(accumulate|namespace|local)(\s+)({})z\b(shorten)(\s+)({}\.)z-\b(pi|sigma)(\s+)([a-zA-Z][A-Za-z0-9_ ]*)(\\)z \b(constraint)(\s+)(({}(\s+)?)+)zelpi-chr-rule-startz(?=[A-Z_]){}z(?=[a-z_]){}\\Ú_z({}|!|=>|;)z\[|\]|\||=>ú"ú`z
elpi-btickz\'z elpi-tickz\{[^\{]z
elpi-spillz\(zelpi-in-parensz\d[\d_]*z(-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)z
[\+\*\-/\^\.]z %[^\n]*\nz/\*zelpi-multiline-commentz\s+z\*/z#popÚ.z[0-9 _]+z\)z(ctype\s+)(\")z->z\(|\)z\.z\{z
elpi-chr-rulez\brule\bz\\z\}z#pop:2z[io]:z
elpi-ctypeú,z[^` ]+z[^\' ]+z[^\"]+z#pushz\}[^\}])Úrootr