Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin.support.pygments.lexers.other.RebolLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.other.RebolLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.other.RebolLexer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def word_callback

Static Public Attributes

string name = 'REBOL'
list aliases = ['rebol']
list filenames = ['*.r', '*.r3']
list mimetypes = ['text/x-rebol']
 flags = re.IGNORECASE|re.MULTILINE
string escape_re = r'(?:\^\([0-9a-fA-F]{1,4}\)*)'

Detailed Description

A `REBOL <http://www.rebol.com/>`_ lexer.

*New in Pygments 1.1.*

Definition at line 1624 of file other.py.


Member Function Documentation

Definition at line 1641 of file other.py.

01641 
01642     def word_callback(lexer, match):
01643         word = match.group()
01644 
01645         if re.match(".*:$", word):
01646             yield match.start(), Generic.Subheading, word
01647         elif re.match(
01648             r'(native|alias|all|any|as-string|as-binary|bind|bound\?|case|'
01649             r'catch|checksum|comment|debase|dehex|exclude|difference|disarm|'
01650             r'either|else|enbase|foreach|remove-each|form|free|get|get-env|if|'
01651             r'in|intersect|loop|minimum-of|maximum-of|mold|new-line|'
01652             r'new-line\?|not|now|prin|print|reduce|compose|construct|repeat|'
01653             r'reverse|save|script\?|set|shift|switch|throw|to-hex|trace|try|'
01654             r'type\?|union|unique|unless|unprotect|unset|until|use|value\?|'
01655             r'while|compress|decompress|secure|open|close|read|read-io|'
01656             r'write-io|write|update|query|wait|input\?|exp|log-10|log-2|'
01657             r'log-e|square-root|cosine|sine|tangent|arccosine|arcsine|'
01658             r'arctangent|protect|lowercase|uppercase|entab|detab|connected\?|'
01659             r'browse|launch|stats|get-modes|set-modes|to-local-file|'
01660             r'to-rebol-file|encloak|decloak|create-link|do-browser|bind\?|'
01661             r'hide|draw|show|size-text|textinfo|offset-to-caret|'
01662             r'caret-to-offset|local-request-file|rgb-to-hsv|hsv-to-rgb|'
01663             r'crypt-strength\?|dh-make-key|dh-generate-key|dh-compute-key|'
01664             r'dsa-make-key|dsa-generate-key|dsa-make-signature|'
01665             r'dsa-verify-signature|rsa-make-key|rsa-generate-key|'
01666             r'rsa-encrypt)$', word):
01667             yield match.start(), Name.Builtin, word
01668         elif re.match(
01669             r'(add|subtract|multiply|divide|remainder|power|and~|or~|xor~|'
01670             r'minimum|maximum|negate|complement|absolute|random|head|tail|'
01671             r'next|back|skip|at|pick|first|second|third|fourth|fifth|sixth|'
01672             r'seventh|eighth|ninth|tenth|last|path|find|select|make|to|copy\*|'
01673             r'insert|remove|change|poke|clear|trim|sort|min|max|abs|cp|'
01674             r'copy)$', word):
01675             yield match.start(), Name.Function, word
01676         elif re.match(
01677             r'(error|source|input|license|help|install|echo|Usage|with|func|'
01678             r'throw-on-error|function|does|has|context|probe|\?\?|as-pair|'
01679             r'mod|modulo|round|repend|about|set-net|append|join|rejoin|reform|'
01680             r'remold|charset|array|replace|move|extract|forskip|forall|alter|'
01681             r'first+|also|take|for|forever|dispatch|attempt|what-dir|'
01682             r'change-dir|clean-path|list-dir|dirize|rename|split-path|delete|'
01683             r'make-dir|delete-dir|in-dir|confirm|dump-obj|upgrade|what|'
01684             r'build-tag|process-source|build-markup|decode-cgi|read-cgi|'
01685             r'write-user|save-user|set-user-name|protect-system|parse-xml|'
01686             r'cvs-date|cvs-version|do-boot|get-net-info|desktop|layout|'
01687             r'scroll-para|get-face|alert|set-face|uninstall|unfocus|'
01688             r'request-dir|center-face|do-events|net-error|decode-url|'
01689             r'parse-header|parse-header-date|parse-email-addrs|import-email|'
01690             r'send|build-attach-body|resend|show-popup|hide-popup|open-events|'
01691             r'find-key-face|do-face|viewtop|confine|find-window|'
01692             r'insert-event-func|remove-event-func|inform|dump-pane|dump-face|'
01693             r'flag-face|deflag-face|clear-fields|read-net|vbug|path-thru|'
01694             r'read-thru|load-thru|do-thru|launch-thru|load-image|'
01695             r'request-download|do-face-alt|set-font|set-para|get-style|'
01696             r'set-style|make-face|stylize|choose|hilight-text|hilight-all|'
01697             r'unlight-text|focus|scroll-drag|clear-face|reset-face|scroll-face|'
01698             r'resize-face|load-stock|load-stock-block|notify|request|flash|'
01699             r'request-color|request-pass|request-text|request-list|'
01700             r'request-date|request-file|dbug|editor|link-relative-path|'
01701             r'emailer|parse-error)$', word):
01702             yield match.start(), Keyword.Namespace, word
01703         elif re.match(
01704             r'(halt|quit|do|load|q|recycle|call|run|ask|parse|view|unview|'
01705             r'return|exit|break)$', word):
01706             yield match.start(), Name.Exception, word
01707         elif re.match('REBOL$', word):
01708             yield match.start(), Generic.Heading, word
01709         elif re.match("to-.*", word):
01710             yield match.start(), Keyword, word
01711         elif re.match('(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$',
01712                       word):
01713             yield match.start(), Operator, word
01714         elif re.match(".*\?$", word):
01715             yield match.start(), Keyword, word
01716         elif re.match(".*\!$", word):
01717             yield match.start(), Keyword.Type, word
01718         elif re.match("'.*", word):
01719             yield match.start(), Name.Variable.Instance, word # lit-word
01720         elif re.match("#.*", word):
01721             yield match.start(), Name.Label, word # issue
01722         elif re.match("%.*", word):
01723             yield match.start(), Name.Decorator, word # file
01724         else:
01725             yield match.start(), Name.Variable, word


Member Data Documentation

Definition at line 1631 of file other.py.

string MoinMoin.support.pygments.lexers.other.RebolLexer.escape_re = r'(?:\^\([0-9a-fA-F]{1,4}\)*)' [static]

Definition at line 1639 of file other.py.

Definition at line 1632 of file other.py.

MoinMoin.support.pygments.lexers.other.RebolLexer.flags = re.IGNORECASE|re.MULTILINE [static]

Definition at line 1635 of file other.py.

Definition at line 1633 of file other.py.

Definition at line 1630 of file other.py.


The documentation for this class was generated from the following file: