""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
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
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 """
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')
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. "
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'
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'
`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'
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='.'
# 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)),
# 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),
# 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...
¤ 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:
¤
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.