3 ��X} � @ s� d Z ddlZddlmZmZmZmZmZmZm Z m Z ddlmZm Z mZmZmZmZmZmZ ddlmZ ddgZG dd� de�ZG d d� de�ZdS ) z� pygments.lexers.perl ~~~~~~~~~~~~~~~~~~~~ Lexers for Perl and related languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)� RegexLexer�ExtendedRegexLexer�include�bygroups�using�this�default�words)�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation)�shebang_matches� PerlLexer� Perl6Lexerc � @ s� e Zd ZdZdZddgZdddgZdd gZej ej B Zd ej dfdej dfd ej dfdej dfdej dfdej dfdej dfdej dfdej dfdej dfg dejfdejfdejfe�dLd1d2�efd3eeeeeee�d4fd5ejfd6ej fd7ej fd8ej fd9ej fd:ej fd;ej d<fd=ej d<fd>ej d<fd?ej d<fd@ej fdAej d<fdBej fdCefe�dMd1d2�ejf�dejjf�deeeejeeje�f�dej�df�dejjf�dejjf�dej�df�d e j!f�d e j"f�de j#f�de j$f�d e j$f�de j%f�def�def�dej&f�dej f�dej'�df�dej'�df�dej'�df�dej'�df�dej'f�deeeej(�f�deeeej(�f�deee��dfe�dNd1d2�ef�d$ef�d%ef�d&ef�d'e�d(fg1�d)ej)df�d*ej)fgdCef�d+edf�d,edf�d-ej(f�d.ejdfg�d/ej(df�d0ej(df�d.edf�d1ej*df�d2edfg�d3ej+fdCef�d4eee�f�d5edf�d6edfg�d7ej'f�d8ej'f�d+ej'�df�d9ej'df�d:ej'fg�d;ej'f�d8ej'f�d<ej'�df�d=ej'df�d>ej'fg�d?ej'f�d8ej'f�d@ej'�df�dAej'df�dBej'fg�dCej'f�d8ej'f�dDej'�df�dEej'df�dFej'fg�dGejdfg�dH�Z,�dI�dJ� Z-�dKS (O r z8 For `Perl <http://www.perl.org>`_ source code. ZPerl�perlZplz*.plz*.pmz*.tztext/x-perlzapplication/x-perlz"/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*z#popz"!(\\\\|\\[^\\]|[^\\!])*![egimosx]*z\\(\\\\|[^\\])*\\[egimosx]*z$\{(\\\\|\\[^\\]|[^\\}])*\}[egimosx]*z"<(\\\\|\\[^\\]|[^\\>])*>[egimosx]*z%\[(\\\\|\\[^\\]|[^\\\]])*\][egimosx]*z$\((\\\\|\\[^\\]|[^\\)])*\)[egimosx]*z"@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*z"%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*z$\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*z \A\#!.+?$z\#.*?$z^=[a-zA-Z0-9]+\s+.*?\n=cut�case�continue�do�else�elsif�for�foreach�if�last�my�next�our�redo�reset�then�unless�until�while�print�new�BEGIN�CHECK�INIT�END�returnz\b)�suffixz!(format)(\s+)(\w+)(\s*)(=)(\s*\n)�formatz$(eq|lt|gt|le|ge|ne|not|and|or|cmp)\bz:s/(\\\\|\\[^\\]|[^\\/])*/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*z.s!(\\\\|\\!|[^!])*!(\\\\|\\!|[^!])*![egimosx]*z+s\\(\\\\|[^\\])*\\(\\\\|[^\\])*\\[egimosx]*z:s@(\\\\|\\[^\\]|[^\\@])*@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*z:s%(\\\\|\\[^\\]|[^\\%])*%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*zs\{(\\\\|\\[^\\]|[^\\}])*\}\s*zbalanced-regexzs<(\\\\|\\[^\\]|[^\\>])*>\s*zs\[(\\\\|\\[^\\]|[^\\\]])*\]\s*zs\((\\\\|\\[^\\]|[^\\)])*\)\s*z&m?/(\\\\|\\[^\\]|[^\\/\n])*/[gcimosx]*zm(?=[/!\\{<\[(@%$])z6((?<==~)|(?<=\())\s*/(\\\\|\\[^\\]|[^\\/])*/[gcimosx]*z\s+�abs�accept�alarm�atan2�bind�binmode�bless�caller�chdir�chmod�chomp�chop�chown�chr�chroot�close�closedir�connect�cos�crypt�dbmclose�dbmopen�defined�delete�die�dump�each�endgrent� endhostent� endnetent�endprotoent�endpwent� endservent�eof�eval�exec�exists�exit�exp�fcntl�fileno�flock�fork�formline�getc�getgrent�getgrgid�getgrnam� gethostbyaddr� gethostbyname� gethostent�getlogin�getnetbyaddr�getnetbyname� getnetent�getpeername�getpgrp�getppid�getpriority�getprotobyname�getprotobynumber�getprotoent�getpwent�getpwnam�getpwuid� getservbyname� getservbyport� getservent�getsockname� getsockopt�glob�gmtime�goto�grep�hex�import�index�int�ioctl�join�keys�kill�lc�lcfirst�length�link�listen�local� localtime�log�lstat�map�mkdir�msgctl�msgget�msgrcv�msgsnd�oct�open�opendir�ord�pack�pipe�pop�pos�printf� prototype�push� quotemeta�rand�read�readdir�readline�readlink�readpipe�recv�ref�rename�reverse� rewinddir�rindex�rmdir�scalar�seek�seekdir�select�semctl�semget�semop�send�setgrent� sethostent� setnetent�setpgrp�setpriority�setprotoent�setpwent� setservent� setsockopt�shift�shmctl�shmget�shmread�shmwrite�shutdown�sin�sleep�socket� socketpair�sort�splice�split�sprintf�sqrt�srand�stat�study�substr�symlink�syscall�sysopen�sysread�sysseek�system�syswrite�tell�telldir�tie�tied�time�times�tr�truncate�uc�ucfirst�umask�undef�unlink�unpack�unshift�untie�utime�values�vec�wait�waitpid� wantarray�warn�writez+((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\bz/(<<)([\'"]?)([a-zA-Z_]\w*)(\2;?\n.*?\n)(\3)(\n)Z__END__zend-partz\$\^[ADEFHILMOPSTWX]z(\$[\\\"\[\]'&`+*.,;=%~?@$!<>(^|/-](?!\w)z[$@%#]+�varnamez0_?[0-7]+(_[0-7]+)*z0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*z0b[01]+(_[01]+)*z?(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?z(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*z \d+(_\d+)*z'(\\\\|\\[^\\]|[^'\\])*'z"(\\\\|\\[^\\]|[^"\\])*"z`(\\\\|\\[^\\]|[^`\\])*`z<([^\s>]+)>z(q|qq|qw|qr|qx)\{z cb-stringz(q|qq|qw|qr|qx)\(z rb-stringz(q|qq|qw|qr|qx)\[z sb-stringz(q|qq|qw|qr|qx)\<z lt-stringz (q|qq|qw|qr|qx)([\W_])(.|\n)*?\2z/(package)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)z6(use|require|no)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)z (sub)(\s+)�funcname�no�package�require�usez=(\[\]|\*\*|::|<<|>>|>=|<=>|<=|={3}|!=|=~|!~|&&?|\|\||\.{1,3})z[-+/*%=<>&^|!\\~]=?z[()\[\]:;,<>/?{}]z(?=\w)�namez\.\nz[^\n]*\nz\{z\)|,z\w+::z[\w:]+z+[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*(::)?(?=\s*->)z[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*::z [A-Z_]+(?=\W)z(?=\W)z[a-zA-Z_]\w*[!?]?z(\([$@%]*\))(\s*)�;z.*?\{z\\[{}\\]z\\z\}z[^{}\\]+z\\[()\\]z\(z\)z[^()]+z \\[\[\]\\]z\[z\]z[^\[\]]+z\\[<>\\]z\<z\>z[^<>]+z.+)zbalanced-regex�rootr0 r� r� r� z cb-stringz rb-stringz sb-stringz lt-stringzend-partc C s"