Back to index

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

List of all members.

Static Public Attributes

string name = 'Redcode'
list aliases = ['redcode']
list filenames = ['*.cw']
list opcodes
list modifiers = ['A','B','AB','BA','F','X','I']
dictionary tokens

Detailed Description

A simple Redcode lexer based on ICWS'94.
Contributed by Adam Blinkinsop <blinks@acm.org>.

*New in Pygments 0.8.*

Definition at line 506 of file other.py.


Member Data Documentation

Definition at line 514 of file other.py.

Definition at line 515 of file other.py.

list MoinMoin.support.pygments.lexers.other.RedcodeLexer.modifiers = ['A','B','AB','BA','F','X','I'] [static]

Definition at line 520 of file other.py.

Definition at line 513 of file other.py.

Initial value:
['DAT','MOV','ADD','SUB','MUL','DIV','MOD',
               'JMP','JMZ','JMN','DJN','CMP','SLT','SPL',
               'ORG','EQU','END']

Definition at line 517 of file other.py.

Initial value:
{
        'root': [
            # Whitespace:
            (r'\s+', Text),
            (r';.*$', Comment.Single),
            # Lexemes:
            #  Identifiers
            (r'\b(%s)\b' % '|'.join(opcodes), Name.Function),
            (r'\b(%s)\b' % '|'.join(modifiers), Name.Decorator),
            (r'[A-Za-z_][A-Za-z_0-9]+', Name),
            #  Operators
            (r'[-+*/%]', Operator),
            (r'[#$@<>]', Operator), # mode
            (r'[.,]', Punctuation), # mode
            #  Numbers
            (r'[-+]?\d+', Number.Integer),
        ],
    }

Definition at line 522 of file other.py.


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