o a@s^dZddlZddlmZmZddlmZmZmZm Z m Z m Z m Z m Z dgZGdddeZdS)z pygments.lexers.urbi ~~~~~~~~~~~~~~~~~~~~ Lexers for UrbiScript language. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N)ExtendedRegexLexerwords)TextCommentOperatorKeywordNameStringNumber PunctuationUrbiscriptLexerc@sDeZdZdZdZdgZdgZdgZej Z ddZ de fd e fd e jd fd efed ddefedddejfdefdefdejfdejfedddejfdejjfdefdejfdefdefdejfdejfdejfdejdfd ej d!fgd"e fd#ejd$fgd%e fd&ej d$fgd'e jfd e jd(fd)e jd$fd*e jfgd+Z!d,d-Z"d.S)/r z@ For UrbiScript source code. .. versionadded:: 1.5 UrbiScript urbiscriptz*.uzapplication/x-urbiscriptc cs|d}|d}|d}t|}|t|fV|jt|7_|j||dkrId|d}|t|fV|jt|7_dS||j|||d}|tj|fV||d|_dS)N)z\B(z)() groupintstartr poslentextendEscape) lexermatchctxtext_before_blob blob_start blob_size_str blob_sizeresult blob_textr$6/usr/lib/python3/dist-packages/pygments/lexers/urbi.py blob_callback&s    "zUrbiscriptLexer.blob_callbackz\s+z//.*?\nz/\*commentz"(every|for|loop|while)(?:;|&|\||,))assertatbreakcasecatchclosurecomplcontinuedefaultelseenumeveryexternalfinallyforfreezeififnewonleavereturnstopifswitchthisthrowtimeouttry waituntilwheneverwhilez\b)suffix)$asmautoboolchar const_castdeletedouble dynamic_castexplicitexportexternfloatfriendgotoinlinerlongmutable namespaceregisterreinterpret_castshortsignedsizeof static_caststructtemplatetypedeftypeidtypenameunionunsignedusingvirtualvolatilewchar_tz&(emit|foreach|internal|loopn|static)\bz(private|protected|public)\bz(var|do|const|function|class)\bz(true|false|nil|void)\b)EBarrierBinaryBoolean CallMessageChannelCode Comparable ContainerControlDate Dictionary DirectoryDuration EnumerationEvent Exception ExecutableFile FinalizableFloat FormatInfo FormatterGlobalGroupHash InputStream IoServiceJobKernelLazyListLoadableLobbyLocationLoggerMathMutexnilObject Orderable OutputStreamPairPathPatternPosition PrimitiveProcessProfile PseudoLazyPubSub RangeIterableRegexp SemaphoreServer SingletonSocket StackFrameStreamr SystemTagTimeout TraceableTrajectoryGeneratorTripletTupleUObjectUValueUVarz (?:this)\bz(?:[-=+*%/<>~^:]+|\.&?|\|\||&&)z?(?:and_eq|and|bitand|bitor|in|not|not_eq|or_eq|or|xor_eq|xor)\bz [{}\[\]()]+z(?:;|\||,|&|\?|!)+z [$a-zA-Z_]\w*z0x[0-9a-fA-F]+zV(?:[0-9]+(?:(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?)?((?:rad|deg|grad)|(?:ms|s|min|h|d))?)\b" string.double' string.singlez%((?:\\\\|\\"|[^"])*?)(\\B\((\d+)\)\()z(\\\\|\\[^\\]|[^"\\])*?"z#popz%((?:\\\\|\\'|[^'])*?)(\\B\((\d+)\)\()z(\\\\|\\[^\\]|[^'\\])*?'z[^*/]z#pushz\*/z[*/])rootrrr'cCs(d}d|vr |d7}d|vr|d7}|S)z_This is fairly similar to C and others, but freezeif and waituntil are unique keywords.rr7g?rBr$)rr"r$r$r% analyse_texts zUrbiscriptLexer.analyse_textN)#__name__ __module__ __qualname____doc__namealiases filenames mimetypesreDOTALLflagsr&rr MultilinerrReserved DeclarationConstantrBuiltinPseudorWordr Otherr Hexr|r DoubleSingletokensrr$r$r$r%r sv       :     K)rrpygments.lexerrrpygments.tokenrrrrrr r r __all__r r$r$r$r%s  (