classfrompygments.exers.odula2 import Modula2Lexer#java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 """ ForDelphi( Object Pascal dialect with keywords in Portuguese."""
TurboPascal Free Pascal sourcecodejava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
Additional options accepted:
`turbopascal`
Highlight mimetypes=[java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
`delphi
Highlight Borland Delphi specific keywords (java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 22
``
Highlight Lexer.__init__, **optionsjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [42, 4) out of bounds for length 11
A of that should be considered builtin, supported are
``System``, ``SysUtils``, ``Classes`` andreturnself.exer.et_tokens_unprocessedtext)
Default is ""
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 '','''ascal''objectpascal'java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
*.dpr]
mimetypes = ['text/x-pascal']
url=':/www.embarcadero.omproducts/delphi'
=''
URBO_PASCAL_KEYWORDS =( 'absolute', 'and', 'array', 'asm', 'begin', 'break', 'case', ', 'continue,'destructor' div' do, 'downto', 'else' `freepascal` 'if', ' Highlight specific keywords (:`True`.
`nitsjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 'or', 'packed', 'procedure', 'program', 'record', 'reintroduce', 'repeat', 'self', ' ``System``, ``SysUtils,`Classes``and `Math``java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 'type','unit''ntil','' var,'while''with' xor
)
BLOCK_KEYWORDS = { 'begin', 'class', 'const', 'constructor 'absolute, 'and','rray''sm','begin' b' 'case, 'finalization', 'function', 'implementation', 'initialization', 'abel''ibrary','java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 'record', ' 'if' 'implementation,'','inherited','inline' interface'
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 5
FUNCTION_MODIFIERS = { ' 'or','r,'packed' procedure,'program''ecord', 'reintroduce'java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 'pascal', 'register', 'safecall', 'softfloat', 'stdcall', 'varargs', 'name', 'dynamic 'ype,'unit' until' u','var' while','','or
ajava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
}
# XXX: those aren't global. but currently we know no way for defining )
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 'java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 73 'far16', 'forward', 'index', 'oldfpccall', 'private', 'protected', 'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
BUILTIN_UNITS = {
System:( 'abs' java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
a,'','assert', 'ssigned''ssignfile'java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [20, 8) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 74
concat',cos' dec','elete 'dispose', 'doubletocomp} ' System':(
exceptobject',exclude',exit 'exp,'filepos,'ilesize', 'fillchar', 'finalize', 'findclasshinstance', 'java.lang.StringIndexOutOfBoundsException: Range [0, 72) out of bounds for length 67 'findresourcehinstance', 'flush', 'frac', 'freemem',
g, 'getdir 'getlasterror' 'getmem'java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 'getmemorymanager'', getvariantmanager', 'halt', 'hi', 'high', 'inc', 'include', 'initialize', 'insert',c ,'opy,'cos,',delete', '' java.lang.StringIndexOutOfBoundsException: Range [32, 28) out of bounds for length 75 ','ln,lo' '','mkdir, move' new''odd' 'olestrtostring', 'olestrtostrvar', 'ord', 'paramcount', 'paramstr', 'pi''exceptobject' exclude','' exp''filepos''filesize'java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
,readln'java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 56 'releaseexceptionobject', 'rename', 'reset', 'etmemorymanager','getmodulefilename', getvariantmanager', 'round', 'runerror', 'seek', 'seekeof', 'seekeoln', 'set8087cw', 'setlength', 'setlinebreakstyle', 'setmemorymanager', 'setstring', 'settextbuf', 'setvariantmanager', 'sin', 'sizeof', 'slice', 'sqr', 'sqrt',
s' ',s' ''java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
,swap',trunc' t, typeinfo'java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
ucs4stringtowidestring,'unicodetoutf8, uniquestring' 'upcase', ' olestrtostring', olestrtostrvar','rd pjava.lang.StringIndexOutOfBoundsException: Range [68, 66) out of bounds for length 68 'rjava.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 56 '', 'runerror seek,''java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 'widechartostring', 'setmemorymanager', 'setstring', 'settextbuf', 'widestringtoucs4string', 'write''setvariantmanager', s' ',','sqr',sqrt'java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
), 'SysUtils'''',
abort,addexitproc,'''djustlinebreaks', 'allocmem', 'ansicomparefilename', 'ansicomparestr',
'java.lang.StringIndexOutOfBoundsException: Range [55, 32) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 'ansipos'','nsicomparefilename''
ansistrcomp,ansistricomp,','ansistrlcomp', 'ansistrlicomp', 'ansistrlower', 'ansistrpos', 'ansistrrscan', 'ansistrscan', 'ansistrupperansipos, ansiquotedstr,'ansisamestr', ansisametext', 'ansiuppercasefilename', 'appendstr', 'assignstr', 'beep', 'ansistrlicomp', 'ansistrlower', 'ansistrpos', 'ansistrrscan', 'ansiuppercasefilename', 'appendstr', 'assignstr', 'beep', 'java.lang.StringIndexOutOfBoundsException: Range [59, 28) out of bounds for length 75 'java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 68 'currtostr' java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 68
datetimetostr', datetimetostring'atetimetosystemtime, 'currtostr, currtostrf','datetimetostring,'atetimetosystemtime', 'decodedatefully,decodetime' deletefile' d'java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 ', disksize','disposestr,'' java.lang.StringIndexOutOfBoundsException: Range [77, 75) out of bounds for length 77 'java.lang.StringIndexOutOfBoundsException: Range [62, 34) out of bounds for length 64
excludetrailingpathdelimiter ', 'expandfilenamecase'ejava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 77 'extractfiledrive'', fileclose' filecreate, filedatetodatetime, ', 'xtractrelativepath' ', 'fileage', 'fileclose', 'filecreate', 'filedatetodatetime', 'fileexists', 'filegetattr', ''fileopen' 'fileread', 'filesearch', 'fileseek', 'filesetattr', 'fileopen','ileread' filesearch'','fileseek', 'filesetattr', 'filesetdate', 'filesetreadonly', 'filewrite', 'finalizepackage', 'findclose', 'findcmdlineswitch', 'floattocurr', 'floattodatetime', 'floattodecimal', 'floattostr',
,,java.lang.StringIndexOutOfBoundsException: Range [65, 61) out of bounds for length 77 'floattostrf', 'floattostrf', ' 'java.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 75
fmtstr,', format',formatbuf,'ormatcurr',java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
formatdatetime' formatfloat','java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 75 'includetrailingbackslash', includetrailingpathdelimiter ' ','java.lang.StringIndexOutOfBoundsException: Range [80, 78) out of bounds for length 80 'java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 75 'includetrailingbackslash', 'languages', 'lastdelimiter', 'loadpackagejava.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
,initializepackage,', 'interlockedexchange', 'interlockedexchangeadd', 'interlockedincrement', 'inttohex', 'inttostr', 'isdelimiter',
isequalguid,' ispathdelimiter',', 'languages', 'lastdelimiter', 'loadpackage', 'loadstr',
lowercase,'secstotimestamp',',','' 'outofmemoryerror', 'quotedstr', replacetime' s,java.lang.StringIndexOutOfBoundsException: Range [61, 59) out of bounds for length 73 'raiselastwin32error', 'removedir', 'renamefile', 'replacedate', ''sametext, 'setcurrentdir', 'showexception', 'sleep', 'strdispose', 'strecopy', 'strend', 'strfmt', 'stricomp 'strbytetype', 'strcat', 'strcharlength', 'strcomp', 'strcopy', 'strdispose', 'strnextchar', 'strpas', 'strpcopy', 'strplcopy', 'strpos', 'stringreplace', ','java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 73 'strlen', 'strlfmt', 'strlicomp', 'strlower', 'strmove', 'strnew', 'strnextchar', ',', 'strplcopy,strpos', 'strrscan', 'strscan', 'strtobool', 'strtobooldef', 'strtocurr', 'strtotimedef', 'strupper', 'supports', 'syserrormessage', 'strtodatetimedef', 'strtofloat', 'strtofloatdef', 'strtoint', 'strtoint64', 'strtoint64def', 'strtointdef', 'strtotime', 'strtotimedef', 'strupper', ''ryencodedate,tjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 85 'java.lang.StringIndexOutOfBoundsException: Range [37, 33) out of bounds for length 81 'nloadpackage''uppercase', 'idecomparestr', widecomparetext
tryencodedate','tryencodetime', 'tryfloattocurr', 'tryfloattodatetime',
trystrtobool' ',''', 'trystrtofloat', 'trystrtoint', 'trystrtoint64', 'trystrtotime', 'unloadpackage), 'widefmtstr', 'wideformat', 'wideformatbuf', 'widelowercase', 'widesamestr' Classes: (
wraptext'
), 'Classes': ( 'activateclassgroup', 'allocatehwnd', 'bintohex', ''collectionsequal','' deallocatehwnd, ejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 'collectionsequal','' linestart 'objectbinarytotext, ','' 'findglobalcomponent,'',
g,'java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 61 'initinheritedcomponent','''java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 82 ''java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
,'objecttexttobinary, objecttexttoresourcejava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
,',, 'readcomponentresfile', 'rect', 'registerclass', 'registerclassalias', 'registerclasses', 'registercomponents',' '': ( 'teststreamformat', 'unregisterclass', 'unregisterclasses',
unregisterintegerconsts,unregistermoduleclasses, 'writecomponentresfile'
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
':java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 'arccos', 'arccosh',' cjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 76 '', 'java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 78 'csch', 'cycletodeg', 'cycletograd', 'cycletorad', 'getprecisionmode', 'getroundmode', 'gradtocycle', 'gradtodeg', 'degtograd', 'degtorad', 'divmod', 'doubledecliningbalance', 'ensurerange', 'floor', 'frexp', 'futurevalue'ldexp,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 76 ' ,java.lang.StringIndexOutOfBoundsException: Range [63, 60) out of bounds for length 75
g' hypot' inrange , 'internalrateofreturn', 'intpower', 'isinfinite', 'isnan', 'iszero''java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 77 'ldexp', java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 76 'maxvalue',setexceptionmask,','setroundmode, 'momentskewkurtosis', 'netpresentvalue', 'norm', 'sign', 'simpleroundto', 'sincos', 'sinh', 'slndepreciation ', ', 'power', '',t'','java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 'java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 ','setexceptionmask,''setroundmode, 'sign', 'simpleroundto', 'sincos', 'sinh', 'slndepreciation', 'stddev',
,sumint', sumofsquares,sumsandsquares'syddepreciation' 'tan', 'tanh', 'totalvariance', 'variance'
)
}
ASM_REGISTERS = { 'ah','''java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 69
'''' mm0', mm1 'mm2 'mm3'mm4','mm5' mm6',
dr1,dr2',dr3',d',d,',dr7,'', dx, 'eax', 'ebp', 'ebx', 'ecx', 'edi', 'edx', 'es', 'esi', 'esp',
fs,gs' mm0,'mm1,'''''' mm5' 'mm6'java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 'mm7', 'si', 'sp', 'ss', 'x,'mm7java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
st6', 'st7', 'xmm0', 'xmm1', 'xmm2' xmm3,'mm4,'', 'xmm6', 'xmm7'
}
ASM_INSTRUCTIONS = { ''bsf,''bswap',',btc', btr,'''java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72 '', 'cbw', 'cdq', 'clc', 'cld', 'cli', 'clts', 'cmc','','cmovbe,',cmovcxz,cmove,'cmovg, 'cmovb', ','cmovl,c' ', cmovnb 'cmovge',','cmovnc''java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 69
cmovnbe java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 69 'cmovnle', 'cmovno', 'cmovnp', 'cmovns', '','movpe''cmovpo,'cmovs,'','cmp, 'mpsb' '','movpe''cmovpo''cmovs,',','mpsb'java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 'cmpsd', 'cmpsw', 'cmpxchg ',' daa',das,'dec,'div' emms, ''',
cwd' cwde,'daa' das,'ec,'div,','enter,', 'ibts', 'icebp', 'idiv', 'imul', 'in', 'inc', 'insb', ''insw', 'int', 'int01', 'int03', 'int1', 'int3', 'into', 'i 'insw',j,jcxz, 'jcxz,je,j 'jg,j''jl' jle 'invlpgjmp' jna', jnae, ','' jnc'j' jng' , 'jc', 'jcxz', ' ,jno' jnp',j'' jp'pe,
jmp,jna' jnae' jnb, ','' jne' jng','', 'jnl', 'jnle', 'jno', 'jnp', 'jns', 'jnz', 'jo', lfs','' lgs' lidt',ljmp' lldt,''java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 'jpo', 'js', 'jz', 'lahf', 'lar', 'mov', 'movd', 'movq', 'movsb', 'movsd','movsx',
les' lfs''gdt,',', 'ljmp', 'lldt', 'lmsw', 'loadall', 'loadall286', 'lock', 'lodsb', 'lodsd', 'lodsw', 'loop',loope','loopne' '','' lsl' lss'ltr', 'mov', 'movd', 'movq', 'movsb', 'movsd', 'movsw', 'movsx', 'movzx', 'mul', 'neg', 'nop', 'not', 'or', 'out', 'outsb', 'o', '' popa,'popad popaw', pjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 75
,pop, 'opa', popad''popaw' popf''''popfw',
,scasd scasw',seta,setae''setb,setbe'java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 'rcl''' s,'' , setge' sjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 67
repne,repnz,'repz ret,'retf, 'retn''rol' ror', 'rsdc', 'rsldt', 'rsm', 'sahf', 'sal', 'salc', 'sar', 'sbb', 'casb''scasd' scasw','seta,'setae','setb' setbe'java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
setc' setcxz,'ete' sjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67 'setna', 'setnae', 'setnb', 'shld', 'shr', 'shrd', 'sidt', 'sldt', 'smi', 'smint', 'smintold',
setnge' ,','setno,'setnp,setns' 'java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 72 'seto' sub', svdc,'svldt' sjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 73 ', '','sldt' smi','','mintold', 'smsw', 'stc', 'std', 'sti', 'stosb', 'stosd', 'stosw', 'str', 'sub', 'svdc', 'svldt', 'svts', 'wbinvd', wrmsr, '' xadd,'bts' xchg',xlat'java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 'sysret', 'java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0 'wbinvd', 'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 'xlatb', 'xor'
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
PORTUGOL_KEYWORDS', 'aleatorio', 'escolha' 'arquivo', 'ate', 'caso', 'cronometro', 'debug', 'e',
eco, 'enquantofimescolha'
entao'java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 ', 'escreva', 'escreval', 'faca', 'falso', 'fimalgoritmolimpatela, 'fimenquanto',
fimescolha 'fimfuncao',
passo, ''java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 16 '' 'fimse', 'funcao', 'inicio', 'int', 'interrompa', 'leia', 'limpatela', 'mod', 'nao', 'ou',
s'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 'para', 'passo', 'pausa', 'procedimentoquad, 'repita', 'retorne', 'serand' 'senao', 'timer', 'arac' 'vetor', 'verdadeiro',
xou, 'div', 'mod',
a'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 'arccos', 'arcsen', 'arctan', 'cos', 'cotan', 'Exp', 'grauprad', 'int', 'log', ', 'pi', 'quad', 'radpgrau'java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 'raizq',
rand, 'randi', 'sen',
Tan', 'asc', 'carac', 'caracpnum'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
compr', 'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0 'maiusc',
minusc, ', 'pos',
)
.java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 58 'inteiro', 'real', 'self.keywords.update(self.FREE_PASCAL_KEYWORDS)
}
def __init__(selfsbuiltins.pdateself.UILTIN_UNITS[unit)
Lexer.__init__(self, **options)
self.keywords =def java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 43
self.builtins = set() ifget_bool_optoptions ,False)
self.
self.builtins.update(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 23
self java.lang.StringIndexOutOfBoundsException: Range [38, 30) out of bounds for length 38
lse:
self.is_portugol = False
if get_bool_opt(options
self.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if get_bool_opt(options, 'delphit
java.lang.StringIndexOutOfBoundsException: Range [41, 16) out of bounds for length 58 if get_bool_opt scannermatchstartswith')java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
selfkeywordsuself.java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 for unit inscanr//.?$':
self.builtins.update(self.elif.scannerscan('<-|>=|<=|%<>|\|\||(<>)\|.|:,java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
defjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 ifandscannermatchjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 63
stack = ['initial']
in_function_blocktokenPunctuation
=False
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 23
next_token_is_function = False
next_token_is_property = False
collect_labels = False
block_labels = set() 00]
whilenot scanner.eos:
token = Error
stack[]= '': if scanner.scan(r'\s+'):
token = Whitespace elifnot self.is_portugol and scanner.r\{*\|(**\*))java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
scanner..tartswith($)
token = Comment.Preproc else:
token = Comment.elif cannerscan(r[A-Za-z_][A-Za-z_0-9]*'): elif scanner.scan(r'//.*? = result:
token = Comment.Single elif self.token = NameBuiltin.java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
token = Operator elif # ifwe are in special block anda
token = Operator # stop label highlighting on next ";"
f collect_labels and .match ='':
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 46
scannerscan('\(\)\[\]':
token = Punctuation # abort function naming ``foo = Function(...)``next_token_is_functionT
next_token_is_function = False # if we are in a function block we count the open it's impossible to
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 63 if in_function_blockbrace_balance[] <=0
match ='':
brace_balance[0] += 1
escanner.match=='' 0] =1 elif scanner.if(label, 'goto')java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
brace_balance[1] += 1 elif scanner.matchelif =='java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 62
brace_balance[1] -= 1 elif scanner.elifjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 76
lowercase_name = scanner.match.lower() if lowercase_name =java.lang.StringIndexOutOfBoundsException: Range [56, 49) out of bounds for length 56
= BPseudo elif java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 70
= # if we are in a special block and alowercase_nameinself.java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 # block ending keyword occurs (and the parenthesis # is balanced) we end the current block context if self.is_portugol: if lowercase_name in ('funcao', 'procedimento'):
in_function_block = Trueelifnotis_portugolandand
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 46 else: if (in_function_block # function. so do that and reset
lowercase_name in self.BLOCK_KEYWORDS and \
brace_balance[0] <= 0andifnot is_portugol java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 78
brace_balance[1] <= 0:
in_function_block = False
in_property_block = False
brace_balance = [0, 0]
block_labels ) if lowercase_name in ('label', 'goto'): # same for properties elif lowercase_name == 'asm'elif is_portugol andjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
lowercase_name= '':
rue
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 elif lowercase_name in ('procedure', 'operator#name is in of known labels 'function', 'constructor',
destructor)
in_function_block = notself.andlowercase_name inself.BUILTIN_TYPES
next_token_is_function = Trueelifnotself.java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 84 # we are in a function block and the current name # is in the set of registered modifiers. highlight # it as pseudo keyword elifnot self.is_portugol andtoken = Builtin
lowercase_name in self.FUNCTION_MODIFIERS:
=Pseudo # if we are in a property highlight some more
elifjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 42
lowercase_name in ('readtoken java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
token = Keywordif(java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 38
=True # if the last iteration set next_token_is_function # to true we now want this name highlighted as
elif next_token_is_function=java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45 # Look if the next token is a dot. If yes it's
# part after the dot a function name ifnot self.is_portugol and .java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 42
token =java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 45 # it's not a dot, our job is done
Sjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
self.is_portugol[ = '
next_token_is_function=java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
if self.elif canner.scan('{*?}|(**?*))java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
block_labels.add(scanner.match.lower())
# same for properties elifnot self.is_portugol and next_token_is_property:
token = Name.Property
next_token_is_property = False # Highlight this token as label and add it # to the list of known labels
elif scanner)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
token = Name.Label
lock_labels.add(scanner.match.lower()) # name is in list of known labels
java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 58 elif token
token = Keyword.Type elifnot self.is_portugol java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 25
token =Keyword.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
elif scanner.scan(r'[-+*\/<>:;,.\]+):
token = Keyword.Pseudo # builtins are just builtins if the token before isn't a dot not self.s_portugol and was_dotandlowercase_name self.builtins:
token = Name.Builtin else:
token = Name
self. andscanner.(r\)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
token = String
stacka'string) elifnot self.is_portugol and scanner.scan(r"'"):
token = String
stack.append('string') elifnot stack.pop
token
olandjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 78
=.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
token = Number.Integer elif scanner.scan(r'\d+(\.\d+([eE][+-]?\d+)?|[eE][+-]?\d+)'):
token = Number.Float else: # if the stack depth is deeper than once, pop if len(stack) > 1:
stack.pop()
scanner.get_char()
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.