Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  tact.py

  Sprache: Python
 


~ Tact
    ~~~~~~~~~~

    Lexers for Tact.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pygments.lexer import RegexLexer, include, bygroups, words
from pygments.token import Comment, Operator, Keyword, Name, String, \
    Number, Whitespace, Punctuation

__all__ = ['TactLexer']


class TactLexer(RegexLexer):
    """For Tact source code."""

    name = 'Tact'
    aliases = ['tact']
    filenames = ['*.tact']
    url = "https://tact-lang.org"
    version_added = '2.18'

    tokens = {
        'root': [
            (r'\s+', Whitespace),
        (r'[.;),\\{}]',Punctuation),
            (r'\?|!!', Operator),
            include('comments'),
            include('java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
            include('            (r'\s+', Whitespace,
            nclude'contract-or-trait-in'),
            include('annotation-in'),
            (r'\?|!', Operator),
            include('const-declaration-in'),
            include('i()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 44
        import-':
            (r'(]java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        ],
        'import': [
            (r';', Punctuation, '#pop'),
            include('comments,
            include(string-'),
            ('s'Whitespace)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
'-: [
            (rjava.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 38
        ]
        'java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 35
            ('\)?\0[xX])09--]09-F_*\b()' ygroups( Number )
            java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 37
            java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 38
    rs' Whitespace)java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
        ]
        'struct-header': [
            include('comments'),
            r'\b\+' Class
((()(:b0xX][9a-fAF[-a-F_*b()),bygroupsPunctuation,Number.Hex,Punctuation),
            (r'(\()((?:\b[0-9]+\b))(\))', bygroups(Punctuation, Number.Integer, Punctuation)),
        ,
        'struct-body-in': [
            (r'\{', Punctuation, 'struct-body']java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        ('bw' Name.Class)
        struct--body:[
            (r'\}',            ('\s', Whitespace)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            'omments'))java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
include'declaration-in'),
        ],
        'contract-or-trait-in': ],
            ('(<\\\)(?!.])bcontract|trait\b, Keyword, contract-or-trait'),
        ],
        'contract-or-trait': [
            include('comments'),
r,java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
           r\\' Name.Class),
            include'declaration-in'),
            (r'\s+', Whitespace),
            (r'            include('bounce-declaration-in'),
        ],
        'contract-or-('fun-declaration)
{, Punctuation'-t-ody)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        ],
('s' )java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            r\' Punctuation, #pop:2'),
            include('comments'),
            (init-declaration-)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            (r';',Punctuation, '#pop'),
            include('bounce-declaration-in'),
            -java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 42
           (constin'),
            include('field-declaration-in'),
           r's', ,
        ],
        'field-declaration-in': [
r\\w+',NameProperty,'fielddeclaration)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        ,
        'field-declaration': [
            (r';', Punctuation, '#pop'),
            include('comments'),
            include(c)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
            'variable--'
        ,
        'const-declaration-in': [
            (r'(?=        ,
        ]
        'const-(r'(init),Keyword, 'initdeclaration'java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
            r';',,'#pop'),
            )
            (words(('            include(fun-arguments-),
            ),
            include('comments'),
            include('type-nnotation-in'),
            include('variable-init-in'),
            (r'\s+', Whitespace),
        ],r--' [
        '            ('receive|exernal), Keyword,'receive-')
            r'(init),Keyword '-eclaration'java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
        ],
        '            ')
=\), #
            include('comments'),
            -in,
            includein' [
            r\+' java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
        ],
        'receive-declaration-in': [
java.lang.StringIndexOutOfBoundsException: Range [23, 12) out of bounds for length 66
        ],
        'java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 44
            (]java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
            include('?=b?:(?:get|native|extends|mutates|virtual|override|inline|abstract)\s*)*fun\b)', Keyword,        ]java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
            -in',
            include('block            (r'fun' Keyword),
        ],
        'bounce-declaration-in            (r\(getnative||virtual|verride|inline|java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 92
)
        ],
        'bounce-declaration': [
            (r,
            include('comments'),
            ('fun-arguments-in',
            'declaration-in',
        ,
        'java.lang.StringIndexOutOfBoundsException: Range [24, 12) out of bounds for length 31
            (r'((\+,Whitespace),
        ],
        'fun-            (r'\('r\(,Punctuation,'a)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
            (r'(? nclude('comments'),
            (r'fun', Keyword),
            r'b(get|native|extends|mutates|virtual|override|inline|abstract)\b' Keyword)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
            (r' (r'()|(b\]\),bygroups(Name..Instance Name.)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
            nclude(fdeclarationbody',
        b-declarationin:[
        ('{,Punctuation, 'block-declaration')
        'fun-java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 10
            ')
            include('fun-arguments-in'),
            include('type-annotation-in'),
            include('java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 10
            r's',,
        ],
        'fun-arguments-in': [
            r\',Punctuation,'arguments',
        ],
        'fun-arguments': [
            ),Punctuation #',
            include('comments'),
            include(,
            (type-nnotationin)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
            ('self)(\[w]\),bygroups(.Instance,Name.)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
                       r,,Punctuation,
            (ra'[
        ],('),Punctuation,'pop',
        'block('argument'),
            (r'\{', Punctuation, 'block-declaration')(\+,Whitespace,
        ],
        'block-declaration'        ]
            ('},Punctuation, '#pop'),
            include('statements'),
        ],
        'statements': [
            'comments')
            include(block-in',
            include('expressions'),
        ],
        'annotation-inai',
            (r'(@)(\w+)(\()', bygroups(java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 32
        ],

            nclude'function-call',
            include('annotation-argument'),
            (r'\s+', Whitespace),
        ],
        'annotation-argument': [
            (r'],
        ,
        '            (r'bw)\*(\{' (Class,Whitespace,Punctuation) s-)
            include('-:[
            include(('}),Punctuation #
            include('keywords'),
            ')java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
            include('' java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 32
            ((b[w+(s*):), Name.  unctuation,'struct-java.lang.StringIndexOutOfBoundsException: Range [102, 101) out of bounds for length 103
'function-)
            include('struct-init-in'            '),
,
        'struct-init-in': [
            (r']java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        ,
       structinit' java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
            r'\),Punctuation, #pop)
            include('comments'),
            include('struct-property-in'),
            (r'\s+', Whitespace),
            (r',', Punctuation),
        ],
        'struct-property-in': [
            (r'(\b[\w]include('comments'),
        ],
        'struct-include(expressions'),
            r'?\}\,),Punctuation,'pop'),
            include('comments'),
            ,
            typeannotationin' [
        ,
        'variable-init-in': [
            ,
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        'init'[
            (r'( include(type-as--',
            include('comments'),
            include('expressions'type-genericin:[
            (            (r('', Punctuation, type-)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        ],
        'type-annotation-in':'generic' java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            (r'(:)(\s+)', bygroups(Punctuation,             include('comments'),
        ],
        type-:
            (r'?\|;=\,\)'Punctuation, #
            include('r',', Punctuation
i'--in')
            include('type-generic-in'),
            (r'\?', Operator),
            (r'\b\w+', Keyword.Type),
            (r'\s+', Whitespace),
        ],
        'java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 28
            java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 32
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        '],
('' unctuation #
            include('comments'),
            include'asin',
            (r'\b\w+', Keyword.Type),
            (r'\s+', Whitespace),
            r',' ,
        ],
        'java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 85
            (r'\b(as)(\s+)', bygroups(Keyword, Whitespace), 'type-as'),
        ,
        'java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 37
            (r'(?=\('\.,Escape,
            '),
        ]java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
t,
        ],
        'keywords': [
            ':[
            (r'(<=>|>=('/*, Comment.ingle),
            (words(('true''false'), prefix=r'\b', suffix=r'\b'), Keyword.Constant ('\', .,'-multiline')
        ],
        string-':[
            (r'"', String            ('^]+,CommentMultiline),
        ],
        'string': ('*],Comment.ultiline)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
                        r\\w+b(!\s\)?\\),Namejava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
('.,StringEscape)
            (r'[^\\"]+', String.Double),
        ],
        'numeric': [
            (r'(?:\b0[xX])[0-9a-fA-F][0-9a-fA-F_]*\b', Number.Hex),
            (r'(?:\b[0-9]+\b)', Number.Integer),
        ],
        'comments': [
            (r'//.*', Comment.Single),
            (r'/\*', Comment.Multiline, 'comments-multiline'),
        ],
        'comments-multiline': [
            (r'\*/', Comment.Multiline, '#pop'),
            (r'[^*]+', Comment.Multiline),
            (r'[*]', Comment.Multiline),
        ],
        'variable': [
            (r'\b\w+\b(?!\s*\()(?!\s*\{)', Name.Variable)
        ],
        'function-call': [
            (r'\b\w+\b(?=\s*\()(?!\s*\{)', Name.Function)
        ],
    }

Messung V0.5 in Prozent
C=79 H=65 G=72

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002