Server IP : 85.214.239.14 / Your IP : 3.147.103.33 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/lib/python3/dist-packages/pygments/lexers/ |
Upload File : |
""" pygments.lexers.sieve ~~~~~~~~~~~~~~~~~~~~~ Lexer for Sieve file format. https://tools.ietf.org/html/rfc5228 https://tools.ietf.org/html/rfc5173 https://tools.ietf.org/html/rfc5229 https://tools.ietf.org/html/rfc5230 https://tools.ietf.org/html/rfc5232 https://tools.ietf.org/html/rfc5235 https://tools.ietf.org/html/rfc5429 https://tools.ietf.org/html/rfc8580 :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, bygroups from pygments.token import Comment, Name, Literal, String, Text, Punctuation, \ Keyword __all__ = ["SieveLexer"] class SieveLexer(RegexLexer): """ Lexer for sieve format. .. versionadded:: 2.6 """ name = 'Sieve' filenames = ['*.siv', '*.sieve'] aliases = ['sieve'] tokens = { 'root': [ (r'\s+', Text), (r'[();,{}\[\]]', Punctuation), # import: (r'(?i)require', Keyword.Namespace), # tags: (r'(?i)(:)(addresses|all|contains|content|create|copy|comparator|' r'count|days|detail|domain|fcc|flags|from|handle|importance|is|' r'localpart|length|lowerfirst|lower|matches|message|mime|options|' r'over|percent|quotewildcard|raw|regex|specialuse|subject|text|' r'under|upperfirst|upper|value)', bygroups(Name.Tag, Name.Tag)), # tokens: (r'(?i)(address|addflag|allof|anyof|body|discard|elsif|else|envelope|' r'ereject|exists|false|fileinto|if|hasflag|header|keep|' r'notify_method_capability|notify|not|redirect|reject|removeflag|' r'setflag|size|spamtest|stop|string|true|vacation|virustest)', Name.Builtin), (r'(?i)set', Keyword.Declaration), # number: (r'([0-9.]+)([kmgKMG])?', bygroups(Literal.Number, Literal.Number)), # comment: (r'#.*$', Comment.Single), (r'/\*.*\*/', Comment.Multiline), # string: (r'"[^"]*?"', String), # text block: (r'text:', Name.Tag, 'text'), ], 'text': [ (r'[^.].*?\n', String), (r'^\.', Punctuation, "#pop"), ] }