^c@s1dZddlZddlZddlZddlmZddlZejdZyej ej fZ Wne k re Z nXdefdYZde fd YZd fd YZd Zd ZdZdZdZeeddddddZeedZdZeZdS(s2.2iNi(tutils^[a-zA-Z0-9_]+$tLexErrorcBseZdZRS(cCs|f|_||_dS(N(targsttext(tselftmessagets((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyt__init__0s (t__name__t __module__R(((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyR/stLexTokencBs#eZdZdZdZRS(cCs d|j|j|j|jfS(NsLexToken(%s,%r,%d,%d)(ttypetvaluetlinenotlexpos(R((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyt__str__6scCs t|S(N(tstr(R((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyt__repr__8scCs|jj|dS(N(tlexertskip(Rtn((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyR:s(RR RRR(((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyR 5s  tLexercBsneZdZd dZdZdZdZdZdZ dZ dZ d Z d Z RS( cCsd|_d|_i|_i|_d|_g|_d|_i|_i|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_d|_d|_dS(NtINITIALiti(tNonetlexret lexretextt lexstateretlexstateretexttlexstatet lexstatestackt lexstateinfotlexstateignoretlexstateerrorft lexreflagstlexdataRtlexlent lexerrorft lextokenst lexignoret lexliteralst lexmoduleR tlexdebugt lexoptimize(R((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyRGs*                    c Cs t}|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j |_ |j |_ |j |_ |j |_ |j |_ |j|_|j|_|j|_|j|_|ri}x|jjD]\}}g}xw|D]o\}}g} xZ|D]R} | s;| d rN| j| q#n| jt|| dj| dfq#Wq W|j|| f|||t#|0D]}d2|&||0|fGHqu Wq q Wxk|j?D]]\}&}1|&dkr |1dkr | j<|&j@| j<d| j=|&j@| j=dq q W|| _A| j<d| _B| j=d| _C|"| _D| jDjdd | _E|#| _F|#jdd| _G| r | jG r d3GHnx|j?D]\}}2|2dkr | r ||#kr d4|GHn| rP ||"krP | jErP d5|GHqP q |2dkr ||#kr( |#jdd|#|scSst|dS(Ni(RB(R((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyRss(%s:%d: Rule '%s' has too many arguments.s&%s:%d: Rule '%s' requires an argument.tignores-%s:%d: Rule '%s' must be defined as a string.Rfs (?P<%s>%s)s=%s:%d: Regular expression for rule '%s' matches empty string.s3%s:%d: Invalid regular expression for rule '%s'. %st#s7%s:%d. Make sure '#' in rule '%s' is escaped with '\#'.s(lex: Adding rule %s -> '%s' (state '%s')s2%s:%d: No regular expression defined for rule '%s's,lex: Rule '%s' must be defined as a functionRs3lex: Rule '%s' defined for an unspecified token %s.s;lex: Regular expression for rule '%s' matches empty string.s1lex: Invalid regular expression for rule '%s'. %ss5lex: Make sure '#' in rule '%s' is escaped with '\#'.s$lex: No rules defined for state '%s'slex: Unable to build lexer.s!lex: state '%s'. regex[%d] = '%s's)lex: Warning. no t_error rule is defined.s?lex: Warning. no error rule is defined for exclusive state '%s's@lex: Warning. no ignore rule is defined for exclusive state '%s'(IRRR*R+R[Rt ModuleTypet__dict__t _INSTANCETYPEtdirR.R^R)Rqtsystexc_infottb_frametf_backt f_globalsRZRwR_Rt ImportErrorR`t SyntaxErrortlistRR&t_is_identifierRgRRR\R]RBR@t TypeErrorR(t encode_inputRRlRmR-RtsortRnRpRoRt co_argcountRt__doc__RTRURRfRRRRRRAR,textendRRRR R'R!R%RL(3tmoduleR0tdebugtoptimizeRMRtnowarnRt stateinfoRftfilestlexobjtwarntkt_itemsRJtvRtbttR9RRRRR1RRt statetypet original_namettsymbolstfuncsymtstrsymttoknamesRterrorfttoknametregexsRat regex_listtfnametlinetfiletismethodtnargstreqargstrRtre_textR tstype((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pytlexs       .                  7     " +   /     $                )      $#         !"            cCs|sdy3tjd}t|}|j}|jWqdtk r`dGHtjj}qdXn|rv|j}nt}|||r|j}nt}x7|}|sPnd|j |j |j |j fGHqdS(Nis.Reading from standard input (type EOF to end):s (%s,%r,%d,%d)( RtargvR=treadRDt IndexErrortstdinR_RwR R R R(RtdataR}R9t_inputt_tokenRt((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pytrunmain>s*        csfd}|S(Ncs |_|S(N(R(R9(R(s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pytset_docas ((RR((Rs2/usr/lib64/python2.7/site-packages/sepolgen/lex.pytTOKEN`s(R?RTRRRRRlRURt InstanceTypet ObjectTypeRtAttributeErrorR0RRR RRRCRVRRRRRRtToken(((s2/usr/lib64/python2.7/site-packages/sepolgen/lex.pyts,$    '   & X"