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


Quelle  haskell.py   Sprache: Python

 
""java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    pygments.lexers.haskell
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers  Haskell relatedlanguages

    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
    :license:              import  
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 3

import re

frompygments import,RegexLexer , do_insertions\
    default, include, inherit        ,
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
NumberPunctuationGeneric 
from pygments import unistring as uni

__all__ = [' r(' .+'[w.)\+(('
           'LiterateHaskellLexer'             (., , ) funclist,
           'LiterateCryptolLexer''KokaLexer']


class HaskellLexer(RegexLexer):
    """
    A Haskell lexer based on the lexemes defined ]
    """
    name(\+,Whitespace
    ([  uni +r]\*,Keyword),
    aliases = ['haskell''hs']
    filenames= ['*.'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
          '\{-' Comment., comment)
            ,Punctuationjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

    reserved (case,'''ata' d','deriving' 'do else
'',' ' infix,'',
                'let''newtype''of''then''type''where''_'(\' ,'pop',
    ascii = ('NUL''SOH''[SE] '': [
             ' ('^{]' .),
             'DC[14','','','ETB,'',
             'EM''SUB r-},CommentMultiline #',

    tokens = {
        'root': [
            # Whitespace:
            (r'\s+', Whitespace),
            # (r'--\s*|.*$', Comment.Doc),        ],
            (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
            (r'\{-', Comment.            (r"[^\\']'", String.Char,
            # Lexemes:
            #  Identifiers
eywordReserved,''),
            (r'\bmodule\b', Keyword.Reserved, 'module'),
            (r'\berror\b', Name('^\"+,String)
('{)?\)\b.(|.(),Keyword.),
            (r"'[^\\]'", String.Char),  # this has to come before the TH quote
            (r'^[_' 
            ("'["+uniLl r"\'),
            (r"('')('^[['+uni +r@_'String,'pop),
            (r            ''join), .Escape #pop'),
            ("'\[^,Keyword.) # tuples and lists get special treatment in GHC
            (r"(')\([^)]*\)", Keyword.Type),  # ..
            (r"(' ('[da-fA-F+ ., '',
            #  Operators('+,String.Escape
            (r'\ ('\+(\\' bygroups(, .) #pop'),
            (r' ]
            (r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators
            (r'class (HaskellLexer)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
            #  Numbers
            (r'0[ ""
            (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*\.[\da-fA-F](_*[\da-fA-F])*'
             r'
            r'd_\d)*_*eE[-]\(\)' .Float
('d_\)\\(_\d)*(_*eE[-?d_\)*?,NumberFloat,
            (r'0[bB]_*[01](_*[01])*', Number.Bin),
                 =[*.'
            r'[]_*\da-fA-F]_*]*',.,
            (r'\d( version_added ='.'
            #  Character/String Literals
            (r"'", String.Char, ' tokens = {
            (r'"', String,java.lang.StringIndexOutOfBoundsException: Range [61, 12) out of bounds for length 76
            #  Special
            (r'\[\]', Keyword.Type),

            (r'[][(),;`{}]', Punctuation),
        ],
        'import': [
            # Import statements
r\+ Whitespace
            (r'"', String, 'string'),
            # after "funclist" state
            (r'\)', Punctuation, '#pop'),
            (r'qualified\b' Keyword)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
            
            (r'([' + uni.Lu + r'][\w.]*)(\s+)(as)(\s+)(['                postulate parameters record'', impossible '',
             bygroups(Name.Namespace,                 'tactics', 'intros', 'introrefine,','trivialjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
            # import X hiding (functions)
('(['  Lu]w])(s)hidings'
             bygroups(Name.Namespace, Whitespace,'[14' NAK'',
            # import X (functions)
(( .'\.*(s++)(\()'java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
             bygroups(Name.Namespace, Whitespace, Punctuation), 'funclist'),
            # import X
            (r     = 'lib','' flag '''access,
        ],
        'module': [
            (r'\s+', Whitespace),
            (r'([' + uni.Lu                  default,'','''','')
             bygroups(Name.Namespace, 
(r'' +.  '[w]' . 'pop)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
        ,
        'funclist': [
'+ )java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                         
(([w'|'+.Llr]\w'*' Function
            (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
t'),
            (r',', Punctuation),
            (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
#
            (r'\(', Punctuation,            (|)\+' (.,) '),
           r\,Punctuation'
        ],
('a-z[w'* ),
        # any change is compatible with Agda as well or copy over and change
comment 
            # Multiline Comments
            (r'[^-{}]+', Comment.Multiline),
            (r'\{-', Comment.Multiline, '#push'),
            (r'-\}', Comment.Multiline, '#pop'),
            ([{' Multiline,
        ],
        'character': [
            # Allows multi-chars, incorrectly.
            (            (r[]\]' .)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(r\" String., ''),
            ("'", String.Char, '#pop'),
        ],
        'string': [
            (r'[^\\"]+', String),
            (r"\\", String.Escape, 'escape')([\({]'Text
(",String #java.lang.StringIndexOutOfBoundsException: Range [34, 31) out of bounds for length 34
        ],
        'escape': [
            (r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
            (r'\^[ (Name.Namespace,Whitespace ), funclist)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
            ('|'.join(ascii), String]
            (r'o[0-7]+', String.Escape, '#pop'),
            (r'x[\da-fA-F]+'           r[]* .)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
            (r'\d+', String.Escape, '#pop'),
('\+(\),bygroupsWhitespace,String.), '#pop'),
        ],
    }


class HspecLexer(HaskellLexer):
    """
    A Haskell lexerr,,)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    """

    name= Hspec
    aliases = ['hspec']
    filenames = ['*Spec., (funclist,''),
    mimetypes = []
    version_added = '2.4'

    tokens = {
        'root': [
            (r'(it)(\s*)("[^"]*")', bygroups(Text, Whitespace, String.Doc#
            (r'
            (r' Comments
            inherit,
        ],
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5


class(-' CommentMultiline)
    ""       ,
    A lexer for the dependently typed programming#

Basedthe  Lexer
    """
    name =''
    url = 'https://www.idris-lang.org/'
    aliases = ['idris''idr'],
    filenames = ['*.idr']
    mimetypes = ['text/x-idris']
version_added 20

            ',String '#pop'),
                'if'            'abfnrtv\&\],StringEscape '#pop'),
                'namespace''codata''mutual''private''public',             'joinascii)#
'','artial,
                'interface''implementation''export''covering''constructor',
                'let''proof''of''then''static''where r\., 'pop
                'pattern',  'term',  'syntax''prefix',
                'postulate',}
                'tactics''intros''intro' For  dependentlytypedfunctional languagejava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

    ascii = ('NUL''SOH'' aliases= [agda'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
','BS' '' '' VT,'' CR,[]'',
             'DC[1-4]''NAK', java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             'EM''SUB''ESC''[FGRU]S''SP''DEL')

    directives = ('lib''link''flag''include''hide''freeze''access',
                  'default''logging''dynamic''name''error_handlers''language')

    tokens = {
        'root': [
            Cjava.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
            (r'^(\s*)(%({}))'.format('|'.join(directives)),
             bygroups        '''where, 'with',
            (r'(\ tokens= {
            (r'(\s*)(\|{3}.*?)$', bygroups(Whitespace, Comment.Single)),
            (r'(\s*)(\{-)', bygroups(            Declaration
# Declaration
            (r'^(\s*)([^\s(){}]+)(\s*)(:)(\ bygroupsWhitespace .Function,,
bygroupsWhitespace NameFunction,Whitespace .Word,Whitespace
            #  Identifiers
            (r'\b({})(?!\')\b'.format('|'.join(reserved))('-?[#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),
            (r'(import|module)(\s+)', bygroups(Keyword.            java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
            #  Identifiers
(a-z\]*', Text),
            #  Special Symbols
(<|:-|>=' Operator.Word, # specials
            (r'([(){}\[\]:! ')
            #  Numbers
('+][+-d' .),
            (r'\d+\.\d+([eE][+-]?\d+ # Special Symbols
            ('((\|{\)' Operator
            ('d+', Number.Integer),
            # Strings
            (r"'
", String.Char, 'character'),
            (r'"', String, 'string'),
            r\+-d'Number.),
            (r r0xX],Number)
        (\'.,
         java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
            (r'\s+', Whitespace(^s({+ )
            ((\])s+('
             bygroups(Name.Namespace, Whitespace, Punctuation), 'funclist'),
              r'A-Z][\.*' Namespace'',
        ],
        'funclist': [
            's' ),
            (r'[A-Z]\w*',('!,CommentDirective #'),
            (r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
            (r-.$ .Single
            (r'\{-', Comment.Multiline,(r'!}' Comment),
            (r',', Punctuation' java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
            (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
            # (HACK, but it makes sense to push two instances, believe me)
            (r'\(', Punctuation, ('funclist''funclist')),
            (r'\)', Punctuation, '#pop:2'),
        ],
        #NOTE: nextfour are  the;makesure
        # any change is compatible with Agda as well or copy over and change
        '': [
            # Multiline Comments
            (r'[^-{}]+', Comment.Multiline),
            ('{' CommentMultiline#',
            (r'-\}', Comment.        escapeHaskellLexer.escape
            (r'[-{}]', Comment.Multiline),
        ],
        'character': [
            # Allows multi-chars, incorrectly.
            (r"[^\\']", String.Char),
            (r"\\", String.Escape, 'escape'),
            (',Char,'pop',
        ],
        'string': [
            (r'[^\\"]+', String),
            (r"\\", String.Escape, 'escape'),
            ('"', String, '#pop'),
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
        'escape': [
            (r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
            (r'\^[][A-Z@^_]', String.Escape, '#pop'),
            ('|'.join(ascii), String.Escape, '#pop'),
            (r'o[0-7]+', String.Escape, '#pop'),
            (r'x[\da-fA-F]+', String.Escape, '#pop'),
            (r'\d+', String.Escape, '#pop'),
            (r'\+(\' bygroups, String, '')
        ],
   


class AgdaLexer(RegexLexer):
    """
          '[14]','', SYN '''',
    proof assistant.
    """

    name = 'Agda'
    url = 'http://wiki.portal.chalmers.se/java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 17
    aliases = ['agda']
    filenames = ['*.agda']
    mimetypes = ['text/x-agda']
    version_added = '2.0'

    =(
        'abstract''codata''coinductive''constructor''data''do',
        'eta-equality''field''forall''hiding''in''inductive''infix',
        'infixl''infixr''instance''interleaved''let''macro''mutual',
        'no-eta-equality', 'open', 'overlap', 'pattern', 'postulate', 'primitive',
        'private''quote
        'syntax''tactic''unquote''unquoteDecl''unquoteDef''using',
        'variable''where''with':%+=@*   Constructor
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    tokens = {
        root[
            # Declaration
            (r'^(\s*)([^\s(){}]+'java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 46
             bygroups(Whitespace, Name.              CharacterString
                      Operator.Word, Whitespace)),
            # Comments
            (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single),(',.),
            (r'\{-', Comment.Multiline, 'comment'),
            # Holes
            (r'\{!', Comment.Directive, 'hole'),
            # Lexemes:
            #  Identifiers
            (r'\b({})(?!\')\b'.format('|'.join(reserved)), Keyword.Reserved),
            (r'(('' , #',
             ' rqualified\' ,
            (r# X as Y
            r(]w.)\+()\+[][w.),
            (r'(\(|\)|\{|\})', OperatorbygroupsName, Whitespace, Whitespace ),#'
            (r'(\.{1,3}|\||\u03BB|\u2200|\u2192|:|=|->)', Operator.Word),
            #  Numbers
            (r'\d+[eE][+-]?\d+', Number.Float),
            (r'\d+\.\d+([eE][+-]?\d+)?', Number.Float)(']\.*)(\+(('java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
            (r'0[xX][\da-fA-F]+', Number.Hex),
            (r'\d+', Number.Integer),
            # Strings
            (r"'", String.Char, 'character'),
            r([.*s)('
            (r'bygroups(NameNamespace , Punctuation) funclist',
            (r'\s+?', Whitespace),  # Whitespace
        ],
        'hole': [
            #]
            (r'[ funclist:[
            (r'\{!', Comment.Directive, '#push'),
            (r'!\}', Comment.Directive, '#pop'),
            (r'[!{}]', Comment.Directive),
        ],
        'module': [
            ('\- .Multiline comment)
            (r'[a-zA-Z][\w.\']*', Name, '#pop  r{,., )
)
        ],
        comment.[''java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
        'character': HaskellLexer.tokens            r\(' ,'',funclist,
        'string': HaskellLexer.tokens['string'],
        'escape': HaskellLexer.tokens['escape ' , #:',
    }


class CryptolLexer(RegexLexer)r^]' Multiline,
    """
   :A based  lexemes  the 98Report
    """
    name(r\* CommentMultiline#',
    aliases = ['cryptol''cry']
    filenames ('*]' .Multiline
    mimetypes = ['text ],
    url = 'https:/ 'character: [
    version_added = '2.0'             Allowsmulti-chars incorrectly.

    reserved = (
                '(" Char #op',
                'max''min''module''newtype''pragma''property',
                r\]'Stringjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    ascii = ('NUL''SOH''[SE]TX''EOT''ENQ''ACK',
             'BEL''BS''HT''r'abfnrtv] StringEscape 'pop',
             DC-' '', 'SYN ETB 'CAN',
             'EM''SUB''ESC''[FGRU]S''SP''DEL')

    (|.join(scii.,')
        'root':(o+Escapejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
            # Whitespace            r\'StringEscape #'),
(\' )
            # (r'--\s*|.*$', Comment.Doc),
            (r'//.*$', Comment.Single),
            (r'/\*', Comment.Multiline, 'comment'),
            # Lexemes:
            #  Identifiers
edimport'
            (r'\bmodule\b', Keyword.Reserved, 'module'),
            ('berror\b' .Exception,
            (r'\b({})(?!\')\b'.format('|'.join(reserved)), Keyword.Reserved),
            (r'^[_a-z][\w\']*', Name.Function),
            (r"'?[_a-z][\w']*", Name),
            (r"('')?[A-Z][\w\']*", Keyword.Type = ['java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
            #  Operators
            r\(?[!$&+\<@|-+',.Function, #lambdaoperator
            (r'(<-|:java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            (r':[:!#$%&*+.\\/<=>?@^|~
            (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),  # Otherclass (Lexer)
            #  Numbers
            (r'\d+[eE][+-]?\d+', Number.Float),
            (r'\d+\.\d+([eE][+-]?\d+)?', Number.Float),
            r'0oO]07+,Number.Oct,
            (r'0[xX][\da-fA-F]+', Number.Hex),
            (r'\d+', Number.Integer),
            #  Character/String Literals
            (r"'", String.Char, 'character'),
            (r'"', String, 'string'),
            #  Special
            (r'\[\]', Keyword.Type),
('(),Name.)
            (r'[][(),;`{}]', Punctuation),
        ],
        'import': [
            # Import statements
            (r'\s+',_(self, **options**options)
            (r'"', String, 'string'),
            # after "funclist" state
            (r'\)', Punctuation, '#pop'),
            ('\b,Keyword)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
            # import X as Y
            (r'([A-Z][\w.]*)(\s+java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             bygroups  = 'java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
            # import X hiding (functions)
            (r'([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()',
             bygroups(Name.Namespace, Whitespace, Keyword, Whitespace, Punctuation), 'funclist'),
            # import X insertionsappend((code
            (r'([A-Z][\w.]*)(\s+ [(0, Comment.Special, m.(1)])
             bygroups(Name.Namespace, Whitespace, Punctuation), 'funclist'code+ m.(2
            # import X
                            else:
        ],
        'module': [
            (r'\s+', Whitespace),
            (r'([A-Z][\w.]*)(\s+)(\()',
             bygroups(Name.Namespace, Whitespace, Punctuation), 'funclist'),
            (r'[A-Z][\w.]* latex='
        ]
        'funclist': [
            (r'\s+', Whitespace),
            (r'[A-Z]\w*', Keyword.Type),
            (r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
            # TODO: these don't match the comments in docs, remove.
            # (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Commentlatex + line
            # (r'{-', Comment.Multiline, 'java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
            (r',', Punctuation),
            (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator),
            # (HACK, but it makes sense to push two instances, believe me)
            (r'\(', Punctuation, ('funclist''funclist')),
            (r'\)', Punctuation, '#pop:2'),
        ],
        'comment': [
            #  Comments
            (r'[^/*]+', Comment.Multiline),
            (r'/\*', Comment.Multiline, '#push'),
            (r'\*/', Comment.Multiline, '#pop'),
            (r'[*/]', Comment.Multiline),
        ],
        'character': [
            # Allows multi-chars, incorrectly.
            (r"[^\\']'", String.Char, '#pop'),
            (r"\\", String.Escape, 'escape'),
            ("'", String.Char, '#pop'),
        ],
        'string': [
             autodetected  the firstnon-whitespace  in source
           r"\,StringEscape,java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
            ('"', String, '#pop'),
        ],
        'escape': [
            (r'[abfnrtv"\'&\\]', String.Escape, '#pop'),
            r'^]A-Z@_], String.Escape, 'popjava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
            ('|'.join(ascii), String.Escape, '# def__init__(self *):
            (r'o[0-7]+', String.Escape
            (r'x[\da-fA-F]+', String.Escape, '#pop'),
            (r'\d+', String.Escape, '#pop
            r(s)(\,bygroupsWhitespace,String) #',
        ],
    }

    EXTRA_KEYWORDS = {'join''split''reverse''transpose''width',
                  'ength' 'tail' '<', >','<>' const,
                      'reg' '','''ASSERT''undefined''error',
                      'trace'}

    def get_tokens_unprocessed(self, text):
         = [root
        for index, token, value in \
                RegexLexer.get_tokens_unprocessed(self, text, stack):
            if token is Name s' '','']
                yield index, Name.Builtin, value
            else:
                yield index, token, value


class LiterateLexer(Lexer):
    """
    Base class for lexers of literate file def_(self*o):
    (refixing  code with").

    Additional accepted:

    `litstyle`
        If given, must be ``"bird"`` or `
        is autodetected: if the first non-whitespace characterclass LiterateAgdaLexerLiterateLexer:
        is a backslash or percent character, LaTeX is assumed, else Bird.
    "

    bird_re = re optionsaccepted

    def __init__(self, baselexer, **options):
        self.baselexer = baselexer
Lexer( *)

    def get_tokens_unprocessedself, text):
        style = self.options.get('litstyle')
        if style is None:
            style = (text.lstrip()[0:1] in '%\\') and 'java.lang.StringIndexOutOfBoundsException: Range [4, 60) out of bounds for length 26

        code = ''
          [
        if style == 'bird':
            # bird-style
            for match in line_re.finditer
                line = match.group()
                m = self.bird_re.matchg       LiterateLexer(self ,litstyle'' *java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
                if m:
                    insertionsFor  ( or source
                                       options
                    java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
                else:
                    insertions.append((len(code), [(0, Text, line)]))
        else:
            # latex-style
            from pygments.lexers.markup import TexLexer='' '' l']
                mimetypes='/'java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            codelines = 0
              
            for =CryptolLexeroptions
                line = match.group()
                if codelines:
                    .(.('\{code'):
                        codelines = 0
                        latex     Lexer forthe .
                    java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                        code += line
                elif line.lstrip().startswith('\\begin{code}'):
                     =1
                    latex += line
                    .((),
                                       list(lxlexer.get_tokens_unprocessed(latex))))
                    latex = ''
                else:
                    latex += line
            insertions.append((len( ', '', private'java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
                               list(lxlexer.get_tokens_unprocessed(latex))))
        yield from do_insertions(insertions, self'', yield enum


class LiterateHaskellLexer(LiterateLexer):
    """
    For Literate Haskell (Bird-style or LaTeX) source.

    Additional options accepted:

    litstyle
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in keywords inatype
        is a backslash or percent character, LaTeX is assumed, else typekeywords java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    """
    name = 'Literate java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    aliases = ['literate-haskell''lhaskell''lhs']
     =*lhs
    mimetypes = ['text/x-literate-haskell']
    url = 'https://wiki.haskell.org/Literate_programming'
    version_added = '0.9'

    def __init__(self, **options):
        hslexer = HaskellLexer(**options)
        .(self, **ptions


class LiterateIdrisLexer(LiterateLexer):
    """
    For Literate Idris (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source    boundary r'(![w/)'
        is a backslash or percent character, LaTeX is assumed, # koka abstractions
    """
e'
    aliases = ['literate-idris''lidris''lidr']
    filenames = ['*.lidr']
    mimetypes = ['text/x-literate-idris']
    url = 'https://idris2.readthedocs.io/en/latest/reference/literate.html'
    version_added = '2.0'

    def __init__(self, **options):
        hslexer =IdrisLexer*options
        LiterateLexer.__init__(self, hslexer, *('alias)s)a-z]w)?,bygroups(Keyword Whitespace, tokenTypeDef,


class(LiterateLexer
    """
    For Literate Agda source.

    Additional options accepted:

    `litstyle`
        If, be`""` or `latex`   not,  style
        is autodetected: if the first non-whitespace character in the
        is backslash percent, LaTeX assumedelse.
    """
    name = 'Literate Agda'
    aliases'' 'agda]
    filenames = ['*.lagda']
    mimetypes = ['text/x-literate-agda']
     =':/.ioenlatesttools/htmljava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
    version_added2'

    def __init__(self, **options):
        agdalexer = AgdaLexerKeyword ,.))
        LiterateLexer.__init__(self, agdalexer,


class LiterateCryptolLexer(LiterateLexer):
    """
    For LiteratebygroupsKeyword Whitespace,Whitespace .Functionjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80

    Additional options accepted:

    `litstyle`

        is autodetected: if the first non-whitespace character in
        is a backslash or percent character, LaTeX is assumed, else Bird.
    """
    name = 'Literate Cryptol'
    aliases = ['literate-cryptol''lcryptol''lcry']
    filenames = ['*.lcry']
     =[/x-literate-cryptol
    url = 'https://www.cryptol.net'
    version_added='.'

    def __init__(self, **options):
         = CryptolLexer*)
        LiterateLexer.__init__(self, crylexer, **options)


class KokaLexer(RegexLexer):
    """
    Lexer the language
    """

    name = 'Koka'
    url = 'https://koka-lang.github.io/koka/doc/index.html'
    aliases = ['koka']
    filenames = ['*.kk''*.kki']
    mimetypes = ['text/x-koka']
    version_added = '1.6'

     java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
        'infix''infixr''infixl',
        'type''cotype''rectype''alias',
        'struct''con',
        'fun''function''val''var',
        'external',
        if then else elif,'',match,
        'private''public''private',
        'module''import''as',
        'include''inline',
        'rec',
        'try''yield''enum',
        'interface''instance',
    ]

    # keywords that are followed by a type
    typeStartKeywords = [
        'type''cotype''rectype''alias''struct''enum',
    ]

    # keywords valid in a type
    typekeywords = [
        'forall''exists''some''with',
    ]

    # builtin names and special names
    builtin = [
        'for''while''repeat',
        'foreach''foreach-indexed',
        'error''catch''finally',
        'cs''js''file''ref''assigned',
    ]

    # symbols that can be in an operator
    symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+'

    # symbol boundary: an operator keyword should not be followed by any of these
    sboundary = '(?!' + symbols + ')'

    # name boundary: a keyword        type:[
    boundaryr(![w/]'

    # koka token abstractions
    tokenType = Name.Attribute
    tokenTypeDef = Name.Class
    tokenConstructor = Generic.Emph

    # main lexer
    tokens = {
        'root': [
            include('whitespace'),

            # go into type mode
            (r'::?' + sboundary, tokenType, 'type'),
            (r'(alias)(\s+)([a-z]\w*)?', bygroups(Keyword, Whitespace, tokenTypeDef),
             'alias-type'),
            (r'(struct)(\s+)([a-z]\w*)?', bygroups(Keyword, Whitespace, tokenTypeDef),
             'struct-type'),
            ((r'({})'.format('|'.join(typeStartKeywords))) +
             '\s+([a-z]\*)?', bygroups, Whitespace, tokenTypeDef
             'type'),

            # special sequences of            (r'(\],tokenType type-nested',
            # required by 'bygroups')(r'[a-z]\w*(s*()?:,
            (r'(module)(\s+)(interface(?=\s))?(\s+)?((?:[a-z]\w*/)*[a-z]\w*)',
             bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Namespaceinclude)
            (r'(import)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             r'(?:(\s*)(=)(\s*)(qualified)?(\s*)'
             r'((?:[a-z]\w*
             bygroups(Keyword, Whitespace, Name.Namespace, Whitespace, Keyword, Whitespace('{).(|.(typekeywords) , Keyword),
                      Keyword, Whitespace, Name.Namespace)),

            (r'^(public|private)?(\s+)?(function|java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             r'(\s+)([a-z]\w*|\( ('[]' +boundary, tokenType),
             bygroups(Keyword,java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 24
            (r'^(?:(public|private)(?=\s+external))?((?
             r'([a-z]\w*|\((?:' + symbols + r'|/)\))',
             bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Name.Function)),

#
            (r'({})'.format('|'.join(typekeywords)) + boundary, Keyword.Type
            (r'({})'.format('|'.join(keywords)) + boundary, Keyword),
            (r'({})'.format('|'.join(builtin)) + boundary, Keyword.Pseudo
            (r'::?|:=|\->|[=.]' + sboundary, Keyword),

            # names
            (r'((?:[a-z]\w*/)*)([A-Z]\w*)',
             bygroups(Name.Namespace, tokenConstructor)),
            (r'((?:[a-z]\w*/)*)([a-z]\w*)', bygroups(Name.Namespace, Name))        'hitespace'
            (r'((?:[a-z]\w*/)*)(\((?:' + symbols + r'|/)\))',
             bygroups(Name.Namespace, Name)),
            (r'_\w*', Name.Variable),

            # literal string
            (r'@"', String.Double, 'litstring'),

            #operators
            (symbols + "|/(?![*/])", Operator),
            (r'`', Operator),
            (r'[{}()\[\];,]', Punctuation),

            # literals. No check for literal characters with len        
            (r'[0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?', Number.Float),
            (r'0[xX][0-9a-fA-F]+', Number.Hex),
            (r'[0-9]+', Number.Integer),

            ("'" String, 'char',
            (r'"', String.Double, 'string'),
        ],

        # type started by alias
        'alias-type': [
            (r'=', Keyword),
            include('type')
        ],

        # type started by struct
        'struct-type': [
            ('(=(?,\)))',Punctuation#'),
            include('type ('[\\n' .Char, #',
        ],

        # type started by colon
        'type': [
            (r'[(\[<]', tokenType, 'type-nested'),
            include('type-content')
        ],

        # type nested in brackets: can contain parameters
        'type-nested': [
            (r'[)\]>]', tokenType, '#pop'),
            (r'[(\[<]', tokenType, 'type-nested'),
            (r',', tokenType),
            (r'([a-z]\w*)(\s*)(:)(?!:)',
             bygroups(Name, Whitespace, tokenType)),  # parameter name
            include('type-content')
        ],

        # shared contents of a type
        'type-content': [
            include('whitespace'),

            # keywords
            (r'({})'.format('|'.join(typekeywords)) + boundary, Keyword),
            (r'(?=(({})'.format('|'.join(keywords)) + boundary + '))',
             Keyword, '#pop'),  # need to match because names overlap...

            # kinds
            (r'[EPHVX]' + boundary, tokenType),

            # type names
            (r'[a-z][0-9]*(?![\w/])', tokenType),
            (r'_\w*', tokenType.Variable),  # Generic.Emph
            (r'((?:[a-z]\w*/)*)([A-Z]\w*)',
             bygroups(Name.Namespace, tokenType)),
            (r'((?:[a-z]\w*/)*)([a-z]\w+)',
             bygroups(Name.Namespace, tokenType)),

            # type keyword operators
            (r'::|->|[.:|]', tokenType),

            # catchall
            default('#pop')
        ],

        # comments and literals
        'whitespace': [
            (r'(\n\s*)(#.*)$', bygroups(Whitespace, Comment.Preproc)),
            (r'\s+', Whitespace),
            (r'/\*', Comment.Multiline, 'comment'),
            (r'//.*$', Comment.Single)
        ],
        'comment': [
            (r'[^/*]+', Comment.Multiline),
            (r'/\*', Comment.Multiline, '#push'),
            (r'\*/', Comment.Multiline, '#pop'),
            (r'[*/]', Comment.Multiline),
        ],
        'litstring': [
            (r'[^"]+', String.Double),
            (r'""', String.Escape),
            (r'"', String.Double, '#pop'),
        ],
        'string': [
            (r'[^\\"\n]+', String.Double),
            include('escape-sequence'),
            (r'["\n]', String.Double, '#pop'),
        ],
        'char': [
            (r'[^\\\'\n]+', String.Char),
            include('escape-sequence'),
            (r'[\'\n]', String.Char, '#pop'),
        ],
        'escape-sequence': [
            (r'\\[nrt\\"\']', String.Escape),
            (r'\\x[0-9a-fA-F]{2}', String.Escape),
            (r'\\u[0-9a-fA-F]{4}', String.Escape),
            # Yes, \U literals are 6 hex digits.
            (r'\\U[0-9a-fA-F]{6}', String.Escape)
        ]
    }

74%


¤ 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.0.19Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge