3
V'íc®% ã @ sj d Z ddlmZmZmZmZmZmZ ddlm Z m
Z
mZmZm
Z
mZmZmZmZ dgZG dd deZdS )zÌ
pygments.lexers.felix
~~~~~~~~~~~~~~~~~~~~~
Lexer for the Felix language.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚincludeÚbygroupsÚdefaultÚwordsÚcombined) ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚ
WhitespaceÚ
FelixLexerc H @ s e Zd ZdZdZdZddgZddgZdgZdZ dZ
dZdZdZ
dZdZdZdZd³Zed´edd¼d½ed¾fedd¼d½edÂfdÃedÄfee
d¼d½efeed¼d½ejfeed¼d½ejfee
d¼d½ejfeed¼d½ejfedÅdÆejfdÇejfdÈejfdÉe ejfdÊe ejfdËe ejfdÌe ej fdÍe!dÎfdÏe!dÐfdÑe!dÒfdÓe!dÔfdÕe!e"dÖdÎfd×e!e"dÖdÐfdØe!e"dÖdÒfdÙe!e"dÖdÔfdÚe#fdÛej$fdÜdÝj%e ej&fdÜdÝj%e ej&j'fdÞefgdße(fedVdàe)e*j+e(e*j+e(e*j+dáfdâe*j+d\fgdÜdÝj%e e,j-fdãe,fgdäe*j.fdåe*j/dæfgdçe*j/fdåe*j/dèfdée*j/dêfdëe*j/fgdìe)e(e*e(dèfdíe)e(e*e(dêfdîe)e*e(fgedVdïe)e*j+e(e!dêfdðe)e*j+e(e!dêfdñe)e*j+e(e!dêfdòe*j+fdóe*j+fdôe*j+fdõe(dêfged´dÞej0dêfdöe1dêfged´dÞej2dêfd÷e1dêfged´døe#dfe3dùged´dûej4düfged´edÅdøe#dèfdýe#dêfdþe#fdÿefdÞefgd e!j5fgde!j6fde!fde!fde!fgdõe!fgde!dêfde!j5fedgde!dêfd e!j5fedgd
e!dêfededgde!dêfededgd
Z7dS ( r z;
For Felix source code.
.. versionadded:: 1.2
ZFelixzhttp://www.felix-lang.orgZfelixZflxz*.flxz*.flxhztext/x-felixÚelifÚelseÚendifÚifÚifdefÚifndefÚ_Ú_derefÚallÚasÚassertÚattemptÚcallÚcallbackÚcaseÚcasenoÚcclassÚcodeÚcompoundÚctypesÚdoÚdoneÚdowntoÚ
endattemptÚendcaseÚendmatchÚenumÚexceptÚ
exceptionsÚexpectÚfinallyÚforÚforallÚforgetÚforkÚfunctorÚgotoÚidentÚ
incompleteÚinheritÚinstanceÚ interfaceÚjumpÚlambdaÚloopÚmatchÚmoduleÚ namespaceÚnewÚnoexpandÚnontermÚobjÚofÚopenÚparseÚraiseÚregexpÚreglexÚregmatchÚrenameÚreturnÚtheÚthenÚtoÚtypeÚtypecaseÚtypedefÚ typematchÚtypeofÚuptoÚwhenÚwhilstÚwithÚyieldÚ_gc_pointerÚ_gc_typeÚbodyÚcommentÚconstÚexportÚheaderÚinlineÚlvalÚmacroÚnoinlineÚnoreturnÚpackageÚprivateÚpodÚpropertyÚpublicÚpublishÚrequiresÚtodoÚvirtualÚuseÚdefÚletÚrefÚvalÚvarÚunitÚvoidÚanyÚboolÚbyteÚoffsetÚaddressÚcaddressÚ cvaddressÚvaddressÚtinyÚshortÚintÚlongÚvlongÚutinyÚushortÚvshortÚuintÚulongÚuvlongÚint8Úint16Úint32Úint64Úuint8Úuint16Úuint32Úuint64ÚfloatÚdoubleÚldoubleÚcomplexÚdcomplexÚlcomplexÚ imaginaryÚ
dimaginaryÚ
limaginaryÚcharÚwcharÚucharÚcharpÚcharcpÚucharpÚucharcpÚstringÚwstringÚustringÚcontÚarrayÚvarrayÚlistÚlvalueÚoptÚsliceÚfalseÚtrueÚandÚnotÚinÚisÚisinÚorÚxorÚ_svcÚwhileÚrootÚselfÚthisz*([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?Ú
whitespaceÚaxiomÚctorÚfunÚgenÚprocÚreduceÚunionz\b)ÚsuffixÚfuncnameÚclassÚcstructÚstructÚ classnamez(instance|module|typeclass)\bÚ
modulenameÚ operatorszK0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)[pP][+\-]?[0-9_]+[lLfFdD]?zH[0-9_]+(\.[0-9_]+[eE][+\-]?[0-9_]+|\.[0-9_]*|[eE][+\-]?[0-9_]+)[lLfFdD]?z/\.(0|[1-9][0-9_]*)([eE][+\-]?[0-9_]+)?[lLfFdD]?z
0[Bb][01_]+%sz
0[0-7_]+%sz0[xX][0-9a-fA-F_]+%sz(0|[1-9][0-9_]*)%sz([rR][cC]?|[cC][rR])"""Útdqsz([rR][cC]?|[cC][rR])'''Útsqsz([rR][cC]?|[cC][rR])"Údqsz([rR][cC]?|[cC][rR])'Úsqsz[cCfFqQwWuU]?"""Ústringescapez[cCfFqQwWuU]?'''z[cCfFqQwWuU]?"z[cCfFqQwWuU]?'z[\[\]{}:(),;?]z[a-zA-Z_]\w*:>z(%s)\bú|z[a-zA-Z_]\w*z\s+z(#)(\s*)(if)(\s+)(0)Úif0ú#z$!=|==|<<|>>|\|\||&&|[-~+/*%=<>&^|.$]z//(.*?)$z/[*]Úcomment2z[^/*]z#pushz[*]/z#popz[/*]z^(\s*)(#if.*?(?<!\\))(\n)z^(\s*)(#endif.*?(?<!\\))(\n)z (.*?)(\n)z(import|include)(\s+)(<[^>]*?>)z(import|include)(\s+)("[^"]*?")z(import|include)(\s+)('[^']*?')z[^/\n]+ú/z (?<=\\)\nz\nz(?=\()z(?=\{)z\[Úmodulename2Útvarlistz([a-zA-Z_]\w*)z#pop:2z\]ú,z(with|where)\bzY\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})zP%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]z[^\\\'"%\n]+z[\'"\\]ú%ú"z
\\\\|\\"|\\\nÚstringsú'z
\\\\|\\'|\\\nz"""Únlz''')r¹ r¼ rË r_ rÔ rÒ re rÅ rÉ rÊ rÖ r× rÐ rÛ rÝ rÎ rÏ rÌ rÍ N)r r r r r r )Hr r r r r r r r r r! r"