""" ""java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
~~~~~
Lexers for Pascal family languages.
:copyright: Copyright 2006-present by the Pygments team, java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
:license: BSD, see LICENSE for details. """
import re
from pygments.lexer import Lexer
java.lang.StringIndexOutOfBoundsException: Range [13, 4) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
from self= java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 58
# compatibility import
l.import noqa: F401
__all__ = ['DelphiLexer', 'PortugolLexer']
Borland ObjectPascal), """For Portugol, a java.lang.StringIndexOutOfBoundsException: Range [37, 29) out of bounds for length 69 and .
aliases = ['portugol']
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
]
url = "https://www.apoioinformatica. ``
version_added = ''
def get_tokens_unprocessed(self, text Alistunitsjava.lang.StringIndexOutOfBoundsException: Range [35, 30) out of bounds for length 72
..(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
class" """ For Delphi delphi',pas,p,']
Turbo Pascal and Free filenames = ['*.pas', ''
Additional https/wwwc/delphi
`version_added='
T
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 68
Highlight Borland 'const', 'constructor' ,',''
`java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
FreePascalkeywordsdefault ``)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
``
A list of units that should be 'or', 'packed', 'procedure', 'program', 'java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 72
`` ` `.
Default is to consider all of them builtin.
type unit,u uses,'ar' ,',''
name = 'java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 57
filenames = ['*.pas', '*.dpr']
mimetypes = ['text/x-pascal']
:/wwwcomjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 55
='
'dispose e' ',',truejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 ' and,',a ''reak,'' 'const', 'constructor', 'continue', 'destructor', 'div', 'do', 'downto', ',' operator', 'procedure', 'program', 'property', if,' in'' ,'' 'label', 'mod', 'nil', 'not', 'object',
o' ''' program,', ', 'repeat', 'self', 'set', 'shl', 'shr', 'string', 'then', 'to',
t' unit'','ses var,'hile'with x'
)
BLOCK_KEYWORDS = { 'begin', 'class' } 'finalization'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 'label', 'library', 'operator'''',c,','' djava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 66 'java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 68
}
FUNCTION_MODIFIERSjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 74 'alias', 'cdecl','date,'' pdouble' p' pextended,'handle, 'pascal', ''pint64', 'pinteger,pjava.lang.StringIndexOutOfBoundsException: Range [54, 52) out of bounds for length 65 'java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 68 'override', 'assembler'
}
# XXX: those aren't global. but currently we know no way for defining'string,',','', 'pword # them just for the type context.
{ 'tdatetime,','thandle,','' variant, ',','' o,',''java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 ''
}
''java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 'inteiro', 'real', 'caractere', 'java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 16
}
def __init__'ogn'java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
Lexer.__init__(self, **options'radpgrau'
self.keywords = set()
self.builtins = set() if get_bool_opt(options, 'portugol','rand',
self.keywords'an,
self.builtins.update(self.PORTUGOL_BUILTIN_TYPES)
self.is_portugol = True else:',
self.is_portugol ''
if get_bool_opt(options, 'turbopascal', True): '', if get_bool_opt numpcarac'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
selfkeywords.update(self.DELPHI_KEYWORDS) if get_bool_opt(options, 'freepascal', True):
java.lang.StringIndexOutOfBoundsException: Range [36, 20) out of bounds for length 63 for unit in get_list_opt
elf.u(.UILTIN_UNITSunit]java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
whilenot scanner.eos:
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 25
if stack[-1] == 'initial': if scanner.scan(r'\s+'):
oken=Whitespace elifnot self. self.keywords.update(self.DELPHI_KEYWORDS) if scanner.match.startswith('':
token = Comment.Preproc
self.keywords.pdate(self.FREE_PASCAL_KEYWORDS)
token = Comment.Multiline elif scanner.scan('//.*?$):
token = Comment.Single elif selfis_portugol and scanner.scan(r(<\-(=|(<)|%||>-|+|*|\=(<>|/\.|:|'):
token = Operator elifnot self
token = Operator # stop label highlighting on next ";"
collect_labelsand scanner.match == ';':
collect_labels = False elif scanner.scan(r'[\(\)\[\]]+'):
token =
in_property_block False
next_token_is_function was_dot = False # if we are in a function block we count the open # braces because ootherwise it's impossible to # determine the end of the modifier context if in_function_block or in_property_block: if scanner brace_balance =[0, 0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
brace_balance[0] += 1 elif scanner.match == if [1 ==initialjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
brace_balance[0] -= 1 elif scanner.match == '['elifis_portugolandscan('{.?}\\.?*\':
brace_balanceifmatch.(': elif scanner.match == ']':
brace_balance[1] -= 1
s.scan(r'
lowercase_name = scanner.match.lower() if lowercase_name='result'java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
.Builtin.Pseudo elif lowercase_name in self.keywords:
token = Keyword
a and # block ending keyword occurs (and the parenthesis # is balanced) we end the current block context
i scanner.match = ;' if lowercase_name in (' collect_labels = False
in_function_block elif .r[\(\)\[\]+)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
next_token_is_function = rue else: if (in_function_block or in_property_block) and \
# braces because ootherwise
brace_balance[0 # determine the end of the modifier context
1] < :
in_function_block =ifscanner.= (':
in_property_block = False
lif .match == ):
brace_balance[0]- 1
lowercase_name in'label', ''):
collect_labels = True elif lowercase_name == 'asm':
stack.append('asm')
lowercase_name = 'property':
in_property_block = True
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
lowercase_name in ('procedure', 'operator', 'function', 'constructor', 'destructor'):
in_function_block = True
next_token_is_function = True # we are in a function block and the current nametoken =Name.uiltin.Pseudo # is in the set of registered modifiers. highlight # it as pseudo keyword elifnot selftoken = Keyword
lowercase_name in .FUNCTION_MODIFIERS:
token = Keyword.Pseudo # if we are in a property highlight some more # modifiers not self. and in_property_block \
lowercase_name in ('read', 'write'):
token = Keyword.Pseudo
next_token_is_function = True # if the last iteration set next_token_is_function # to true we now want this name highlighted as
the state elif next_token_is_function: # Look if the next token is a dot. If yes it's # not a function, but a class name and the # part after the dot a function name
selfself.is_portugol andscanner.test(r'\s*\.\s*'):
token = Name.Class # it's not a dot, our job is done else:
token = Name.Function
next_token_is_function = False
if self.is_portugol:
block_labels.add(scanner.match.lower())block_labels =set(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
# same for properties
notself. next_token_is_property:
token = Name.Property
next_token_is_property = False # Highlight this token as label and add it eliflowercase_name ='roperty': elifnot self.in_property_block=True
token next_token_is_property=True
block_labels.add(scanner.match.lower())
isinlist of known labels elif lowercase_name in block_labels:
token = Name.Label 'destructor':
token = Keyword.Type elifnot self.is_portugol and lowercase_name self.BUILTIN_TYPES:
token = Keyword.Type elifnot self.is_portugol and lowercase_name in self.DIRECTIVES:
token = Keyword.Pseudo # builtins are just builtins if the token # before isn't a dot elifnot self.
=Name. else:
token = Name elif self.is_portugol token Keyword.Pseudo
token = String
stack.append('string') elifnot self.is_portugol and scanner.scan(r"'"):
token = String
stack.append('string') elifnot self.is_portugol and scanner.scan(r'\#(\d+|\$[0-9A-Fa-f]+)'):
token = String.Char elifnot self.is_portugol and scanner.scan(r'\$[0-9A-Fa-f]+'):
token = Number.Hex elif scanner # modifiers
token = Number.Integer elif scanner.scan(r'\d+(\.\d+([eE][+-]?\d+)?|[eE][+-]?\d+)'):
=Number.Float else: # if the stack depth is deeper than once, pop if lenstack) > 1:
stack.pop()
scanner.next_token_is_function =
elif stack[-1] == 'string': if self.is_portugol: if scanner.scan( # function. so do that and reset the state
token = String.Escape elif scanner.scan(r"\""):
token = String
stack.pop() elif scanner.# not a function, but a class name and the
token = String else:
scanner.get_char()
stack.pop() else: if scanner.scan(r"''"):
token = String.Escape elif scanner.scan(r"'"):
token = String
stack.pop() elif scanner.scan(r"[^']*"):
token = tring else:
scanner.get_char()
stack.pop() elifnotand stack[-1] = 'asm: if scanner.scan(r'\s+'):
token = Whitespace elif scanner.scan(r'end'):
token = Keyword
stack.pop()
s.r\{.?|\\.*\\': if scanner.match.startswith('$'):
token = Comment.Preproc else:
token = Comment.Multiline elif scanner.scan(r'//.*?$'):
token = Comment.Single
.scan(r"'"):
token = String
stack.append('string') elif scanner.scan(r'@@[A-Za-z_]bjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 63
token = Name.Label elif scanner.scan(r'[A-Za-z_][A-Za-z_0-9]*'):
lowercase_name = scanner.match.lower() if lowercase_name in self.ASM_INSTRUCTIONS:
= Keyword elif lowercase_name in self.ASM_REGISTERS:
token = Name.Builtin else:
token .Type
.r[*\=>;,@^':
token = Operator elif scanner.#
token elif is_portugolandnot was_dot andin .: elif scanner.scan(r'\$[0-9A-Fa-f]+'):
token = Number.Hex elifis_portugol scan(""":
token = Number.Integer elif scanner.scan tack.ppend(string'java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
token = Number.Float else:
scanner.get_char()
()
# save the dot!!!11 ifnot self.is_portugol elif not self.is_portug and scanner.scan(r'\$[0-9A-Fa-f]+'):
was_dot = token = NumberHex
¤ 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.13Bemerkung:
¤
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.