gf dZdZddlZddlZddlZddlZddlZddlZ ejej fZ n#e $re e fZ YnwxYwejdZGddeZGddeZGdd eZGd d eZGd d ZdZdZdZdZdZdZGddeZdddddeejddddf dZ ddZ!dZ"e"Z#dS)z3.10Nz^[a-zA-Z0-9_]+$ceZdZdZdS)LexErrorc$|f|_||_dSN)argstext)selfmessagess q/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pycparser/ply/lex.py__init__zLexError.__init__:sJ  N)__name__ __module__ __qualname__r rr rr9s#rrceZdZdZdZdS)LexTokenc<d|j|j|j|jfzS)NzLexToken(%s,%r,%d,%d))typevaluelinenolexposr s r __str__zLexToken.__str__As&$)TZdk)ZZZrc t|Sr)strrs r __repr__zLexToken.__repr__Ds4yyrN)rrrrrrrr rr@s5[[[rrc.eZdZdZdZdZdZeZeZdS) PlyLoggerc||_dSr)f)r r"s r r zPlyLogger.__init__Ls rcF|j||zdzdS)N r"writer msgrkwargss r criticalzPlyLogger.criticalOs%  cDjD()))))rcL|jd||zzdzdS)Nz WARNING: r$r%r's r warningzPlyLogger.warningRs*  [C$J/$677777rcL|jd||zzdzdS)NzERROR: r$r%r's r errorzPlyLogger.errorUs*  Y#*-455555rN) rrrr r*r,r.infodebugrrr r r KsV***888666 D EEErr ceZdZdZdZdS) NullLoggerc|Srr)r names r __getattribute__zNullLogger.__getattribute__^ rc|Srr)r rr)s r __call__zNullLogger.__call__ar6rN)rrrr5r8rrr r2r2]s2rr2cdeZdZdZddZddZdZdZdZd Z d Z d Z d Z d Z dZdZeZdS)LexercHd|_d|_i|_i|_i|_d|_g|_d|_i|_i|_ i|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)NINITIALrF)lexre lexretext lexstaterelexstateretextlexstaterenameslexstate lexstatestack lexstateinfolexstateignorelexstateerrorf lexstateeoff lexreflagslexdatarlexlen lexerrorflexeoff lextokens lexignore lexliterals lexmoduler lexoptimizers r r zLexer.__init__ts  !!          rNc tj|}|ri}|jD]\}}g}|D]b\}}g} |D]X} | r| ds| | "| t || dj| dfYc||| f|||<||_i|_|jD]"\}} t || j|j|<#||_|SNrr>)copyrAitemsappendgetattrrrHrR) r objectcnewtabkeyritemnewrecrefindex newfindexr"efs r clonez Lexer.clonesN IdOO  !F"o3355 $ $ U#(QQKC "I#QQ %!%%,,Q///$!(('&!A$-*H*H!A$)OPPPP Q  c9-...#s !AL!A .4466 E ER(/ (D(D %% AKrr=c t|tjrtd|dd}t j||dz}t|d5}| d|dtd| d ttz| d tt|jz| d t|jz| d t|jz| d t|jzi}|jD]b\}}g} t)||j||j|D].\\} } } } | | t1| | f/| ||<c| dt|z| dt|jzi}|jD]\}}|r|jnd||<| dt|zi}|jD]\}}|r|jnd||<| dt|zddddS#1swxYwYdS)Nz&Won't overwrite existing lextab module.z.pywz# z5.py. This file automatically created by PLY (version z). Don't edit! z_tabversion = %s z_lextokens = set(%s) z_lexreflags = %s z_lexliterals = %s z_lexstateinfo = %s z_lexstatere = %s z_lexstateignore = %s z_lexstateerrorf = %s z_lexstateeoff = %s ) isinstancetypes ModuleTypeIOErrorsplitospathjoinopenr& __version__repr__tabversion__tuplerOrJrQrFrArWziprBrCrX_funcs_to_namesrGrHrrI)r lextab outputdir basetabmodulefilenametftabre statenamelretitempatfuncretextrenamestaberrrctabeofs r writetabzLexer.writetabsQ fe. / / DBCC C S))"- 7<< =99EA (C  .B.BB C C C HH04dn8M8M3N3NN O O O HH+d4?.C.CC D D D HH+d43C.D.DD E E E HH+d43D.E.EE F F FE"&/"7"7"9"9 ) ) 347T=PQZ=[]a]qr{]|4}4}KK0KS$LL&/$*H*H!IJJJJ#(i  HH+d5kk9 : : : HH-T5H0I0II J J JF!%!4!:!:!zExpected a stringr)ri StringTypes ValueErrorrKrlenrL)r r r[s r inputz Lexer.inputsO bqbE![)) 2011 1  !ff rcL||jvrtd|j||_|j||_|j|d|_|j|d|_ |j |d|_ ||_ dS)NzUndefined stater=) rArr?rBr@rGgetrPrHrMrIrNrDr states r rz Lexer.begins  ' '.// /_U+ ,U3,00;;,00==(,,UD99  rcn|j|j||dSr)rErXrDrrs r push_statezLexer.push_states3 !!$-000 5rc^||jdSr)rrEpoprs r pop_statezLexer.pop_states) 4%))++,,,,,rc|jSr)rDrs r current_statezLexer.current_state!s }rc&|xj|z c_dSr)r)r ns r skipz Lexer.skip's q rcN|j}|j}|j}|j}||kr|||vr|dz }|jD]H\}}|||}|st }||_|j |_ ||_|j } || \} |_ | s;|j r| |_|cS| }n| }||_ ||_||_| |} | s|j}|j}nt|jsK| j |jvr=t#d| jj| jj| j| j fz||d| cS|||jvrFt }|||_|j |_ |j|_ ||_|dz|_|S|jrt }|j|d|_|j |_ d|_ ||_ ||_||_||} ||jkr!t#d||z||d|j}| sZ| S||_t#d|||fz||d||k|jrTt }d|_ d|_|j |_ ||_||_ ||_||} | S|dz|_|jt3ddS) Nr>z4%s:%d: Rule '%s' returned an unknown token type '%s'r.z&Scanning error. Illegal character '%s'z"Illegal character '%s' at index %deofr=z"No input string given with input())rrLrPrKr?matchrgrouprr lastindexrendlexerlexmatchrSrr__code__ co_filenameco_firstlinenorrQrMrN RuntimeError) r rrLrPrKr? lexindexfuncmtokirnewtoks r tokenz Lexer.token1sqKKN Lvoov)++! (,zM sM s#|KK00jjGGII ![ # K!-achx&'eegg " !"! ! $ c $ F $IE'K{$*<<<&'] M5t}7S M6;a8(89@9IKKK 6?d&666"**C 'CI!%CJ"yCH!'CJ"(1*DKJ>""**C $ VWW 5CI!%CJ&CH $CI!'CJ"(DK!^^C00F,,&'OSZ[aSb'celmsmtmteuvvv![F!! !M$ CwvX^F__ahioipipaqrrrivool < **CCHCICJCJCI DK\\#&&FMqj < CDD Dtrc|Srrrs r __iter__zLexer.__iter__r6rc@|}|t|Sr)r StopIteration)r ts r nextz Lexer.nexts JJLL 9 rr)r=)rrrr rdrrrrrrrrrrr__next__rrr r:r:ss!!!8< < < < ignore_rNN)rprrmax groupindexvaluesrWrrrj FunctionType MethodTypefind Exceptionintr_form_master_re)relistreflagsrtoknamesrr?r lexindexnamesr"rhandlerllistrlnamesrlistrrernamess r rrs  HHV  E9 5'**vU%5%<%<%>%>!?!?!!CD $QQQ $**,, : :DAqYYq$''FF|| 2E4DEEE#)8A;"7 Q#$ a  ##$ a 66)$$q((&2LOO'+Xa[&9LO %&-@@ 999 F A   66A,VBQBZ%RRsF,VABBZ%RRsFe s3w&-8888 9sC7DA;FFc,d}|d}t|dddD]\}}||vr|dkrn|dkrt|d|}nd}d|vrt|}d||d}||fS)Nr>_ANY)r<)rm enumeraterurp)r namesnonstatepartsrpartstates tokennames r _statetokenrsH GGCLLEU122Y**4 u   E1uuuQqSz"" uqrr##I I rcReZdZddZdZdZdZdZdZd Z d Z d Z d Z d Z dS) LexerReflectNrc||_d|_g|_||_ddi|_t |_d|_|ttj n||_ dS)Nr< inclusiveF) r error_functokensr stateinforrr.r rstderrlog)r rr rs r r zLexerReflect.__init__/sZ  ! $k2%%  36;)CJ///Crc||||dSr) get_tokens get_literals get_states get_rulesrs r get_allzLexerReflect.get_all:sJ    rc||||jSr)validate_tokensvalidate_literalsvalidate_rulesr.rs r validate_allzLexerReflect.validate_allAs@      zrc\|jdd}|s#|jdd|_dSt |t t fs#|jdd|_dS|s#|jdd|_dS||_dS)NrzNo token list is definedTztokens must be a list or tupleztokens is empty)rrr r.rilistrur)r rs r r zLexerReflect.get_tokensHs$//  HNN5 6 6 6DJ F&4-00  HNN; < < <DJ F  HNN, - - -DJ F rci}|jD]b}t|s"|jd|d|_||vr|jd|d||<cdS)NzBad token name '%s'TzToken '%s' multiply definedr>)r_is_identifierrr r.r,)r terminalsrs r rzLexerReflect.validate_tokens\s   A!''** "4a888! I~~  !>BBBIaLL   rcf|jdd|_|js d|_dSdS)Nliteralsr=)rrrrs r r zLexerReflect.get_literalsgs8 z266 } DMMM  rc. |jD]Y}t|trt|dkr/|jdt |d|_ZdS#t$r%|jdd|_YdSwxYw)Nr>z.Invalid literal %s. Must be a single characterTzIInvalid literals specification. literals must be a sequence of characters)rrirrr r.rs TypeError)r r[s r rzLexerReflect.validate_literalsms ] & &!![11&SVVaZZHNN#SUYZ[U\U\]]]!%DJ & &     HNNf g g gDJJJJ sA!A%%+BBc |jdd|_|jrXt|jtt fs#|jdd|_dS|jD] }t|trt|dkr0|jdt|d|_[|\}}t|ts0|jdt|d|_|dks)|dks#|jd |d|_||j vr$|jd |d|_||j |< dSdS) Nrz)states must be defined as a tuple or listTrzMInvalid state specifier %s. Must be a tuple (statename,'exclusive|inclusive')zState name %s must be a stringr exclusivez:State type for state %s must be 'inclusive' or 'exclusive'zState '%s' already defined) rrrrirurr r.rrsrr)r r r4 statetypes r rzLexerReflect.get_statesxsjnnXt44 ; 5dkE4=99 5JKKK! 55A%a//!3q66Q;;'vx|}~xxAAA%)  &'OD)%dK88!'GdTTT%)  %44 [8P8P'ceijjj%)  t~--'CTJJJ%)  +4DN4((/ 5 5 55rc6d|jD}i|_i|_i|_i|_i|_i|_|jD]}g|j|<g|j|<t|dkr#|j dd|_ dS|D]}|j|}t||j\}}||j|<t|dr|dkr|D] }||j|< X|dkr|D] }||j|< n|dkrB|j j}|j j}|j d |||jd|_ |D]$}|j|||f%t%|t&r|dkr0|D] }||j|< d |vr|j d |)|dkr$|j d |d|_ S|D]$}|j|||f%||j d |d|_ |jD]}|d|jD]}|dddS)Nc.g|]}|dddk|S)Nrt_r).0r"s r z*LexerReflect.get_rules..s%;;;!QrrUd]]A]]]rrz+No rules of the form t_rulename are definedTr8r.rignorez,%s:%d: Rule '%s' must be defined as a string\z#%s contains a literal backslash '\''Rule '%s' must be defined as a functionz&%s not defined as a function or stringc&|djjSNr>)rrxs r z(LexerReflect.get_rules..s1!=r)r]c,t|dSr+)rr,s r r.z(LexerReflect.get_rules..sQqTr)r]reverse)rrfuncsymstrsymr'errorfeoffrrr r.rhasattrrrrrrXrirr,rsort) r tsymbolsr r"rrtoknamelinefiles r rzLexerReflect.get_ruless ;;tz;;;        A DLODKNN x==A   HNNH I I IDJ F# "# "A 1 A)!T^< > > >##%% : :A FF**DF 9 9 9 9 : :rc h |jD]}|j|D]\}}|jj}|jj}t j|}|j||j |}t|tj rd}nd}|jj } | |kr*|jd|||jd|_| |kr*|jd|||jd|_t#|s+|jd|||jd|_ t%jd|dt#|d |j} | d r)|jd |||jd|_#t$j$rh} |jd |||j| d t#|vr"|jd|||jd|_Yd} ~ d} ~ wwxYw|j|D]9\} } |j | }|dkr#|jd| d|_<||jvr=|ddkr$|jd| |d|_ t%jd| d| d |j} | d r"|jd| d|_#t$j$rM} |jd| | d | vr|jd| d|_Yd} ~ 3d} ~ wwxYw|j|s/|j|s"|jd|d|_|j|d}|r|}|jj}|jj}t j|}|j|t|tj rd}nd}|jj } | |kr)|jd|||jd|_| |kr)|jd|||jd|_|jD]}||dS)Nrr>z'%s:%d: Rule '%s' has too many argumentsTz%%s:%d: Rule '%s' requires an argumentz2%s:%d: No regular expression defined for rule '%s'(?P<>)r=z<%s:%d: Regular expression for rule '%s' matches empty stringz3%s:%d: Invalid regular expression for rule '%s'. %s#z6%s:%d. Make sure '#' in rule '%s' is escaped with '\#'r.r)rrz-Rule '%s' defined for an unspecified token %sz5Regular expression for rule '%s' matches empty stringz,Invalid regular expression for rule '%s'. %sz/Make sure '#' in rule '%s' is escaped with '\#'zNo rules defined for state '%s')rr1rrrinspect getmoduleraddrrirjr co_argcountr r.rrrrrrr2rrr3rvalidate_module)r rfnamer"r9r:moduler8reqargsnargsr[er4refuncs r rzLexerReflect.validate_ruless^Y &Y &E!L/$ &$ &qz0z- *1--   (((-.a!122 GGG .7??HNN#LdTXZ[Zdeee!%DJ7??HNN#JDRVXYXbccc!%DJ!!}}HNN#WY]_cefeoppp!%DJ & 555*Q----#H$,WWAwwr{{*'egkmqsts}~~~%) x&&&HNN#XZ^`dfgfprstttjmm++'`bfhlnonxyyy!%DJJJJJJ & ;u- & &a--g%%HNN#LdSSS!%DJ$+--',,y2I2IA2M2MHNN#RTXZabbb!%DJ & 444#;T\JJA *'^`deee%) x&&&HNN#QSWYZ[[[axx'Y[_```!%DJJJJJJ & <& "t{5/A "@%HHH! KOOE400E &z0z- *1--   (((a!122 GGG .7??HNN#LdTXZ[Zdeee!%DJ7??HNN#JDRVXYXbccc!%DJl ) )F   ( ( ( ( ) )s47A,F%%H4AHH/ALM$AMM$c tj|\}}n#t$rYdSwxYwtjd}tjd}i}|dz }|D]}||}|s||}|rk|d} || } | s||| <n9tj|} |j d| || | d|_ |dz }dS)Nz\s*def\s+(t_[a-zA-Z_0-9]*)\(z\s*(t_[a-zA-Z_0-9]*)\s*=r>z7%s:%d: Rule %s redefined. Previously defined on line %dT) r@getsourcelinesrlrrrrr getsourcefiler r.) r rFlineslinenfresre counthashr9rr4prevr{s r rDzLexerReflect.validate_module@s, "1&99LE55    FF j899j455     D $A $IIdOO &wwqzz }}T**&&+IdOO&4V<?:?:?:D])])])NrrFrxc |d}d} ddi} t} || _| ttj} |r|ttj}|r|rOfdt D} t | } d| vr tj| dj| d<ntd} | d}|r!t|tr d |vr|d z|z}t| | | }||s#|rt!d |r;|r9 | || | ja| ja| a| S#t*$rYnwxYw|rQ|d |j|d |j|d|jt5| _|jD]}| j|t|jt:t<fr@t?|jd |j| _!n |j| _!| jt5| j!z| _"|j} i}| D]}g}|j#|D]m\}}|j$j%}|j$j&}|'d|dtQ|d|r%|d|tQ||n|j)|D];\}}|'d|d|d|r|d|||<|||<|r|d|D]p}tU|||| |j+\}}}|| j,|<|| j-|<|| j.|<|r-t_|D]\}}|d|||q| 0D]\}}|dkr|dkr| j,|1| j,d| j-|1| j-d| j.|1| j.d| | _2| j,d| _3| j-d| _4|| _5|j6| _7| j7 dd| _8|j9| _:|j9 dd| _;| j;s| <d|j=| _>|j= dd| _?| 0D]\} }|dkrF| |j9vr| <d| | |j6vr| j8r| <d| Q|dkrX| |j9vr#|j9 dd|j9| <| |j6vr#|j6 dd|j6| <| ja| ja| a|r|r|t|tjAr|j}!nrd |vr | d}!ne|Bd }"d |"dd}#td|#zttj|#dd}!tjFG|!} | H||n2#t$r%}$| <d|d|$Yd}$~$nd}$~$wwxYw| S)Nrxr<rc4g|]}|t|fSr)rY)r%krFs r r&zlex..zs(???a1gfa(()???r__file__rr __package__rf)r rzCan't build lexerzlex: tokens = %rzlex: literals = %rzlex: states = %rrr<r=r>z(lex: Adding rule %s -> '%s' (state '%s')z#lex: ==== MASTER REGEXS FOLLOW ====z"lex: state '%s' : regex[%d] = '%s'r=zNo t_error rule is definedr z1No error rule is defined for exclusive state '%s'z2No ignore rule is defined for exclusive state '%s'rgrzCouldn't write lextab module z. )Jr:rSr rr dirdictrrXrrrirrrr SyntaxErrorrrrrrr/rrrrrOrBrrurrprQrr1rrrrXrr2rrrArBrCrrWextendrFr?r@rJr'rGrPr3rHrMr,r4rIrNrjrkrmrrYrnrodirnamerrl)%rFrZr0optimizerxrnowarnrydebuglogerrorlogrrlexobj_itemspkglinforregexsr regex_listrEr"r9r:r4rJr?re_textre_namesrrstyper srcfilerpkgnamerIs%` r lexrn_s%~ E[)I WWF!FSZ(( -   ,,H*????3v;;???V  U " " # E,,? @ IE* &q)) ))M " "C (z&#&&( f  3Y'F Hg > > >E MMOOO 3      3122 2 F   NN65 ) ) )LELEEM    D  = *EL999 *EN;;; *EO<<<uuF \  Q%.4-00,4T%."34466;;ENKK"^!+c&2D.E.EEFI F##  e, g gHE1:,D:)D    eeeZ]]]]C D D D g H%Q[\]Q^Q^`efff|E* Z ZGD!    dddAAA6 7 7 7 Z H$PQSXYYY"u  = ;<<<TT#26%='5RWR`#a#a w#(% '.e$(0u%  T$W-- T T4 BE1dSSSS"))TT u I  %;"6"6  e $ + +F,=i,H I I I  !% ( / /0Ei0P Q Q Q  "5 ) 0 01G 1R S S S#F$Y/FL,Y7FF"LF,00B??F"LF|'' 488F  75666 *FZ^^It44FNOO%% B B5 K   $$  !TVWXXX $$)9$  !UWXYYY k ! ! $$"',"2"29d"C"C Q $$"',"2"29b"A"A Q LE LE ER(R   &%"233 L /f$$#J/GG"LL--E!hhuSbSz22Gw.///%ck'&:JKKG00I R OOFI . . . . R R R    fffaaP Q Q Q Q Q Q Q Q R Ms*'E-- E:9E:\ ]!]]c$|s tjd}t|}|}|nM#t $r@tjdtj}YnwxYw|r|j }nt}|||r|j }nt} |}|sdStjd|j |j |j |jfzI)Nr>z/Reading from standard input (type EOF to end): Tz(%s,%r,%d,%d) )rargvrqreadclose IndexErrorstdoutr&stdinrrrrrr)rdatar{r"_input_tokenrs r runmainrys $ $x{HXA6688D GGIIII $ $ $ J  O P P P9>>##DDD $  F4LLL \fhh  E *ch 3:sz-ZZ[[[ \sA AABBcfd}|S)Nc`tdrt|_n|_|S)Nr8)r5rr)r"rJs r set_regexzTOKEN..set_regexBs0 1j ! !  mmAGGAGrr)rJr|s` r TOKENr}As$ rr)$rrrtrrrjrVrnr@ StringType UnicodeTyperAttributeErrorrbytesrrrrrZrr r2r:rrrwrrrrrVERBOSErnryr}Tokenrrr rsqD  #U%67KK,KKK .//yv$,uuuuuuuuH 000 999P2jjjjj6jjjb DhBJW[xxxx@\\\\D s - 99