|eHGdZddlZddlmZmZddlmZmZmZm Z m Z m Z m Z m Z mZddgZGddeZGddeZy) z pygments.lexers.rebol ~~~~~~~~~~~~~~~~~~~~~ Lexers for the REBOL and related languages. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerbygroups) TextCommentOperatorKeywordNameStringNumberGeneric Whitespace RebolLexerRedLexerceZdZdZdZdgZgdZdgZejejzZ dZ dZ gdefd ej d fd ej$fd ej$d fdej$fdedfdedfdej(fdej*fdefdej.dfdej.fdej0fdej2fdej2fdej6fdej6fdej0fdej0fd efd!ej:fd"ej.fd#ej.fd$ej.fd%ed&fd'ed(fd)ed*fd+efd,ej<fd-e fd.ej>fd/ej>d0fd1efd2efe ej@fd3efd4ej@fded5fgd6efe ej@fd3efd4ej@fded7fd8ed5fgd2ej.fe ej.fd4ej.fdej.d5fge dzej d5fd9ej d5fd:ej d5fge ej>fdej>d;fdfd=ej>d5fgd2ej>fe ej>fd3ej>fd4ej>fdej>d5fgd>ej6fd?ej6d5fgdej$fd@ej$fd8ej$d5fgd2efe efd3efd4efded5fgd6efe efd3efd4efded7fd8ed5fgdAed7fdBed5fded&fded(fdCefgdD Z!dEZ"yF)GrzN A `REBOL `_ lexer. .. versionadded:: 1.1 REBOLrebol)z*.rz*.r3z*.rebz text/x-rebol(?:\^\([0-9a-f]{1,4}\)*)c#.K|j}tjd|r$|jtj |fytjd|r$|jt j|fytjd|r$|jt j|fytjd|r$|jtj|fytjd|r$|jt j|fytjd|r$|jtj|fytjd|r|jt|fytjd|r|jt|fytjd |r|jt|fytjd |r$|jtj|fytjd |r.|jt jj |fytjd |r$|jt j"|fytjd |r$|jt j$|fy|jt j|fyw)N.*:$a(native|alias|all|any|as-string|as-binary|bind|bound\?|case|catch|checksum|comment|debase|dehex|exclude|difference|disarm|either|else|enbase|foreach|remove-each|form|free|get|get-env|if|in|intersect|loop|minimum-of|maximum-of|mold|new-line|new-line\?|not|now|prin|print|reduce|compose|construct|repeat|reverse|save|script\?|set|shift|switch|throw|to-hex|trace|try|type\?|union|unique|unless|unprotect|unset|until|use|value\?|while|compress|decompress|secure|open|close|read|read-io|write-io|write|update|query|wait|input\?|exp|log-10|log-2|log-e|square-root|cosine|sine|tangent|arccosine|arcsine|arctangent|protect|lowercase|uppercase|entab|detab|connected\?|browse|launch|stats|get-modes|set-modes|to-local-file|to-rebol-file|encloak|decloak|create-link|do-browser|bind\?|hide|draw|show|size-text|textinfo|offset-to-caret|caret-to-offset|local-request-file|rgb-to-hsv|hsv-to-rgb|crypt-strength\?|dh-make-key|dh-generate-key|dh-compute-key|dsa-make-key|dsa-generate-key|dsa-make-signature|dsa-verify-signature|rsa-make-key|rsa-generate-key|rsa-encrypt)$a4(add|subtract|multiply|divide|remainder|power|and~|or~|xor~|minimum|maximum|negate|complement|absolute|random|head|tail|next|back|skip|at|pick|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|last|path|find|select|make|to|copy\*|insert|remove|change|poke|clear|trim|sort|min|max|abs|cp|copy)$a(error|source|input|license|help|install|echo|Usage|with|func|throw-on-error|function|does|has|context|probe|\?\?|as-pair|mod|modulo|round|repend|about|set-net|append|join|rejoin|reform|remold|charset|array|replace|move|extract|forskip|forall|alter|first+|also|take|for|forever|dispatch|attempt|what-dir|change-dir|clean-path|list-dir|dirize|rename|split-path|delete|make-dir|delete-dir|in-dir|confirm|dump-obj|upgrade|what|build-tag|process-source|build-markup|decode-cgi|read-cgi|write-user|save-user|set-user-name|protect-system|parse-xml|cvs-date|cvs-version|do-boot|get-net-info|desktop|layout|scroll-para|get-face|alert|set-face|uninstall|unfocus|request-dir|center-face|do-events|net-error|decode-url|parse-header|parse-header-date|parse-email-addrs|import-email|send|build-attach-body|resend|show-popup|hide-popup|open-events|find-key-face|do-face|viewtop|confine|find-window|insert-event-func|remove-event-func|inform|dump-pane|dump-face|flag-face|deflag-face|clear-fields|read-net|vbug|path-thru|read-thru|load-thru|do-thru|launch-thru|load-image|request-download|do-face-alt|set-font|set-para|get-style|set-style|make-face|stylize|choose|hilight-text|hilight-all|unlight-text|focus|scroll-drag|clear-face|reset-face|scroll-face|resize-face|load-stock|load-stock-block|notify|request|flash|request-color|request-pass|request-text|request-list|request-date|request-file|dbug|editor|link-relative-path|emailer|parse-error)$zO(halt|quit|do|load|q|recycle|call|run|ask|parse|view|unview|return|exit|break)$zREBOL$to-.*z5(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$z.*\?$.*\!$'.*#.*%.*)grouprematchstartr Subheadingr BuiltinFunctionr Namespace ExceptionHeadingrTypeVariableInstanceLabel Decoratorlexerrwords 7/usr/lib/python3/dist-packages/pygments/lexers/rebol.py word_callbackzRebolLexer.word_callback#s1{{} 88FD !++-!3!3T9 9 XX $#'$(++-t3 3 XX   ++-4 4 XX %0'+3,4++-!2!2D8 8 XX #$(*++-5 5 XXh %++-$6 6 XXgt $++-$. . XXN++-4/ / XXh %++-$. . XXh %++-t3 3 XXeT "++-!7!7= = XXeT "++-T1 1 XXeT "++-5 5++-4 4sLL\s+#"charz#\{[0-9a-f]*\}2#\{bin264#\{[0-9a-z+/=\s]*\}"string\{string2;#+.*\n;\*+.*\n;.*\n%" stringFile%[^(^{")\s\[\]]+[+-]?([a-z]{1,3})?\$\d+(\.\d+)?[+-]?\d+\:\d+(\:\d+)?(\.\d+)?zJ\d+[\-/][0-9a-z]+[\-/]\d+(\/\d+\:\d+((\:\d+)?([.\d+]?([+-]?\d+:\d+)?)?)?)?\d+(\.\d+)+\.\d+\d+X\d+#[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+[+-]?\d+(\'\d+)?[.,]\d*[+-]?\d+(\'\d+)?[\[\]()] [a-z]+[^(^{"\s:)]*://[^(^{"\s)]* mailto:[^(^{"@\s)]+@[^(^{"@\s)]+[^(^{"@\s)]+@[^(^{"@\s)]+ comment\s"commentString1 comment\s\{commentString2 comment\s\[ commentBlockcomment\s[^(\s{"\[]+z/[^(^{")\s/[\]]*z"([^(^{")\s/[\]]+)(?=[:({"\s/\[\]]) <[\w:.-]*> <[^(<>\s")]+tag ([^(^{")\s]+)[^(^")]+[(|)]+\^.#pop [^(^{})]+#push\}\^."." tagString [^(<>\r\n")]+>(\d+\.)+\d+ ([01]\s*){8}\[\] [^(\[\]"{)]+ rootr6r8r=r1rSr^tupler3rKrMrOctjd|tjrytjd|tjryy)zS Check if code contains REBOL header and so it probably not R code z^\s*REBOL\s*\[g?z \s*REBOL\s*\[g?N)rr IGNORECASEsearch)texts r- analyse_textzRebolLexer.analyse_texts9 88%tR]] ; YY'r}} =>N)#__name__ __module__ __qualname____doc__namealiases filenames mimetypesrrk MULTILINEflags escape_rer.rr Charr HexrSpecialPreprocr r)FloatOtherrConstantr Strong AttributeTagEscapetokensrnror-rrs DiG(I I MMBLL (E+IS5l# TN# FKK (#  +# fjj& ) # &vzz 2 # 68 $ # FI &#  )# '// *# w # DNNL 1# !$.. 1# 0 ># .v|| <# ./5|| =# "!'"2"2 3## $)) *%# &4V\\ B'# (( 6)# *!& )+# ,'.. )-# .1$.. A/# 01$.. A1# 2*4>> :3# 4G%5 65# 6W&6 77# 8Wn 59# :%g .;# <!$.. 1=# >3M B?# @DHH %A# Bdhh .C# Dt $E# J& !  &   V]] # 66 "  6 "  &   V]] # FG $ FF #  $.. )  ' T^^ $ 4>>6 *  _fkk6 2 fkk6 * FKK (  ! 488[ ) txx ( 488V $  $(( #  !  ! TXX  488V $  '** + W%%v . VZZ fjj ) FJJ ' ' "   W  7F #  7 #   W  GW % GV $  GW % GV $ 7, - G- . g &  IkFZ roceZdZdZdZddgZddgZddgZejejzZ d Z d Z gd efd ej d fdej$fdej$dfdej$fdeej$ej*efdedfdedfdej0fdej2fdefdej4dfdej4fdej6fdej8fdej8fd ej<fd!ej<fd"ej6fd#ej6fd$efd%ej@fd&ej4fd'ej4fd(ej4fd)ed*fd+ed,fd-ed.fd/efd0ejBfd1e fd2ejDfd3ejDd4fd5efd6efe ejFfd7efd8ejFfded9fgd:efe ejFfd7efd8ejFfded;fdej d9fge ejDfdejDd?fd@ejDfdAejDd9fgd6ejDfe ejDfd7ejDfd8ejDfdejDd9fgdBej<fdCej<d9fgd ej$fdDej$fd`_ lexer. .. versionadded:: 2.0 Redredz red/systemz*.redz*.redsz text/x-redztext/x-red-systemrc#*K|j}tjd|r$|jtj |fytjd|r$|jt j|fytjd|r$|jt j|fytjd|r.|jt jj|fytjd|r$|jtj|fytjd|r$|jt j|fytjd|r|jt|fytjd|r$|jtj|fytjd |r|jt|fytjd |r|jt|fytjd |r$|jtj|fytjd |r.|jt jj |fytjd |r$|jt j"|fytjd|r$|jt j$|fytjd|r$|jtj |fy|jt j|fyw)Nra(if|unless|either|any|all|while|until|loop|repeat|foreach|forall|func|function|does|has|switch|case|reduce|compose|get|set|print|prin|equal\?|not-equal\?|strict-equal\?|lesser\?|greater\?|lesser-or-equal\?|greater-or-equal\?|same\?|not|type\?|stats|bind|union|replace|charset|routine)$af(make|random|reflect|to|form|mold|absolute|add|divide|multiply|negate|power|remainder|round|subtract|even\?|odd\?|and~|complement|or~|xor~|append|at|back|change|clear|copy|find|head|head\?|index\?|insert|length\?|next|pick|poke|remove|reverse|select|sort|skip|swap|tail|tail\?|take|trim|create|close|delete|modify|open|open\?|query|read|rename|update|write)$z`(yes|on|no|off|true|false|tab|cr|lf|newline|escape|slash|sp|space|null|none|crlf|dot|null-byte)$ze(#system-global|#include|#enum|#define|#either|#if|#import|#export|#switch|#default|#get-definition)$z(system|halt|quit|quit-return|do|load|q|recycle|call|run|ask|parse|raise-error|return|exit|break|alias|push|pop|probe|\?\?|spec-of|body-of|quote|forever)$z(action\?|block\?|char\?|datatype\?|file\?|function\?|get-path\?|zero\?|get-word\?|integer\?|issue\?|lit-path\?|lit-word\?|logic\?|native\?|op\?|paren\?|path\?|refinement\?|set-path\?|set-word\?|string\?|unset\?|any-struct\?|none\?|word\?|any-series\?)$z(JNICALL|stdcall|cdecl|infix)$rzN(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|<<<|>>>|<<|>>|<|>%)$rrrrz:.*)rrrrr rr r r!Pseudorr"r#rr%r&r'r(r)r*s r-r.zRedLexer.word_callbacks{{} 88FD !++-!3!3T9 9 XX> @D E ++-t3 3 XX( *. / ++-4 4 XX348:++-!4!4d: : XX<=AC++-!2!2D8 8 XX)*.0++-5 5 XXCEIJ++-$. . XX7 >++-!2!2D8 8 XXgt $++-$. . XX./35++-4/ / XXh %++-t3 3 XXeT "++-!7!7= = XXeT "++-T1 1 XXeT "++-5 5 XXeT "++-!3!3T9 9++-4 4sNNr/r0r1z#\{[0-9a-f\s]*\}r2r3r4z$([0-9a-f]+)(h)((\s)|(?=[\[\]{}"()]))r5r6r7r8r9r:r;r<r=r>r?r@zH\d+[\-/][0-9a-z]+[\-/]\d+(/\d+:\d+((:\d+)?([\.\d+]?([+-]?\d+:\d+)?)?)?)?rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPz/[^(^{^")\s/[\]]*z#([^(^{^")\s/[\]]+)(?=[:({"\s/\[\]])rQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgN)%rprqrrrsrtrurvrwrrkrxryrzr.rr r{r r|rr r&r rr}r~r)rrrrr rrrrrrror-rrsD Dl#G(#I23I MMBLL (E+I45n% TN% FKK (% !&** -% fjj& ) % &vzz 2 % 5 fjj$-- < > % 68 $% FI &%  )% '// *% w % DNNL 1% !$.. 1% 0 >% .v|| #% &!'"2"2 3'% ()) *)% *4V\\ B+% ,( 6-% .!& )/% 0'.. )1% 21$.. A3% 41$.. A5% 6*4>> :7% 8G%5 69% :W&6 7;% <Wn 5=% >%g .?% @"4>> 2A% B4] CC% DDHH %E% Fdhh .G% Ht $I% N& !  &   V]] # 66 "  6 "  &   V]] # FG $ FF #  $.. )  ' T^^ $ 4>>6 *  _fkk6 2 fkk6 * FKK (  ! 488[ ) txx ( 488V $  $(( #  !  ! TXX  488V $  '** + W%%v . VZZ fjj ) FJJ ' ' "   W  7F #  7 #   W  GW % GV $  GW % GV $ 7, - G- . g &  MmFro)rsrpygments.lexerrrpygments.tokenrrrrr r r r r __all__rrrror-rsJ /     $ZZzrzrro