diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/python/Pygments/py3/pygments/lexers | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers')
114 files changed, 12642 insertions, 12642 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/__init__.py b/contrib/python/Pygments/py3/pygments/lexers/__init__.py index 1d85337b83..9b89b6da3f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/__init__.py +++ b/contrib/python/Pygments/py3/pygments/lexers/__init__.py @@ -75,28 +75,28 @@ def find_lexer_class(name): return cls -def find_lexer_class_by_name(_alias): - """Lookup a lexer class by alias. - - Like `get_lexer_by_name`, but does not instantiate the class. - - .. versionadded:: 2.2 - """ - if not _alias: - raise ClassNotFound('no lexer for alias %r found' % _alias) - # lookup builtin lexers +def find_lexer_class_by_name(_alias): + """Lookup a lexer class by alias. + + Like `get_lexer_by_name`, but does not instantiate the class. + + .. versionadded:: 2.2 + """ + if not _alias: + raise ClassNotFound('no lexer for alias %r found' % _alias) + # lookup builtin lexers for module_name, name, aliases, _, _ in LEXERS.values(): - if _alias.lower() in aliases: - if name not in _lexer_cache: - _load_lexers(module_name) - return _lexer_cache[name] - # continue with lexers from setuptools entrypoints - for cls in find_plugin_lexers(): - if _alias.lower() in cls.aliases: - return cls - raise ClassNotFound('no lexer for alias %r found' % _alias) - - + if _alias.lower() in aliases: + if name not in _lexer_cache: + _load_lexers(module_name) + return _lexer_cache[name] + # continue with lexers from setuptools entrypoints + for cls in find_plugin_lexers(): + if _alias.lower() in cls.aliases: + return cls + raise ClassNotFound('no lexer for alias %r found' % _alias) + + def get_lexer_by_name(_alias, **options): """Get a lexer by an alias. @@ -118,41 +118,41 @@ def get_lexer_by_name(_alias, **options): raise ClassNotFound('no lexer for alias %r found' % _alias) -def load_lexer_from_file(filename, lexername="CustomLexer", **options): - """Load a lexer from a file. - - This method expects a file located relative to the current working - directory, which contains a Lexer class. By default, it expects the - Lexer to be name CustomLexer; you can specify your own class name - as the second argument to this function. - - Users should be very careful with the input, because this method - is equivalent to running eval on the input file. - - Raises ClassNotFound if there are any problems importing the Lexer. - - .. versionadded:: 2.2 - """ - try: - # This empty dict will contain the namespace for the exec'd file - custom_namespace = {} - with open(filename, 'rb') as f: - exec(f.read(), custom_namespace) - # Retrieve the class `lexername` from that namespace - if lexername not in custom_namespace: - raise ClassNotFound('no valid %s class found in %s' % - (lexername, filename)) - lexer_class = custom_namespace[lexername] - # And finally instantiate it with the options - return lexer_class(**options) +def load_lexer_from_file(filename, lexername="CustomLexer", **options): + """Load a lexer from a file. + + This method expects a file located relative to the current working + directory, which contains a Lexer class. By default, it expects the + Lexer to be name CustomLexer; you can specify your own class name + as the second argument to this function. + + Users should be very careful with the input, because this method + is equivalent to running eval on the input file. + + Raises ClassNotFound if there are any problems importing the Lexer. + + .. versionadded:: 2.2 + """ + try: + # This empty dict will contain the namespace for the exec'd file + custom_namespace = {} + with open(filename, 'rb') as f: + exec(f.read(), custom_namespace) + # Retrieve the class `lexername` from that namespace + if lexername not in custom_namespace: + raise ClassNotFound('no valid %s class found in %s' % + (lexername, filename)) + lexer_class = custom_namespace[lexername] + # And finally instantiate it with the options + return lexer_class(**options) except OSError as err: raise ClassNotFound('cannot read %s: %s' % (filename, err)) except ClassNotFound: - raise - except Exception as err: - raise ClassNotFound('error when loading custom lexer: %s' % err) - - + raise + except Exception as err: + raise ClassNotFound('error when loading custom lexer: %s' % err) + + def find_lexer_class_for_filename(_fn, code=None): """Get a lexer for a filename. @@ -187,8 +187,8 @@ def find_lexer_class_for_filename(_fn, code=None): # gets turned into 0.0. Run scripts/detect_missing_analyse_text.py # to find lexers which need it overridden. if code: - return cls.analyse_text(code) + bonus, cls.__name__ - return cls.priority + bonus, cls.__name__ + return cls.analyse_text(code) + bonus, cls.__name__ + return cls.priority + bonus, cls.__name__ if matches: matches.sort(key=get_rating) @@ -292,12 +292,12 @@ def guess_lexer(_text, **options): """Guess a lexer by strong distinctions in the text (eg, shebang).""" if not isinstance(_text, str): - inencoding = options.get('inencoding', options.get('encoding')) - if inencoding: - _text = _text.decode(inencoding or 'utf8') - else: - _text, _ = guess_decode(_text) - + inencoding = options.get('inencoding', options.get('encoding')) + if inencoding: + _text = _text.decode(inencoding or 'utf8') + else: + _text, _ = guess_decode(_text) + # try to get a vim modeline first ft = get_filetype_from_buffer(_text) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py index 2757898c2b..72d86db1e7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py @@ -44,23 +44,23 @@ if __name__ == '__main__': # pragma: no cover print("Decoding error for file: {0}".format(headerFilePath)) continue - res = re.findall(r'(?<=@interface )\w+', content) + res = re.findall(r'(?<=@interface )\w+', content) for r in res: all_interfaces.add(r) - res = re.findall(r'(?<=@protocol )\w+', content) + res = re.findall(r'(?<=@protocol )\w+', content) for r in res: all_protocols.add(r) - res = re.findall(r'(?<=typedef enum )\w+', content) + res = re.findall(r'(?<=typedef enum )\w+', content) for r in res: all_primitives.add(r) - res = re.findall(r'(?<=typedef struct )\w+', content) + res = re.findall(r'(?<=typedef struct )\w+', content) for r in res: all_primitives.add(r) - res = re.findall(r'(?<=typedef const struct )\w+', content) + res = re.findall(r'(?<=typedef const struct )\w+', content) for r in res: all_primitives.add(r) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py index f9013b98e8..e7e395dc6a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py @@ -42,7 +42,7 @@ vbap1move # opcodes = output[re.search(r'^\$', output, re.M).end() : re.search(r'^\d+ opcodes\$', output, re.M).start()].split() # output = Popen(['csound', '--list-opcodes2'], stderr=PIPE, text=True).communicate()[1] # all_opcodes = output[re.search(r'^\$', output, re.M).end() : re.search(r'^\d+ opcodes\$', output, re.M).start()].split() -# deprecated_opcodes = [opcode for opcode in all_opcodes if opcode not in opcodes] +# deprecated_opcodes = [opcode for opcode in all_opcodes if opcode not in opcodes] # # Remove opcodes that csound.py treats as keywords. # keyword_opcodes = [ # 'cggoto', # https://csound.com/docs/manual/cggoto.html @@ -73,253 +73,253 @@ vbap1move # newline = '\n' # print(f'''OPCODES = set(\''' # {newline.join(opcodes)} -# \'''.split()) -# -# DEPRECATED_OPCODES = set(\''' +# \'''.split()) +# +# DEPRECATED_OPCODES = set(\''' # {newline.join(deprecated_opcodes)} -# \'''.split()) +# \'''.split()) # ''') -# " - -OPCODES = set(''' -ATSadd -ATSaddnz -ATSbufread -ATScross -ATSinfo -ATSinterpread -ATSpartialtap -ATSread -ATSreadnz -ATSsinnoi -FLbox -FLbutBank -FLbutton -FLcloseButton -FLcolor -FLcolor2 -FLcount -FLexecButton -FLgetsnap -FLgroup -FLgroupEnd -FLgroup_end -FLhide -FLhvsBox -FLhvsBoxSetValue -FLjoy -FLkeyIn -FLknob -FLlabel -FLloadsnap -FLmouse -FLpack -FLpackEnd -FLpack_end -FLpanel -FLpanelEnd -FLpanel_end -FLprintk -FLprintk2 -FLroller -FLrun -FLsavesnap -FLscroll -FLscrollEnd -FLscroll_end -FLsetAlign -FLsetBox -FLsetColor -FLsetColor2 -FLsetFont -FLsetPosition -FLsetSize -FLsetSnapGroup -FLsetText -FLsetTextColor -FLsetTextSize -FLsetTextType -FLsetVal -FLsetVal_i -FLsetVali -FLsetsnap -FLshow -FLslidBnk -FLslidBnk2 -FLslidBnk2Set -FLslidBnk2Setk -FLslidBnkGetHandle -FLslidBnkSet -FLslidBnkSetk -FLslider -FLtabs -FLtabsEnd -FLtabs_end -FLtext -FLupdate -FLvalue -FLvkeybd -FLvslidBnk -FLvslidBnk2 -FLxyin -JackoAudioIn -JackoAudioInConnect -JackoAudioOut -JackoAudioOutConnect -JackoFreewheel -JackoInfo -JackoInit -JackoMidiInConnect -JackoMidiOut -JackoMidiOutConnect -JackoNoteOut -JackoOn -JackoTransport -K35_hpf -K35_lpf -MixerClear -MixerGetLevel -MixerReceive -MixerSend -MixerSetLevel -MixerSetLevel_i -OSCbundle -OSCcount -OSCinit -OSCinitM -OSClisten -OSCraw -OSCsend -OSCsend_lo -S -STKBandedWG -STKBeeThree -STKBlowBotl -STKBlowHole -STKBowed -STKBrass -STKClarinet -STKDrummer +# " + +OPCODES = set(''' +ATSadd +ATSaddnz +ATSbufread +ATScross +ATSinfo +ATSinterpread +ATSpartialtap +ATSread +ATSreadnz +ATSsinnoi +FLbox +FLbutBank +FLbutton +FLcloseButton +FLcolor +FLcolor2 +FLcount +FLexecButton +FLgetsnap +FLgroup +FLgroupEnd +FLgroup_end +FLhide +FLhvsBox +FLhvsBoxSetValue +FLjoy +FLkeyIn +FLknob +FLlabel +FLloadsnap +FLmouse +FLpack +FLpackEnd +FLpack_end +FLpanel +FLpanelEnd +FLpanel_end +FLprintk +FLprintk2 +FLroller +FLrun +FLsavesnap +FLscroll +FLscrollEnd +FLscroll_end +FLsetAlign +FLsetBox +FLsetColor +FLsetColor2 +FLsetFont +FLsetPosition +FLsetSize +FLsetSnapGroup +FLsetText +FLsetTextColor +FLsetTextSize +FLsetTextType +FLsetVal +FLsetVal_i +FLsetVali +FLsetsnap +FLshow +FLslidBnk +FLslidBnk2 +FLslidBnk2Set +FLslidBnk2Setk +FLslidBnkGetHandle +FLslidBnkSet +FLslidBnkSetk +FLslider +FLtabs +FLtabsEnd +FLtabs_end +FLtext +FLupdate +FLvalue +FLvkeybd +FLvslidBnk +FLvslidBnk2 +FLxyin +JackoAudioIn +JackoAudioInConnect +JackoAudioOut +JackoAudioOutConnect +JackoFreewheel +JackoInfo +JackoInit +JackoMidiInConnect +JackoMidiOut +JackoMidiOutConnect +JackoNoteOut +JackoOn +JackoTransport +K35_hpf +K35_lpf +MixerClear +MixerGetLevel +MixerReceive +MixerSend +MixerSetLevel +MixerSetLevel_i +OSCbundle +OSCcount +OSCinit +OSCinitM +OSClisten +OSCraw +OSCsend +OSCsend_lo +S +STKBandedWG +STKBeeThree +STKBlowBotl +STKBlowHole +STKBowed +STKBrass +STKClarinet +STKDrummer STKFMVoices -STKFlute -STKHevyMetl -STKMandolin -STKModalBar -STKMoog -STKPercFlut -STKPlucked -STKResonate -STKRhodey -STKSaxofony -STKShakers -STKSimple -STKSitar -STKStifKarp -STKTubeBell -STKVoicForm -STKWhistle -STKWurley -a -abs -active -adsr -adsyn -adsynt -adsynt2 -aftouch +STKFlute +STKHevyMetl +STKMandolin +STKModalBar +STKMoog +STKPercFlut +STKPlucked +STKResonate +STKRhodey +STKSaxofony +STKShakers +STKSimple +STKSitar +STKStifKarp +STKTubeBell +STKVoicForm +STKWhistle +STKWurley +a +abs +active +adsr +adsyn +adsynt +adsynt2 +aftouch allpole -alpass -alwayson -ampdb -ampdbfs -ampmidi +alpass +alwayson +ampdb +ampdbfs +ampmidi ampmidicurve -ampmidid +ampmidid apoleparams arduinoRead arduinoReadF arduinoStart arduinoStop -areson -aresonk -atone -atonek -atonex +areson +aresonk +atone +atonek +atonex autocorr -babo -balance -balance2 -bamboo -barmodel -bbcutm -bbcuts -betarand -bexprnd -bformdec1 -bformenc1 -binit -biquad -biquada -birnd +babo +balance +balance2 +bamboo +barmodel +bbcutm +bbcuts +betarand +bexprnd +bformdec1 +bformenc1 +binit +biquad +biquada +birnd bob -bpf -bpfcos -bqrez -butbp -butbr -buthp -butlp -butterbp -butterbr -butterhp -butterlp -button -buzz -c2r -cabasa -cauchy -cauchyi -cbrt -ceil -cell -cent -centroid -ceps -cepsinv -chanctrl +bpf +bpfcos +bqrez +butbp +butbr +buthp +butlp +butterbp +butterbr +butterhp +butterlp +button +buzz +c2r +cabasa +cauchy +cauchyi +cbrt +ceil +cell +cent +centroid +ceps +cepsinv +chanctrl changed -changed2 -chani -chano -chebyshevpoly -checkbox -chn_S -chn_a -chn_k -chnclear -chnexport -chnget +changed2 +chani +chano +chebyshevpoly +checkbox +chn_S +chn_a +chn_k +chnclear +chnexport +chnget chngeta chngeti chngetk -chngetks +chngetks chngets -chnmix -chnparams -chnset +chnmix +chnparams +chnset chnseta chnseti chnsetk -chnsetks +chnsetks chnsets -chuap -clear -clfilt -clip -clockoff -clockon -cmp -cmplxprod +chuap +clear +clfilt +clip +clockoff +clockon +cmp +cmplxprod cntCreate cntCycles cntDelete @@ -327,157 +327,157 @@ cntDelete_i cntRead cntReset cntState -comb -combinv -compilecsd -compileorc -compilestr -compress -compress2 -connect -control -convle -convolve -copya2ftab -copyf2array -cos -cosh -cosinv -cosseg -cossegb -cossegr +comb +combinv +compilecsd +compileorc +compilestr +compress +compress2 +connect +control +convle +convolve +copya2ftab +copyf2array +cos +cosh +cosinv +cosseg +cossegb +cossegr count count_i -cps2pch -cpsmidi -cpsmidib -cpsmidinn -cpsoct -cpspch -cpstmid -cpstun -cpstuni -cpsxpch -cpumeter -cpuprc -cross2 -crossfm -crossfmi -crossfmpm -crossfmpmi -crosspm -crosspmi -crunch -ctlchn -ctrl14 -ctrl21 -ctrl7 -ctrlinit +cps2pch +cpsmidi +cpsmidib +cpsmidinn +cpsoct +cpspch +cpstmid +cpstun +cpstuni +cpsxpch +cpumeter +cpuprc +cross2 +crossfm +crossfmi +crossfmpm +crossfmpmi +crosspm +crosspmi +crunch +ctlchn +ctrl14 +ctrl21 +ctrl7 +ctrlinit ctrlpreset ctrlprint ctrlprintpresets ctrlsave ctrlselect -cuserrnd -dam -date -dates -db -dbamp -dbfsamp -dcblock -dcblock2 -dconv -dct -dctinv -deinterleave -delay -delay1 -delayk -delayr -delayw -deltap -deltap3 -deltapi -deltapn -deltapx -deltapxw -denorm -diff -diode_ladder -directory -diskgrain -diskin -diskin2 -dispfft -display -distort -distort1 -divz -doppler -dot -downsamp -dripwater -dssiactivate -dssiaudio -dssictls -dssiinit -dssilist -dumpk -dumpk2 -dumpk3 -dumpk4 -duserrnd -dust -dust2 -envlpx -envlpxr -ephasor -eqfil -evalstr -event -event_i -exciter -exitnow -exp -expcurve -expon -exprand -exprandi -expseg -expsega -expsegb -expsegba -expsegr -fareylen -fareyleni -faustaudio -faustcompile -faustctl -faustdsp -faustgen -faustplay -fft -fftinv -ficlose -filebit -filelen -filenchnls -filepeak -filescal -filesr -filevalid -fillarray -filter2 -fin -fini -fink -fiopen -flanger -flashtxt -flooper -flooper2 -floor +cuserrnd +dam +date +dates +db +dbamp +dbfsamp +dcblock +dcblock2 +dconv +dct +dctinv +deinterleave +delay +delay1 +delayk +delayr +delayw +deltap +deltap3 +deltapi +deltapn +deltapx +deltapxw +denorm +diff +diode_ladder +directory +diskgrain +diskin +diskin2 +dispfft +display +distort +distort1 +divz +doppler +dot +downsamp +dripwater +dssiactivate +dssiaudio +dssictls +dssiinit +dssilist +dumpk +dumpk2 +dumpk3 +dumpk4 +duserrnd +dust +dust2 +envlpx +envlpxr +ephasor +eqfil +evalstr +event +event_i +exciter +exitnow +exp +expcurve +expon +exprand +exprandi +expseg +expsega +expsegb +expsegba +expsegr +fareylen +fareyleni +faustaudio +faustcompile +faustctl +faustdsp +faustgen +faustplay +fft +fftinv +ficlose +filebit +filelen +filenchnls +filepeak +filescal +filesr +filevalid +fillarray +filter2 +fin +fini +fink +fiopen +flanger +flashtxt +flooper +flooper2 +floor fluidAllOut fluidCCi fluidCCk @@ -489,1277 +489,1277 @@ fluidNote fluidOut fluidProgramSelect fluidSetInterpMethod -fmanal -fmax -fmb3 -fmbell -fmin -fmmetal -fmod -fmpercfl -fmrhode -fmvoice -fmwurlie -fof -fof2 -fofilter -fog -fold -follow -follow2 -foscil -foscili -fout -fouti -foutir -foutk -fprintks -fprints -frac -fractalnoise -framebuffer -freeverb -ftaudio -ftchnls -ftconv -ftcps +fmanal +fmax +fmb3 +fmbell +fmin +fmmetal +fmod +fmpercfl +fmrhode +fmvoice +fmwurlie +fof +fof2 +fofilter +fog +fold +follow +follow2 +foscil +foscili +fout +fouti +foutir +foutk +fprintks +fprints +frac +fractalnoise +framebuffer +freeverb +ftaudio +ftchnls +ftconv +ftcps ftexists -ftfree -ftgen -ftgenonce -ftgentmp -ftlen -ftload -ftloadk -ftlptim -ftmorf -ftom -ftprint -ftresize -ftresizei -ftsamplebank -ftsave -ftsavek +ftfree +ftgen +ftgenonce +ftgentmp +ftlen +ftload +ftloadk +ftlptim +ftmorf +ftom +ftprint +ftresize +ftresizei +ftsamplebank +ftsave +ftsavek ftset -ftslice +ftslice ftslicei -ftsr -gain -gainslider -gauss -gaussi -gausstrig -gbuzz -genarray -genarray_i -gendy -gendyc -gendyx -getcfg -getcol -getftargs -getrow -getseed -gogobel -grain -grain2 -grain3 -granule +ftsr +gain +gainslider +gauss +gaussi +gausstrig +gbuzz +genarray +genarray_i +gendy +gendyc +gendyx +getcfg +getcol +getftargs +getrow +getseed +gogobel +grain +grain2 +grain3 +granule gtf -guiro -harmon -harmon2 -harmon3 -harmon4 -hdf5read -hdf5write -hilbert -hilbert2 -hrtfearly -hrtfmove -hrtfmove2 -hrtfreverb -hrtfstat -hsboscil -hvs1 -hvs2 -hvs3 -hypot -i -ihold -imagecreate -imagefree -imagegetpixel -imageload -imagesave -imagesetpixel -imagesize -in -in32 -inch -inh -init -initc14 -initc21 -initc7 -inleta -inletf -inletk -inletkid -inletv -ino -inq -inrg -ins -insglobal -insremot -int -integ -interleave -interp -invalue -inx -inz -jacktransport -jitter -jitter2 -joystick -jspline -k -la_i_add_mc -la_i_add_mr -la_i_add_vc -la_i_add_vr -la_i_assign_mc -la_i_assign_mr -la_i_assign_t -la_i_assign_vc -la_i_assign_vr -la_i_conjugate_mc -la_i_conjugate_mr -la_i_conjugate_vc -la_i_conjugate_vr -la_i_distance_vc -la_i_distance_vr -la_i_divide_mc -la_i_divide_mr -la_i_divide_vc -la_i_divide_vr -la_i_dot_mc -la_i_dot_mc_vc -la_i_dot_mr -la_i_dot_mr_vr -la_i_dot_vc -la_i_dot_vr -la_i_get_mc -la_i_get_mr -la_i_get_vc -la_i_get_vr -la_i_invert_mc -la_i_invert_mr -la_i_lower_solve_mc -la_i_lower_solve_mr -la_i_lu_det_mc -la_i_lu_det_mr -la_i_lu_factor_mc -la_i_lu_factor_mr -la_i_lu_solve_mc -la_i_lu_solve_mr -la_i_mc_create -la_i_mc_set -la_i_mr_create -la_i_mr_set -la_i_multiply_mc -la_i_multiply_mr -la_i_multiply_vc -la_i_multiply_vr +guiro +harmon +harmon2 +harmon3 +harmon4 +hdf5read +hdf5write +hilbert +hilbert2 +hrtfearly +hrtfmove +hrtfmove2 +hrtfreverb +hrtfstat +hsboscil +hvs1 +hvs2 +hvs3 +hypot +i +ihold +imagecreate +imagefree +imagegetpixel +imageload +imagesave +imagesetpixel +imagesize +in +in32 +inch +inh +init +initc14 +initc21 +initc7 +inleta +inletf +inletk +inletkid +inletv +ino +inq +inrg +ins +insglobal +insremot +int +integ +interleave +interp +invalue +inx +inz +jacktransport +jitter +jitter2 +joystick +jspline +k +la_i_add_mc +la_i_add_mr +la_i_add_vc +la_i_add_vr +la_i_assign_mc +la_i_assign_mr +la_i_assign_t +la_i_assign_vc +la_i_assign_vr +la_i_conjugate_mc +la_i_conjugate_mr +la_i_conjugate_vc +la_i_conjugate_vr +la_i_distance_vc +la_i_distance_vr +la_i_divide_mc +la_i_divide_mr +la_i_divide_vc +la_i_divide_vr +la_i_dot_mc +la_i_dot_mc_vc +la_i_dot_mr +la_i_dot_mr_vr +la_i_dot_vc +la_i_dot_vr +la_i_get_mc +la_i_get_mr +la_i_get_vc +la_i_get_vr +la_i_invert_mc +la_i_invert_mr +la_i_lower_solve_mc +la_i_lower_solve_mr +la_i_lu_det_mc +la_i_lu_det_mr +la_i_lu_factor_mc +la_i_lu_factor_mr +la_i_lu_solve_mc +la_i_lu_solve_mr +la_i_mc_create +la_i_mc_set +la_i_mr_create +la_i_mr_set +la_i_multiply_mc +la_i_multiply_mr +la_i_multiply_vc +la_i_multiply_vr la_i_norm1_mc la_i_norm1_mr la_i_norm1_vc la_i_norm1_vr -la_i_norm_euclid_mc -la_i_norm_euclid_mr -la_i_norm_euclid_vc -la_i_norm_euclid_vr -la_i_norm_inf_mc -la_i_norm_inf_mr -la_i_norm_inf_vc -la_i_norm_inf_vr -la_i_norm_max_mc -la_i_norm_max_mr -la_i_print_mc -la_i_print_mr -la_i_print_vc -la_i_print_vr -la_i_qr_eigen_mc -la_i_qr_eigen_mr -la_i_qr_factor_mc -la_i_qr_factor_mr -la_i_qr_sym_eigen_mc -la_i_qr_sym_eigen_mr -la_i_random_mc -la_i_random_mr -la_i_random_vc -la_i_random_vr -la_i_size_mc -la_i_size_mr -la_i_size_vc -la_i_size_vr -la_i_subtract_mc -la_i_subtract_mr -la_i_subtract_vc -la_i_subtract_vr -la_i_t_assign -la_i_trace_mc -la_i_trace_mr -la_i_transpose_mc -la_i_transpose_mr -la_i_upper_solve_mc -la_i_upper_solve_mr -la_i_vc_create -la_i_vc_set -la_i_vr_create -la_i_vr_set -la_k_a_assign -la_k_add_mc -la_k_add_mr -la_k_add_vc -la_k_add_vr -la_k_assign_a -la_k_assign_f -la_k_assign_mc -la_k_assign_mr -la_k_assign_t -la_k_assign_vc -la_k_assign_vr -la_k_conjugate_mc -la_k_conjugate_mr -la_k_conjugate_vc -la_k_conjugate_vr -la_k_current_f -la_k_current_vr -la_k_distance_vc -la_k_distance_vr -la_k_divide_mc -la_k_divide_mr -la_k_divide_vc -la_k_divide_vr -la_k_dot_mc -la_k_dot_mc_vc -la_k_dot_mr -la_k_dot_mr_vr -la_k_dot_vc -la_k_dot_vr -la_k_f_assign -la_k_get_mc -la_k_get_mr -la_k_get_vc -la_k_get_vr -la_k_invert_mc -la_k_invert_mr -la_k_lower_solve_mc -la_k_lower_solve_mr -la_k_lu_det_mc -la_k_lu_det_mr -la_k_lu_factor_mc -la_k_lu_factor_mr -la_k_lu_solve_mc -la_k_lu_solve_mr -la_k_mc_set -la_k_mr_set -la_k_multiply_mc -la_k_multiply_mr -la_k_multiply_vc -la_k_multiply_vr +la_i_norm_euclid_mc +la_i_norm_euclid_mr +la_i_norm_euclid_vc +la_i_norm_euclid_vr +la_i_norm_inf_mc +la_i_norm_inf_mr +la_i_norm_inf_vc +la_i_norm_inf_vr +la_i_norm_max_mc +la_i_norm_max_mr +la_i_print_mc +la_i_print_mr +la_i_print_vc +la_i_print_vr +la_i_qr_eigen_mc +la_i_qr_eigen_mr +la_i_qr_factor_mc +la_i_qr_factor_mr +la_i_qr_sym_eigen_mc +la_i_qr_sym_eigen_mr +la_i_random_mc +la_i_random_mr +la_i_random_vc +la_i_random_vr +la_i_size_mc +la_i_size_mr +la_i_size_vc +la_i_size_vr +la_i_subtract_mc +la_i_subtract_mr +la_i_subtract_vc +la_i_subtract_vr +la_i_t_assign +la_i_trace_mc +la_i_trace_mr +la_i_transpose_mc +la_i_transpose_mr +la_i_upper_solve_mc +la_i_upper_solve_mr +la_i_vc_create +la_i_vc_set +la_i_vr_create +la_i_vr_set +la_k_a_assign +la_k_add_mc +la_k_add_mr +la_k_add_vc +la_k_add_vr +la_k_assign_a +la_k_assign_f +la_k_assign_mc +la_k_assign_mr +la_k_assign_t +la_k_assign_vc +la_k_assign_vr +la_k_conjugate_mc +la_k_conjugate_mr +la_k_conjugate_vc +la_k_conjugate_vr +la_k_current_f +la_k_current_vr +la_k_distance_vc +la_k_distance_vr +la_k_divide_mc +la_k_divide_mr +la_k_divide_vc +la_k_divide_vr +la_k_dot_mc +la_k_dot_mc_vc +la_k_dot_mr +la_k_dot_mr_vr +la_k_dot_vc +la_k_dot_vr +la_k_f_assign +la_k_get_mc +la_k_get_mr +la_k_get_vc +la_k_get_vr +la_k_invert_mc +la_k_invert_mr +la_k_lower_solve_mc +la_k_lower_solve_mr +la_k_lu_det_mc +la_k_lu_det_mr +la_k_lu_factor_mc +la_k_lu_factor_mr +la_k_lu_solve_mc +la_k_lu_solve_mr +la_k_mc_set +la_k_mr_set +la_k_multiply_mc +la_k_multiply_mr +la_k_multiply_vc +la_k_multiply_vr la_k_norm1_mc la_k_norm1_mr la_k_norm1_vc la_k_norm1_vr -la_k_norm_euclid_mc -la_k_norm_euclid_mr -la_k_norm_euclid_vc -la_k_norm_euclid_vr -la_k_norm_inf_mc -la_k_norm_inf_mr -la_k_norm_inf_vc -la_k_norm_inf_vr -la_k_norm_max_mc -la_k_norm_max_mr -la_k_qr_eigen_mc -la_k_qr_eigen_mr -la_k_qr_factor_mc -la_k_qr_factor_mr -la_k_qr_sym_eigen_mc -la_k_qr_sym_eigen_mr -la_k_random_mc -la_k_random_mr -la_k_random_vc -la_k_random_vr -la_k_subtract_mc -la_k_subtract_mr -la_k_subtract_vc -la_k_subtract_vr -la_k_t_assign -la_k_trace_mc -la_k_trace_mr -la_k_upper_solve_mc -la_k_upper_solve_mr -la_k_vc_set -la_k_vr_set +la_k_norm_euclid_mc +la_k_norm_euclid_mr +la_k_norm_euclid_vc +la_k_norm_euclid_vr +la_k_norm_inf_mc +la_k_norm_inf_mr +la_k_norm_inf_vc +la_k_norm_inf_vr +la_k_norm_max_mc +la_k_norm_max_mr +la_k_qr_eigen_mc +la_k_qr_eigen_mr +la_k_qr_factor_mc +la_k_qr_factor_mr +la_k_qr_sym_eigen_mc +la_k_qr_sym_eigen_mr +la_k_random_mc +la_k_random_mr +la_k_random_vc +la_k_random_vr +la_k_subtract_mc +la_k_subtract_mr +la_k_subtract_vc +la_k_subtract_vr +la_k_t_assign +la_k_trace_mc +la_k_trace_mr +la_k_upper_solve_mc +la_k_upper_solve_mr +la_k_vc_set +la_k_vr_set lag lagud lastcycle -lenarray -lfo +lenarray +lfo lfsr -limit -limit1 -lincos -line -linen -linenr -lineto -link_beat_force -link_beat_get -link_beat_request -link_create -link_enable -link_is_enabled -link_metro -link_peers -link_tempo_get -link_tempo_set -linlin -linrand -linseg -linsegb -linsegr -liveconv -locsend -locsig -log -log10 -log2 -logbtwo -logcurve -loopseg -loopsegp -looptseg -loopxseg -lorenz -loscil -loscil3 -loscil3phs -loscilphs -loscilx -lowpass2 -lowres -lowresx +limit +limit1 +lincos +line +linen +linenr +lineto +link_beat_force +link_beat_get +link_beat_request +link_create +link_enable +link_is_enabled +link_metro +link_peers +link_tempo_get +link_tempo_set +linlin +linrand +linseg +linsegb +linsegr +liveconv +locsend +locsig +log +log10 +log2 +logbtwo +logcurve +loopseg +loopsegp +looptseg +loopxseg +lorenz +loscil +loscil3 +loscil3phs +loscilphs +loscilx +lowpass2 +lowres +lowresx lpcanal lpcfilter -lpf18 -lpform -lpfreson -lphasor -lpinterp -lposcil -lposcil3 -lposcila -lposcilsa -lposcilsa2 -lpread -lpreson -lpshold -lpsholdp -lpslot +lpf18 +lpform +lpfreson +lphasor +lpinterp +lposcil +lposcil3 +lposcila +lposcilsa +lposcilsa2 +lpread +lpreson +lpshold +lpsholdp +lpslot lufs -mac -maca -madsr -mags -mandel -mandol -maparray -maparray_i -marimba -massign -max -max_k -maxabs -maxabsaccum -maxaccum -maxalloc -maxarray -mclock -mdelay -median -mediank -metro +mac +maca +madsr +mags +mandel +mandol +maparray +maparray_i +marimba +massign +max +max_k +maxabs +maxabsaccum +maxaccum +maxalloc +maxarray +mclock +mdelay +median +mediank +metro metro2 -mfb -midglobal -midiarp -midic14 -midic21 -midic7 -midichannelaftertouch -midichn -midicontrolchange -midictrl -mididefault -midifilestatus -midiin -midinoteoff -midinoteoncps -midinoteonkey -midinoteonoct -midinoteonpch -midion -midion2 -midiout -midiout_i -midipgm -midipitchbend -midipolyaftertouch -midiprogramchange -miditempo -midremot -min -minabs -minabsaccum -minaccum -minarray -mincer -mirror -mode -modmatrix -monitor -moog -moogladder -moogladder2 -moogvcf -moogvcf2 -moscil -mp3bitrate -mp3in -mp3len -mp3nchnls -mp3scal -mp3sr -mpulse -mrtmsg +mfb +midglobal +midiarp +midic14 +midic21 +midic7 +midichannelaftertouch +midichn +midicontrolchange +midictrl +mididefault +midifilestatus +midiin +midinoteoff +midinoteoncps +midinoteonkey +midinoteonoct +midinoteonpch +midion +midion2 +midiout +midiout_i +midipgm +midipitchbend +midipolyaftertouch +midiprogramchange +miditempo +midremot +min +minabs +minabsaccum +minaccum +minarray +mincer +mirror +mode +modmatrix +monitor +moog +moogladder +moogladder2 +moogvcf +moogvcf2 +moscil +mp3bitrate +mp3in +mp3len +mp3nchnls +mp3scal +mp3sr +mpulse +mrtmsg ms2st -mtof -mton -multitap -mute -mvchpf -mvclpf1 -mvclpf2 -mvclpf3 -mvclpf4 +mtof +mton +multitap +mute +mvchpf +mvclpf1 +mvclpf2 +mvclpf3 +mvclpf4 mvmfilter -mxadsr -nchnls_hw -nestedap -nlalp -nlfilt -nlfilt2 -noise -noteoff -noteon -noteondur -noteondur2 -notnum -nreverb -nrpn -nsamp -nstance -nstrnum +mxadsr +nchnls_hw +nestedap +nlalp +nlfilt +nlfilt2 +noise +noteoff +noteon +noteondur +noteondur2 +notnum +nreverb +nrpn +nsamp +nstance +nstrnum nstrstr ntof -ntom -ntrpol -nxtpow2 -octave -octcps -octmidi -octmidib -octmidinn -octpch -olabuffer -oscbnk -oscil -oscil1 -oscil1i -oscil3 -oscili -oscilikt -osciliktp -oscilikts -osciln -oscils -oscilx -out -out32 +ntom +ntrpol +nxtpow2 +octave +octcps +octmidi +octmidib +octmidinn +octpch +olabuffer +oscbnk +oscil +oscil1 +oscil1i +oscil3 +oscili +oscilikt +osciliktp +oscilikts +osciln +oscils +oscilx +out +out32 outall -outc -outch -outh -outiat -outic -outic14 -outipat -outipb -outipc -outkat -outkc -outkc14 -outkpat -outkpb -outkpc -outleta -outletf -outletk -outletkid -outletv -outo -outq -outq1 -outq2 -outq3 -outq4 -outrg -outs -outs1 -outs2 -outvalue -outx -outz -p -p5gconnect -p5gdata -pan -pan2 -pareq -part2txt -partials -partikkel -partikkelget -partikkelset -partikkelsync -passign -paulstretch -pcauchy -pchbend -pchmidi -pchmidib -pchmidinn -pchoct -pchtom -pconvolve -pcount -pdclip -pdhalf -pdhalfy -peak -pgmassign -pgmchn -phaser1 -phaser2 -phasor -phasorbnk -phs -pindex -pinker -pinkish -pitch -pitchac -pitchamdf -planet -platerev -plltrack -pluck -poisson -pol2rect -polyaft -polynomial -port -portk -poscil -poscil3 -pow -powershape -powoftwo -pows -prealloc -prepiano -print -print_type -printarray -printf -printf_i -printk -printk2 -printks -printks2 +outc +outch +outh +outiat +outic +outic14 +outipat +outipb +outipc +outkat +outkc +outkc14 +outkpat +outkpb +outkpc +outleta +outletf +outletk +outletkid +outletv +outo +outq +outq1 +outq2 +outq3 +outq4 +outrg +outs +outs1 +outs2 +outvalue +outx +outz +p +p5gconnect +p5gdata +pan +pan2 +pareq +part2txt +partials +partikkel +partikkelget +partikkelset +partikkelsync +passign +paulstretch +pcauchy +pchbend +pchmidi +pchmidib +pchmidinn +pchoct +pchtom +pconvolve +pcount +pdclip +pdhalf +pdhalfy +peak +pgmassign +pgmchn +phaser1 +phaser2 +phasor +phasorbnk +phs +pindex +pinker +pinkish +pitch +pitchac +pitchamdf +planet +platerev +plltrack +pluck +poisson +pol2rect +polyaft +polynomial +port +portk +poscil +poscil3 +pow +powershape +powoftwo +pows +prealloc +prepiano +print +print_type +printarray +printf +printf_i +printk +printk2 +printks +printks2 println -prints +prints printsk -product -pset -ptablew -ptrack -puts -pvadd -pvbufread -pvcross -pvinterp -pvoc -pvread -pvs2array -pvs2tab -pvsadsyn -pvsanal -pvsarp -pvsbandp -pvsbandr +product +pset +ptablew +ptrack +puts +pvadd +pvbufread +pvcross +pvinterp +pvoc +pvread +pvs2array +pvs2tab +pvsadsyn +pvsanal +pvsarp +pvsbandp +pvsbandr pvsbandwidth -pvsbin -pvsblur -pvsbuffer -pvsbufread -pvsbufread2 -pvscale -pvscent -pvsceps +pvsbin +pvsblur +pvsbuffer +pvsbufread +pvsbufread2 +pvscale +pvscent +pvsceps pvscfs -pvscross -pvsdemix -pvsdiskin -pvsdisp -pvsenvftw -pvsfilter -pvsfread -pvsfreeze -pvsfromarray -pvsftr -pvsftw -pvsfwrite -pvsgain -pvshift -pvsifd -pvsin -pvsinfo -pvsinit -pvslock +pvscross +pvsdemix +pvsdiskin +pvsdisp +pvsenvftw +pvsfilter +pvsfread +pvsfreeze +pvsfromarray +pvsftr +pvsftw +pvsfwrite +pvsgain +pvshift +pvsifd +pvsin +pvsinfo +pvsinit +pvslock pvslpc -pvsmaska -pvsmix -pvsmooth -pvsmorph -pvsosc -pvsout -pvspitch -pvstanal -pvstencil -pvstrace -pvsvoc -pvswarp -pvsynth -pwd -pyassign -pyassigni -pyassignt -pycall -pycall1 -pycall1i -pycall1t -pycall2 -pycall2i -pycall2t -pycall3 -pycall3i -pycall3t -pycall4 -pycall4i -pycall4t -pycall5 -pycall5i -pycall5t -pycall6 -pycall6i -pycall6t -pycall7 -pycall7i -pycall7t -pycall8 -pycall8i -pycall8t -pycalli -pycalln -pycallni -pycallt -pyeval -pyevali -pyevalt -pyexec -pyexeci -pyexect -pyinit -pylassign -pylassigni -pylassignt -pylcall -pylcall1 -pylcall1i -pylcall1t -pylcall2 -pylcall2i -pylcall2t -pylcall3 -pylcall3i -pylcall3t -pylcall4 -pylcall4i -pylcall4t -pylcall5 -pylcall5i -pylcall5t -pylcall6 -pylcall6i -pylcall6t -pylcall7 -pylcall7i -pylcall7t -pylcall8 -pylcall8i -pylcall8t -pylcalli -pylcalln -pylcallni -pylcallt -pyleval -pylevali -pylevalt -pylexec -pylexeci -pylexect -pylrun -pylruni -pylrunt -pyrun -pyruni -pyrunt -qinf -qnan -r2c -rand +pvsmaska +pvsmix +pvsmooth +pvsmorph +pvsosc +pvsout +pvspitch +pvstanal +pvstencil +pvstrace +pvsvoc +pvswarp +pvsynth +pwd +pyassign +pyassigni +pyassignt +pycall +pycall1 +pycall1i +pycall1t +pycall2 +pycall2i +pycall2t +pycall3 +pycall3i +pycall3t +pycall4 +pycall4i +pycall4t +pycall5 +pycall5i +pycall5t +pycall6 +pycall6i +pycall6t +pycall7 +pycall7i +pycall7t +pycall8 +pycall8i +pycall8t +pycalli +pycalln +pycallni +pycallt +pyeval +pyevali +pyevalt +pyexec +pyexeci +pyexect +pyinit +pylassign +pylassigni +pylassignt +pylcall +pylcall1 +pylcall1i +pylcall1t +pylcall2 +pylcall2i +pylcall2t +pylcall3 +pylcall3i +pylcall3t +pylcall4 +pylcall4i +pylcall4t +pylcall5 +pylcall5i +pylcall5t +pylcall6 +pylcall6i +pylcall6t +pylcall7 +pylcall7i +pylcall7t +pylcall8 +pylcall8i +pylcall8t +pylcalli +pylcalln +pylcallni +pylcallt +pyleval +pylevali +pylevalt +pylexec +pylexeci +pylexect +pylrun +pylruni +pylrunt +pyrun +pyruni +pyrunt +qinf +qnan +r2c +rand randc -randh -randi -random -randomh -randomi -rbjeq -readclock -readf -readfi -readk -readk2 -readk3 -readk4 -readks -readscore -readscratch -rect2pol -release -remoteport -remove -repluck -reshapearray -reson +randh +randi +random +randomh +randomi +rbjeq +readclock +readf +readfi +readk +readk2 +readk3 +readk4 +readks +readscore +readscratch +rect2pol +release +remoteport +remove +repluck +reshapearray +reson resonbnk -resonk -resonr -resonx -resonxk -resony -resonz -resyn -reverb -reverb2 -reverbsc -rewindscore -rezzy -rfft -rifft -rms -rnd -rnd31 +resonk +resonr +resonx +resonxk +resony +resonz +resyn +reverb +reverb2 +reverbsc +rewindscore +rezzy +rfft +rifft +rms +rnd +rnd31 rndseed -round -rspline -rtclock -s16b14 -s32b14 -samphold -sandpaper -sc_lag -sc_lagud -sc_phasor -sc_trig -scale +round +rspline +rtclock +s16b14 +s32b14 +samphold +sandpaper +sc_lag +sc_lagud +sc_phasor +sc_trig +scale scale2 -scalearray -scanhammer -scans -scantable -scanu +scalearray +scanhammer +scans +scantable +scanu scanu2 -schedkwhen -schedkwhennamed -schedule +schedkwhen +schedkwhennamed +schedule schedulek -schedwhen -scoreline -scoreline_i -seed -sekere -select -semitone -sense -sensekey -seqtime -seqtime2 -serialBegin -serialEnd -serialFlush -serialPrint -serialRead -serialWrite -serialWrite_i -setcol -setctrl -setksmps -setrow -setscorepos -sfilist -sfinstr -sfinstr3 -sfinstr3m -sfinstrm -sfload -sflooper -sfpassign -sfplay -sfplay3 -sfplay3m -sfplaym -sfplist -sfpreset -shaker -shiftin -shiftout -signum -sin -sinh -sininv -sinsyn +schedwhen +scoreline +scoreline_i +seed +sekere +select +semitone +sense +sensekey +seqtime +seqtime2 +serialBegin +serialEnd +serialFlush +serialPrint +serialRead +serialWrite +serialWrite_i +setcol +setctrl +setksmps +setrow +setscorepos +sfilist +sfinstr +sfinstr3 +sfinstr3m +sfinstrm +sfload +sflooper +sfpassign +sfplay +sfplay3 +sfplay3m +sfplaym +sfplist +sfpreset +shaker +shiftin +shiftout +signum +sin +sinh +sininv +sinsyn skf -sleighbells -slicearray -slicearray_i -slider16 -slider16f -slider16table -slider16tablef -slider32 -slider32f -slider32table -slider32tablef -slider64 -slider64f -slider64table -slider64tablef -slider8 -slider8f -slider8table -slider8tablef -sliderKawai -sndloop -sndwarp -sndwarpst -sockrecv -sockrecvs -socksend -socksends -sorta -sortd -soundin -space -spat3d -spat3di -spat3dt -spdist +sleighbells +slicearray +slicearray_i +slider16 +slider16f +slider16table +slider16tablef +slider32 +slider32f +slider32table +slider32tablef +slider64 +slider64f +slider64table +slider64tablef +slider8 +slider8f +slider8table +slider8tablef +sliderKawai +sndloop +sndwarp +sndwarpst +sockrecv +sockrecvs +socksend +socksends +sorta +sortd +soundin +space +spat3d +spat3di +spat3dt +spdist spf -splitrig -sprintf -sprintfk -spsend -sqrt -squinewave +splitrig +sprintf +sprintfk +spsend +sqrt +squinewave st2ms -statevar +statevar sterrain -stix -strcat -strcatk -strchar -strchark -strcmp -strcmpk -strcpy -strcpyk -strecv -streson -strfromurl -strget -strindex -strindexk +stix +strcat +strcatk +strchar +strchark +strcmp +strcmpk +strcpy +strcpyk +strecv +streson +strfromurl +strget +strindex +strindexk string2array -strlen -strlenk -strlower -strlowerk -strrindex -strrindexk -strset +strlen +strlenk +strlower +strlowerk +strrindex +strrindexk +strset strstrip -strsub -strsubk -strtod -strtodk -strtol -strtolk -strupper -strupperk -stsend -subinstr -subinstrinit -sum -sumarray -svfilter +strsub +strsubk +strtod +strtodk +strtol +strtolk +strupper +strupperk +stsend +subinstr +subinstrinit +sum +sumarray +svfilter svn -syncgrain -syncloop -syncphasor -system -system_i -tab -tab2array -tab2pvs -tab_i -tabifd -table -table3 -table3kt -tablecopy -tablefilter -tablefilteri -tablegpw -tablei -tableicopy -tableigpw -tableikt -tableimix -tablekt -tablemix -tableng -tablera -tableseg -tableshuffle -tableshufflei -tablew -tablewa -tablewkt -tablexkt -tablexseg -tabmorph -tabmorpha -tabmorphak -tabmorphi -tabplay -tabrec -tabsum -tabw -tabw_i -tambourine -tan -tanh -taninv -taninv2 -tbvcf -tempest -tempo -temposcal -tempoval -timedseq -timeinstk -timeinsts -timek -times -tival -tlineto -tone -tonek -tonex -tradsyn -trandom -transeg -transegb -transegr -trcross -trfilter -trhighest +syncgrain +syncloop +syncphasor +system +system_i +tab +tab2array +tab2pvs +tab_i +tabifd +table +table3 +table3kt +tablecopy +tablefilter +tablefilteri +tablegpw +tablei +tableicopy +tableigpw +tableikt +tableimix +tablekt +tablemix +tableng +tablera +tableseg +tableshuffle +tableshufflei +tablew +tablewa +tablewkt +tablexkt +tablexseg +tabmorph +tabmorpha +tabmorphak +tabmorphi +tabplay +tabrec +tabsum +tabw +tabw_i +tambourine +tan +tanh +taninv +taninv2 +tbvcf +tempest +tempo +temposcal +tempoval +timedseq +timeinstk +timeinsts +timek +times +tival +tlineto +tone +tonek +tonex +tradsyn +trandom +transeg +transegb +transegr +trcross +trfilter +trhighest trigExpseg trigLinseg -trigger +trigger trighold trigphasor -trigseq -trim -trim_i -trirand -trlowest -trmix -trscale -trshift -trsplit -turnoff -turnoff2 +trigseq +trim +trim_i +trirand +trlowest +trmix +trscale +trshift +trsplit +turnoff +turnoff2 turnoff2_i turnoff3 -turnon -tvconv -unirand -unwrap -upsamp -urandom -urd -vactrol -vadd -vadd_i -vaddv -vaddv_i -vaget -valpass -vaset -vbap -vbapg -vbapgmove -vbaplsinit -vbapmove -vbapz -vbapzmove -vcella +turnon +tvconv +unirand +unwrap +upsamp +urandom +urd +vactrol +vadd +vadd_i +vaddv +vaddv_i +vaget +valpass +vaset +vbap +vbapg +vbapgmove +vbaplsinit +vbapmove +vbapz +vbapzmove +vcella vclpf -vco -vco2 -vco2ft -vco2ift -vco2init -vcomb -vcopy -vcopy_i -vdel_k -vdelay -vdelay3 -vdelayk -vdelayx -vdelayxq -vdelayxs -vdelayxw -vdelayxwq -vdelayxws -vdivv -vdivv_i -vecdelay -veloc -vexp -vexp_i -vexpseg -vexpv -vexpv_i -vibes -vibr -vibrato -vincr -vlimit -vlinseg -vlowres -vmap -vmirror -vmult -vmult_i -vmultv -vmultv_i -voice -vosim -vphaseseg -vport -vpow -vpow_i -vpowv -vpowv_i +vco +vco2 +vco2ft +vco2ift +vco2init +vcomb +vcopy +vcopy_i +vdel_k +vdelay +vdelay3 +vdelayk +vdelayx +vdelayxq +vdelayxs +vdelayxw +vdelayxwq +vdelayxws +vdivv +vdivv_i +vecdelay +veloc +vexp +vexp_i +vexpseg +vexpv +vexpv_i +vibes +vibr +vibrato +vincr +vlimit +vlinseg +vlowres +vmap +vmirror +vmult +vmult_i +vmultv +vmultv_i +voice +vosim +vphaseseg +vport +vpow +vpow_i +vpowv +vpowv_i vps -vpvoc -vrandh -vrandi -vsubv -vsubv_i -vtaba -vtabi -vtabk -vtable1k -vtablea -vtablei -vtablek -vtablewa -vtablewi -vtablewk -vtabwa -vtabwi -vtabwk -vwrap -waveset -websocket -weibull -wgbow -wgbowedbar -wgbrass -wgclar -wgflute -wgpluck -wgpluck2 -wguide1 -wguide2 -wiiconnect -wiidata -wiirange -wiisend -window -wrap -writescratch -wterrain +vpvoc +vrandh +vrandi +vsubv +vsubv_i +vtaba +vtabi +vtabk +vtable1k +vtablea +vtablei +vtablek +vtablewa +vtablewi +vtablewk +vtabwa +vtabwi +vtabwk +vwrap +waveset +websocket +weibull +wgbow +wgbowedbar +wgbrass +wgclar +wgflute +wgpluck +wgpluck2 +wguide1 +wguide2 +wiiconnect +wiidata +wiirange +wiisend +window +wrap +writescratch +wterrain wterrain2 -xadsr -xin -xout -xscanmap -xscans -xscansmap -xscanu -xtratim -xyscale -zacl -zakinit -zamod -zar -zarg -zaw -zawm -zdf_1pole -zdf_1pole_mode -zdf_2pole -zdf_2pole_mode -zdf_ladder -zfilter2 -zir -ziw -ziwm -zkcl -zkmod -zkr -zkw -zkwm -'''.split()) - -DEPRECATED_OPCODES = set(''' -array -bformdec -bformenc -copy2ftab -copy2ttab -hrtfer -ktableseg -lentab -maxtab -mintab -pop -pop_f +xadsr +xin +xout +xscanmap +xscans +xscansmap +xscanu +xtratim +xyscale +zacl +zakinit +zamod +zar +zarg +zaw +zawm +zdf_1pole +zdf_1pole_mode +zdf_2pole +zdf_2pole_mode +zdf_ladder +zfilter2 +zir +ziw +ziwm +zkcl +zkmod +zkr +zkw +zkwm +'''.split()) + +DEPRECATED_OPCODES = set(''' +array +bformdec +bformenc +copy2ftab +copy2ttab +hrtfer +ktableseg +lentab +maxtab +mintab +pop +pop_f ptable ptable3 ptablei ptableiw -push -push_f -scalet -sndload -soundout -soundouts -specaddm -specdiff -specdisp -specfilt -spechist -specptrk -specscal -specsum -spectrum -stack -sumtab -tabgen +push +push_f +scalet +sndload +soundout +soundouts +specaddm +specdiff +specdisp +specfilt +spechist +specptrk +specscal +specsum +spectrum +stack +sumtab +tabgen tableiw -tabmap -tabmap_i -tabslice -tb0 -tb0_init -tb1 -tb10 -tb10_init -tb11 -tb11_init -tb12 -tb12_init -tb13 -tb13_init -tb14 -tb14_init -tb15 -tb15_init -tb1_init -tb2 -tb2_init -tb3 -tb3_init -tb4 -tb4_init -tb5 -tb5_init -tb6 -tb6_init -tb7 -tb7_init -tb8 -tb8_init -tb9 -tb9_init -vbap16 -vbap4 -vbap4move -vbap8 -vbap8move -xyin -'''.split()) +tabmap +tabmap_i +tabslice +tb0 +tb0_init +tb1 +tb10 +tb10_init +tb11 +tb11_init +tb12 +tb12_init +tb13 +tb13_init +tb14 +tb14_init +tb15 +tb15_init +tb1_init +tb2 +tb2_init +tb3 +tb3_init +tb4 +tb4_init +tb5 +tb5_init +tb6 +tb6_init +tb7 +tb7_init +tb8 +tb8_init +tb9 +tb9_init +vbap16 +vbap4 +vbap4move +vbap8 +vbap8move +xyin +'''.split()) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py index b9299b8712..8fd0ff1be2 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py @@ -470,10 +470,10 @@ BUILTINS = { 'curl_netrc_ignored', 'curl_netrc_optional', 'curl_netrc_required', - 'curl_sslversion_default', - 'curl_sslversion_sslv2', - 'curl_sslversion_sslv3', - 'curl_sslversion_tlsv1', + 'curl_sslversion_default', + 'curl_sslversion_sslv2', + 'curl_sslversion_sslv3', + 'curl_sslversion_tlsv1', 'curl_version_asynchdns', 'curl_version_debug', 'curl_version_gssnegotiate', @@ -1105,7 +1105,7 @@ BUILTINS = { 'json_open_array', 'json_open_object', 'json_period', - 'json_positive', + 'json_positive', 'json_quote_double', 'json_rpccall', 'json_serialize', @@ -1233,7 +1233,7 @@ BUILTINS = { 'lcapi_loadmodules', 'lcapi_updatedatasourceslist', 'ldap_scope_base', - 'ldap_scope_children', + 'ldap_scope_children', 'ldap_scope_onelevel', 'ldap_scope_subtree', 'library_once', @@ -4049,7 +4049,7 @@ MEMBERS = { 'iscntrl', 'isdigit', 'isdir', - 'isdirectory', + 'isdirectory', 'isempty', 'isemptyelement', 'isfirststep', diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py index 21993f2986..f6a9b796ee 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py @@ -28,7 +28,7 @@ MODULES = {'basic': ('_G', 'print', 'rawequal', 'rawget', - 'rawlen', + 'rawlen', 'rawset', 'select', 'setmetatable', @@ -36,20 +36,20 @@ MODULES = {'basic': ('_G', 'tostring', 'type', 'xpcall'), - 'bit32': ('bit32.arshift', - 'bit32.band', - 'bit32.bnot', - 'bit32.bor', - 'bit32.btest', - 'bit32.bxor', - 'bit32.extract', - 'bit32.lrotate', - 'bit32.lshift', - 'bit32.replace', - 'bit32.rrotate', - 'bit32.rshift'), + 'bit32': ('bit32.arshift', + 'bit32.band', + 'bit32.bnot', + 'bit32.bor', + 'bit32.btest', + 'bit32.bxor', + 'bit32.extract', + 'bit32.lrotate', + 'bit32.lshift', + 'bit32.replace', + 'bit32.rrotate', + 'bit32.rshift'), 'coroutine': ('coroutine.create', - 'coroutine.isyieldable', + 'coroutine.isyieldable', 'coroutine.resume', 'coroutine.running', 'coroutine.status', @@ -62,15 +62,15 @@ MODULES = {'basic': ('_G', 'debug.getmetatable', 'debug.getregistry', 'debug.getupvalue', - 'debug.getuservalue', + 'debug.getuservalue', 'debug.sethook', 'debug.setlocal', 'debug.setmetatable', 'debug.setupvalue', - 'debug.setuservalue', - 'debug.traceback', - 'debug.upvalueid', - 'debug.upvaluejoin'), + 'debug.setuservalue', + 'debug.traceback', + 'debug.upvalueid', + 'debug.upvaluejoin'), 'io': ('io.close', 'io.flush', 'io.input', @@ -79,19 +79,19 @@ MODULES = {'basic': ('_G', 'io.output', 'io.popen', 'io.read', - 'io.stderr', - 'io.stdin', - 'io.stdout', + 'io.stderr', + 'io.stdin', + 'io.stdout', 'io.tmpfile', 'io.type', 'io.write'), 'math': ('math.abs', 'math.acos', 'math.asin', - 'math.atan', + 'math.atan', 'math.atan2', 'math.ceil', - 'math.cos', + 'math.cos', 'math.cosh', 'math.deg', 'math.exp', @@ -102,32 +102,32 @@ MODULES = {'basic': ('_G', 'math.ldexp', 'math.log', 'math.max', - 'math.maxinteger', + 'math.maxinteger', 'math.min', - 'math.mininteger', + 'math.mininteger', 'math.modf', 'math.pi', 'math.pow', 'math.rad', 'math.random', 'math.randomseed', - 'math.sin', + 'math.sin', 'math.sinh', 'math.sqrt', - 'math.tan', + 'math.tan', 'math.tanh', - 'math.tointeger', - 'math.type', - 'math.ult'), - 'modules': ('package.config', + 'math.tointeger', + 'math.type', + 'math.ult'), + 'modules': ('package.config', 'package.cpath', 'package.loaded', 'package.loadlib', 'package.path', 'package.preload', - 'package.searchers', - 'package.searchpath', - 'require'), + 'package.searchers', + 'package.searchpath', + 'require'), 'os': ('os.clock', 'os.date', 'os.difftime', @@ -149,37 +149,37 @@ MODULES = {'basic': ('_G', 'string.len', 'string.lower', 'string.match', - 'string.pack', - 'string.packsize', + 'string.pack', + 'string.packsize', 'string.rep', 'string.reverse', 'string.sub', - 'string.unpack', + 'string.unpack', 'string.upper'), 'table': ('table.concat', 'table.insert', - 'table.move', - 'table.pack', + 'table.move', + 'table.pack', 'table.remove', - 'table.sort', - 'table.unpack'), - 'utf8': ('utf8.char', - 'utf8.charpattern', - 'utf8.codepoint', - 'utf8.codes', - 'utf8.len', - 'utf8.offset')} + 'table.sort', + 'table.unpack'), + 'utf8': ('utf8.char', + 'utf8.charpattern', + 'utf8.codepoint', + 'utf8.codes', + 'utf8.len', + 'utf8.offset')} if __name__ == '__main__': # pragma: no cover import re - import sys - - # urllib ends up wanting to import a module called 'math' -- if - # pygments/lexers is in the path, this ends badly. - for i in range(len(sys.path)-1, -1, -1): - if sys.path[i].endswith('/lexers'): - del sys.path[i] - + import sys + + # urllib ends up wanting to import a module called 'math' -- if + # pygments/lexers is in the path, this ends badly. + for i in range(len(sys.path)-1, -1, -1): + if sys.path[i].endswith('/lexers'): + del sys.path[i] + try: from urllib import urlopen except ImportError: @@ -230,7 +230,7 @@ if __name__ == '__main__': # pragma: no cover def get_newest_version(): f = urlopen('http://www.lua.org/manual/') - r = re.compile(r'^<A HREF="(\d\.\d)/">(Lua )?\1</A>') + r = re.compile(r'^<A HREF="(\d\.\d)/">(Lua )?\1</A>') for line in f: m = r.match(line) if m is not None: @@ -238,7 +238,7 @@ if __name__ == '__main__': # pragma: no cover def get_lua_functions(version): f = urlopen('http://www.lua.org/manual/%s/' % version) - r = re.compile(r'^<A HREF="manual.html#pdf-(?!lua|LUA)([^:]+)">\1</A>') + r = re.compile(r'^<A HREF="manual.html#pdf-(?!lua|LUA)([^:]+)">\1</A>') functions = [] for line in f: m = r.match(line) @@ -270,16 +270,16 @@ if __name__ == '__main__': # pragma: no cover def run(): version = get_newest_version() - functions = set() - for v in ('5.2', version): - print('> Downloading function index for Lua %s' % v) - f = get_lua_functions(v) - print('> %d functions found, %d new:' % - (len(f), len(set(f) - functions))) - functions |= set(f) + functions = set() + for v in ('5.2', version): + print('> Downloading function index for Lua %s' % v) + f = get_lua_functions(v) + print('> %d functions found, %d new:' % + (len(f), len(set(f) - functions))) + functions |= set(f) + + functions = sorted(functions) - functions = sorted(functions) - modules = {} for full_function_name in functions: print('>> %s' % full_function_name) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mapping.py b/contrib/python/Pygments/py3/pygments/lexers/_mapping.py index 998e06a636..a7b1b2d96a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mapping.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mapping.py @@ -8,7 +8,7 @@ Do not alter the LEXERS dictionary by hand. - :copyright: Copyright 2006-2014, 2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2014, 2016 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,12 +22,12 @@ LEXERS = { 'AdaLexer': ('pygments.lexers.pascal', 'Ada', ('ada', 'ada95', 'ada2005'), ('*.adb', '*.ads', '*.ada'), ('text/x-ada',)), 'AdlLexer': ('pygments.lexers.archetype', 'ADL', ('adl',), ('*.adl', '*.adls', '*.adlf', '*.adlx'), ()), 'AgdaLexer': ('pygments.lexers.haskell', 'Agda', ('agda',), ('*.agda',), ('text/x-agda',)), - 'AheuiLexer': ('pygments.lexers.esoteric', 'Aheui', ('aheui',), ('*.aheui',), ()), + 'AheuiLexer': ('pygments.lexers.esoteric', 'Aheui', ('aheui',), ('*.aheui',), ()), 'AlloyLexer': ('pygments.lexers.dsls', 'Alloy', ('alloy',), ('*.als',), ('text/x-alloy',)), 'AmbientTalkLexer': ('pygments.lexers.ambient', 'AmbientTalk', ('ambienttalk', 'ambienttalk/2', 'at'), ('*.at',), ('text/x-ambienttalk',)), - 'AmplLexer': ('pygments.lexers.ampl', 'Ampl', ('ampl',), ('*.run',), ()), - 'Angular2HtmlLexer': ('pygments.lexers.templates', 'HTML + Angular2', ('html+ng2',), ('*.ng2',), ()), - 'Angular2Lexer': ('pygments.lexers.templates', 'Angular2', ('ng2',), (), ()), + 'AmplLexer': ('pygments.lexers.ampl', 'Ampl', ('ampl',), ('*.run',), ()), + 'Angular2HtmlLexer': ('pygments.lexers.templates', 'HTML + Angular2', ('html+ng2',), ('*.ng2',), ()), + 'Angular2Lexer': ('pygments.lexers.templates', 'Angular2', ('ng2',), (), ()), 'AntlrActionScriptLexer': ('pygments.lexers.parsers', 'ANTLR With ActionScript Target', ('antlr-actionscript', 'antlr-as'), ('*.G', '*.g'), ()), 'AntlrCSharpLexer': ('pygments.lexers.parsers', 'ANTLR With C# Target', ('antlr-csharp', 'antlr-c#'), ('*.G', '*.g'), ()), 'AntlrCppLexer': ('pygments.lexers.parsers', 'ANTLR With CPP Target', ('antlr-cpp',), ('*.G', '*.g'), ()), @@ -44,14 +44,14 @@ LEXERS = { 'AscLexer': ('pygments.lexers.asc', 'ASCII armored', ('asc', 'pem'), ('*.asc', '*.pem', 'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk', 'id_rsa'), ('application/pgp-keys', 'application/pgp-encrypted', 'application/pgp-signature')), 'AspectJLexer': ('pygments.lexers.jvm', 'AspectJ', ('aspectj',), ('*.aj',), ('text/x-aspectj',)), 'AsymptoteLexer': ('pygments.lexers.graphics', 'Asymptote', ('asymptote', 'asy'), ('*.asy',), ('text/x-asymptote',)), - 'AugeasLexer': ('pygments.lexers.configs', 'Augeas', ('augeas',), ('*.aug',), ()), + 'AugeasLexer': ('pygments.lexers.configs', 'Augeas', ('augeas',), ('*.aug',), ()), 'AutoItLexer': ('pygments.lexers.automation', 'AutoIt', ('autoit',), ('*.au3',), ('text/x-autoit',)), 'AutohotkeyLexer': ('pygments.lexers.automation', 'autohotkey', ('autohotkey', 'ahk'), ('*.ahk', '*.ahkl'), ('text/x-autohotkey',)), 'AwkLexer': ('pygments.lexers.textedit', 'Awk', ('awk', 'gawk', 'mawk', 'nawk'), ('*.awk',), ('application/x-awk',)), - 'BBCBasicLexer': ('pygments.lexers.basic', 'BBC Basic', ('bbcbasic',), ('*.bbc',), ()), + 'BBCBasicLexer': ('pygments.lexers.basic', 'BBC Basic', ('bbcbasic',), ('*.bbc',), ()), 'BBCodeLexer': ('pygments.lexers.markup', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)), 'BCLexer': ('pygments.lexers.algebra', 'BC', ('bc',), ('*.bc',), ()), - 'BSTLexer': ('pygments.lexers.bibtex', 'BST', ('bst', 'bst-pybtex'), ('*.bst',), ()), + 'BSTLexer': ('pygments.lexers.bibtex', 'BST', ('bst', 'bst-pybtex'), ('*.bst',), ()), 'BareLexer': ('pygments.lexers.bare', 'BARE', ('bare',), ('*.bare',), ()), 'BaseMakefileLexer': ('pygments.lexers.make', 'Base Makefile', ('basemake',), (), ()), 'BashLexer': ('pygments.lexers.shell', 'Bash', ('bash', 'sh', 'ksh', 'zsh', 'shell'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib', '*.zsh', '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', '.kshrc', 'kshrc', 'PKGBUILD'), ('application/x-sh', 'application/x-shellscript', 'text/x-shellscript')), @@ -63,9 +63,9 @@ LEXERS = { 'BlitzBasicLexer': ('pygments.lexers.basic', 'BlitzBasic', ('blitzbasic', 'b3d', 'bplus'), ('*.bb', '*.decls'), ('text/x-bb',)), 'BlitzMaxLexer': ('pygments.lexers.basic', 'BlitzMax', ('blitzmax', 'bmax'), ('*.bmx',), ('text/x-bmx',)), 'BnfLexer': ('pygments.lexers.grammar_notation', 'BNF', ('bnf',), ('*.bnf',), ('text/x-bnf',)), - 'BoaLexer': ('pygments.lexers.boa', 'Boa', ('boa',), ('*.boa',), ()), + 'BoaLexer': ('pygments.lexers.boa', 'Boa', ('boa',), ('*.boa',), ()), 'BooLexer': ('pygments.lexers.dotnet', 'Boo', ('boo',), ('*.boo',), ('text/x-boo',)), - 'BoogieLexer': ('pygments.lexers.verification', 'Boogie', ('boogie',), ('*.bpl',), ()), + 'BoogieLexer': ('pygments.lexers.verification', 'Boogie', ('boogie',), ('*.bpl',), ()), 'BrainfuckLexer': ('pygments.lexers.esoteric', 'Brainfuck', ('brainfuck', 'bf'), ('*.bf', '*.b'), ('application/x-brainfuck',)), 'BugsLexer': ('pygments.lexers.modeling', 'BUGS', ('bugs', 'winbugs', 'openbugs'), ('*.bug',), ()), 'CAmkESLexer': ('pygments.lexers.esoteric', 'CAmkES', ('camkes', 'idl4'), ('*.camkes', '*.idl4'), ()), @@ -77,22 +77,22 @@ LEXERS = { 'CSharpLexer': ('pygments.lexers.dotnet', 'C#', ('csharp', 'c#', 'cs'), ('*.cs',), ('text/x-csharp',)), 'Ca65Lexer': ('pygments.lexers.asm', 'ca65 assembler', ('ca65',), ('*.s',), ()), 'CadlLexer': ('pygments.lexers.archetype', 'cADL', ('cadl',), ('*.cadl',), ()), - 'CapDLLexer': ('pygments.lexers.esoteric', 'CapDL', ('capdl',), ('*.cdl',), ()), - 'CapnProtoLexer': ('pygments.lexers.capnproto', "Cap'n Proto", ('capnp',), ('*.capnp',), ()), + 'CapDLLexer': ('pygments.lexers.esoteric', 'CapDL', ('capdl',), ('*.cdl',), ()), + 'CapnProtoLexer': ('pygments.lexers.capnproto', "Cap'n Proto", ('capnp',), ('*.capnp',), ()), 'CbmBasicV2Lexer': ('pygments.lexers.basic', 'CBM BASIC V2', ('cbmbas',), ('*.bas',), ()), 'CddlLexer': ('pygments.lexers.cddl', 'CDDL', ('cddl',), ('*.cddl',), ('text/x-cddl',)), 'CeylonLexer': ('pygments.lexers.jvm', 'Ceylon', ('ceylon',), ('*.ceylon',), ('text/x-ceylon',)), 'Cfengine3Lexer': ('pygments.lexers.configs', 'CFEngine3', ('cfengine3', 'cf3'), ('*.cf',), ()), 'ChaiscriptLexer': ('pygments.lexers.scripting', 'ChaiScript', ('chaiscript', 'chai'), ('*.chai',), ('text/x-chaiscript', 'application/x-chaiscript')), 'ChapelLexer': ('pygments.lexers.chapel', 'Chapel', ('chapel', 'chpl'), ('*.chpl',), ()), - 'CharmciLexer': ('pygments.lexers.c_like', 'Charmci', ('charmci',), ('*.ci',), ()), + 'CharmciLexer': ('pygments.lexers.c_like', 'Charmci', ('charmci',), ('*.ci',), ()), 'CheetahHtmlLexer': ('pygments.lexers.templates', 'HTML+Cheetah', ('html+cheetah', 'html+spitfire', 'htmlcheetah'), (), ('text/html+cheetah', 'text/html+spitfire')), 'CheetahJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Cheetah', ('javascript+cheetah', 'js+cheetah', 'javascript+spitfire', 'js+spitfire'), (), ('application/x-javascript+cheetah', 'text/x-javascript+cheetah', 'text/javascript+cheetah', 'application/x-javascript+spitfire', 'text/x-javascript+spitfire', 'text/javascript+spitfire')), 'CheetahLexer': ('pygments.lexers.templates', 'Cheetah', ('cheetah', 'spitfire'), ('*.tmpl', '*.spt'), ('application/x-cheetah', 'application/x-spitfire')), 'CheetahXmlLexer': ('pygments.lexers.templates', 'XML+Cheetah', ('xml+cheetah', 'xml+spitfire'), (), ('application/xml+cheetah', 'application/xml+spitfire')), 'CirruLexer': ('pygments.lexers.webmisc', 'Cirru', ('cirru',), ('*.cirru',), ('text/x-cirru',)), 'ClayLexer': ('pygments.lexers.c_like', 'Clay', ('clay',), ('*.clay',), ('text/x-clay',)), - 'CleanLexer': ('pygments.lexers.clean', 'Clean', ('clean',), ('*.icl', '*.dcl'), ()), + 'CleanLexer': ('pygments.lexers.clean', 'Clean', ('clean',), ('*.icl', '*.dcl'), ()), 'ClojureLexer': ('pygments.lexers.jvm', 'Clojure', ('clojure', 'clj'), ('*.clj',), ('text/x-clojure', 'application/x-clojure')), 'ClojureScriptLexer': ('pygments.lexers.jvm', 'ClojureScript', ('clojurescript', 'cljs'), ('*.cljs',), ('text/x-clojurescript', 'application/x-clojurescript')), 'CobolFreeformatLexer': ('pygments.lexers.business', 'COBOLFree', ('cobolfree',), ('*.cbl', '*.CBL'), ()), @@ -109,9 +109,9 @@ LEXERS = { 'CrmshLexer': ('pygments.lexers.dsls', 'Crmsh', ('crmsh', 'pcmk'), ('*.crmsh', '*.pcmk'), ()), 'CrocLexer': ('pygments.lexers.d', 'Croc', ('croc',), ('*.croc',), ('text/x-crocsrc',)), 'CryptolLexer': ('pygments.lexers.haskell', 'Cryptol', ('cryptol', 'cry'), ('*.cry',), ('text/x-cryptol',)), - 'CrystalLexer': ('pygments.lexers.crystal', 'Crystal', ('cr', 'crystal'), ('*.cr',), ('text/x-crystal',)), + 'CrystalLexer': ('pygments.lexers.crystal', 'Crystal', ('cr', 'crystal'), ('*.cr',), ('text/x-crystal',)), 'CsoundDocumentLexer': ('pygments.lexers.csound', 'Csound Document', ('csound-document', 'csound-csd'), ('*.csd',), ()), - 'CsoundOrchestraLexer': ('pygments.lexers.csound', 'Csound Orchestra', ('csound', 'csound-orc'), ('*.orc', '*.udo'), ()), + 'CsoundOrchestraLexer': ('pygments.lexers.csound', 'Csound Orchestra', ('csound', 'csound-orc'), ('*.orc', '*.udo'), ()), 'CsoundScoreLexer': ('pygments.lexers.csound', 'Csound Score', ('csound-score', 'csound-sco'), ('*.sco',), ()), 'CssDjangoLexer': ('pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), (), ('text/css+django', 'text/css+jinja')), 'CssErbLexer': ('pygments.lexers.templates', 'CSS+Ruby', ('css+ruby', 'css+erb'), (), ('text/css+ruby',)), @@ -126,9 +126,9 @@ LEXERS = { 'DObjdumpLexer': ('pygments.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)), 'DarcsPatchLexer': ('pygments.lexers.diff', 'Darcs Patch', ('dpatch',), ('*.dpatch', '*.darcspatch'), ()), 'DartLexer': ('pygments.lexers.javascript', 'Dart', ('dart',), ('*.dart',), ('text/x-dart',)), - 'Dasm16Lexer': ('pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16',)), + 'Dasm16Lexer': ('pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16',)), 'DebianControlLexer': ('pygments.lexers.installers', 'Debian Control file', ('debcontrol', 'control'), ('control',), ()), - 'DelphiLexer': ('pygments.lexers.pascal', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas', '*.dpr'), ('text/x-pascal',)), + 'DelphiLexer': ('pygments.lexers.pascal', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas', '*.dpr'), ('text/x-pascal',)), 'DevicetreeLexer': ('pygments.lexers.devicetree', 'Devicetree', ('devicetree', 'dts'), ('*.dts', '*.dtsi'), ('text/x-c',)), 'DgLexer': ('pygments.lexers.python', 'dg', ('dg',), ('*.dg',), ('text/x-dg',)), 'DiffLexer': ('pygments.lexers.diff', 'Diff', ('diff', 'udiff'), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch')), @@ -159,21 +159,21 @@ LEXERS = { 'EvoqueXmlLexer': ('pygments.lexers.templates', 'XML+Evoque', ('xml+evoque',), ('*.xml',), ('application/xml+evoque',)), 'ExeclineLexer': ('pygments.lexers.shell', 'execline', ('execline',), ('*.exec',), ()), 'EzhilLexer': ('pygments.lexers.ezhil', 'Ezhil', ('ezhil',), ('*.n',), ('text/x-ezhil',)), - 'FSharpLexer': ('pygments.lexers.dotnet', 'F#', ('fsharp', 'f#'), ('*.fs', '*.fsi'), ('text/x-fsharp',)), + 'FSharpLexer': ('pygments.lexers.dotnet', 'F#', ('fsharp', 'f#'), ('*.fs', '*.fsi'), ('text/x-fsharp',)), 'FStarLexer': ('pygments.lexers.ml', 'FStar', ('fstar',), ('*.fst', '*.fsti'), ('text/x-fstar',)), 'FactorLexer': ('pygments.lexers.factor', 'Factor', ('factor',), ('*.factor',), ('text/x-factor',)), 'FancyLexer': ('pygments.lexers.ruby', 'Fancy', ('fancy', 'fy'), ('*.fy', '*.fancypack'), ('text/x-fancysrc',)), 'FantomLexer': ('pygments.lexers.fantom', 'Fantom', ('fan',), ('*.fan',), ('application/x-fantom',)), 'FelixLexer': ('pygments.lexers.felix', 'Felix', ('felix', 'flx'), ('*.flx', '*.flxh'), ('text/x-felix',)), - 'FennelLexer': ('pygments.lexers.lisp', 'Fennel', ('fennel', 'fnl'), ('*.fnl',), ()), + 'FennelLexer': ('pygments.lexers.lisp', 'Fennel', ('fennel', 'fnl'), ('*.fnl',), ()), 'FishShellLexer': ('pygments.lexers.shell', 'Fish', ('fish', 'fishshell'), ('*.fish', '*.load'), ('application/x-fish',)), - 'FlatlineLexer': ('pygments.lexers.dsls', 'Flatline', ('flatline',), (), ('text/x-flatline',)), - 'FloScriptLexer': ('pygments.lexers.floscript', 'FloScript', ('floscript', 'flo'), ('*.flo',), ()), - 'ForthLexer': ('pygments.lexers.forth', 'Forth', ('forth',), ('*.frt', '*.fs'), ('application/x-forth',)), + 'FlatlineLexer': ('pygments.lexers.dsls', 'Flatline', ('flatline',), (), ('text/x-flatline',)), + 'FloScriptLexer': ('pygments.lexers.floscript', 'FloScript', ('floscript', 'flo'), ('*.flo',), ()), + 'ForthLexer': ('pygments.lexers.forth', 'Forth', ('forth',), ('*.frt', '*.fs'), ('application/x-forth',)), 'FortranFixedLexer': ('pygments.lexers.fortran', 'FortranFixed', ('fortranfixed',), ('*.f', '*.F'), ()), 'FortranLexer': ('pygments.lexers.fortran', 'Fortran', ('fortran', 'f90'), ('*.f03', '*.f90', '*.F03', '*.F90'), ('text/x-fortran',)), 'FoxProLexer': ('pygments.lexers.foxpro', 'FoxPro', ('foxpro', 'vfp', 'clipper', 'xbase'), ('*.PRG', '*.prg'), ()), - 'FreeFemLexer': ('pygments.lexers.freefem', 'Freefem', ('freefem',), ('*.edp',), ('text/x-freefem',)), + 'FreeFemLexer': ('pygments.lexers.freefem', 'Freefem', ('freefem',), ('*.edp',), ('text/x-freefem',)), 'FutharkLexer': ('pygments.lexers.futhark', 'Futhark', ('futhark',), ('*.fut',), ('text/x-futhark',)), 'GAPLexer': ('pygments.lexers.algebra', 'GAP', ('gap',), ('*.g', '*.gd', '*.gi', '*.gap'), ()), 'GDScriptLexer': ('pygments.lexers.gdscript', 'GDScript', ('gdscript', 'gd'), ('*.gd',), ('text/x-gdscript', 'application/x-gdscript')), @@ -194,15 +194,15 @@ LEXERS = { 'GraphvizLexer': ('pygments.lexers.graphviz', 'Graphviz', ('graphviz', 'dot'), ('*.gv', '*.dot'), ('text/x-graphviz', 'text/vnd.graphviz')), 'GroffLexer': ('pygments.lexers.markup', 'Groff', ('groff', 'nroff', 'man'), ('*.[1-9]', '*.man', '*.1p', '*.3pm'), ('application/x-troff', 'text/troff')), 'GroovyLexer': ('pygments.lexers.jvm', 'Groovy', ('groovy',), ('*.groovy', '*.gradle'), ('text/x-groovy',)), - 'HLSLShaderLexer': ('pygments.lexers.graphics', 'HLSL', ('hlsl',), ('*.hlsl', '*.hlsli'), ('text/x-hlsl',)), + 'HLSLShaderLexer': ('pygments.lexers.graphics', 'HLSL', ('hlsl',), ('*.hlsl', '*.hlsli'), ('text/x-hlsl',)), 'HamlLexer': ('pygments.lexers.html', 'Haml', ('haml',), ('*.haml',), ('text/x-haml',)), 'HandlebarsHtmlLexer': ('pygments.lexers.templates', 'HTML+Handlebars', ('html+handlebars',), ('*.handlebars', '*.hbs'), ('text/html+handlebars', 'text/x-handlebars-template')), 'HandlebarsLexer': ('pygments.lexers.templates', 'Handlebars', ('handlebars',), (), ()), 'HaskellLexer': ('pygments.lexers.haskell', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)), 'HaxeLexer': ('pygments.lexers.haxe', 'Haxe', ('haxe', 'hxsl', 'hx'), ('*.hx', '*.hxsl'), ('text/haxe', 'text/x-haxe', 'text/x-hx')), 'HexdumpLexer': ('pygments.lexers.hexdump', 'Hexdump', ('hexdump',), (), ()), - 'HsailLexer': ('pygments.lexers.asm', 'HSAIL', ('hsail', 'hsa'), ('*.hsail',), ('text/x-hsail',)), - 'HspecLexer': ('pygments.lexers.haskell', 'Hspec', ('hspec',), (), ()), + 'HsailLexer': ('pygments.lexers.asm', 'HSAIL', ('hsail', 'hsa'), ('*.hsail',), ('text/x-hsail',)), + 'HspecLexer': ('pygments.lexers.haskell', 'Hspec', ('hspec',), (), ()), 'HtmlDjangoLexer': ('pygments.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja', 'htmldjango'), (), ('text/html+django', 'text/html+jinja')), 'HtmlGenshiLexer': ('pygments.lexers.templates', 'HTML+Genshi', ('html+genshi', 'html+kid'), (), ('text/html+genshi',)), 'HtmlLexer': ('pygments.lexers.html', 'HTML', ('html',), ('*.html', '*.htm', '*.xhtml', '*.xslt'), ('text/html', 'application/xhtml+xml')), @@ -213,7 +213,7 @@ LEXERS = { 'HyLexer': ('pygments.lexers.lisp', 'Hy', ('hylang',), ('*.hy',), ('text/x-hy', 'application/x-hy')), 'HybrisLexer': ('pygments.lexers.scripting', 'Hybris', ('hybris', 'hy'), ('*.hy', '*.hyb'), ('text/x-hybris', 'application/x-hybris')), 'IDLLexer': ('pygments.lexers.idl', 'IDL', ('idl',), ('*.pro',), ('text/idl',)), - 'IconLexer': ('pygments.lexers.unicon', 'Icon', ('icon',), ('*.icon', '*.ICON'), ()), + 'IconLexer': ('pygments.lexers.unicon', 'Icon', ('icon',), ('*.icon', '*.ICON'), ()), 'IdrisLexer': ('pygments.lexers.haskell', 'Idris', ('idris', 'idr'), ('*.idr',), ('text/x-idris',)), 'IgorLexer': ('pygments.lexers.igor', 'Igor', ('igor', 'igorpro'), ('*.ipf',), ('text/ipf',)), 'Inform6Lexer': ('pygments.lexers.int_fiction', 'Inform 6', ('inform6', 'i6'), ('*.inf',), ()), @@ -236,7 +236,7 @@ LEXERS = { 'JavascriptPhpLexer': ('pygments.lexers.templates', 'JavaScript+PHP', ('javascript+php', 'js+php'), (), ('application/x-javascript+php', 'text/x-javascript+php', 'text/javascript+php')), 'JavascriptSmartyLexer': ('pygments.lexers.templates', 'JavaScript+Smarty', ('javascript+smarty', 'js+smarty'), (), ('application/x-javascript+smarty', 'text/x-javascript+smarty', 'text/javascript+smarty')), 'JclLexer': ('pygments.lexers.scripting', 'JCL', ('jcl',), ('*.jcl',), ('text/x-jcl',)), - 'JsgfLexer': ('pygments.lexers.grammar_notation', 'JSGF', ('jsgf',), ('*.jsgf',), ('application/jsgf', 'application/x-jsgf', 'text/jsgf')), + 'JsgfLexer': ('pygments.lexers.grammar_notation', 'JSGF', ('jsgf',), ('*.jsgf',), ('application/jsgf', 'application/x-jsgf', 'text/jsgf')), 'JsonBareObjectLexer': ('pygments.lexers.data', 'JSONBareObject', (), (), ()), 'JsonLdLexer': ('pygments.lexers.data', 'JSON-LD', ('jsonld', 'json-ld'), ('*.jsonld',), ('application/ld+json',)), 'JsonLexer': ('pygments.lexers.data', 'JSON', ('json', 'json-object'), ('*.json', 'Pipfile.lock'), ('application/json', 'application/json-object')), @@ -297,7 +297,7 @@ LEXERS = { 'Modula2Lexer': ('pygments.lexers.modula2', 'Modula-2', ('modula2', 'm2'), ('*.def', '*.mod'), ('text/x-modula2',)), 'MoinWikiLexer': ('pygments.lexers.markup', 'MoinMoin/Trac Wiki markup', ('trac-wiki', 'moin'), (), ('text/x-trac-wiki',)), 'MonkeyLexer': ('pygments.lexers.basic', 'Monkey', ('monkey',), ('*.monkey',), ('text/x-monkey',)), - 'MonteLexer': ('pygments.lexers.monte', 'Monte', ('monte',), ('*.mt',), ()), + 'MonteLexer': ('pygments.lexers.monte', 'Monte', ('monte',), ('*.mt',), ()), 'MoonScriptLexer': ('pygments.lexers.scripting', 'MoonScript', ('moonscript', 'moon'), ('*.moon',), ('text/x-moonscript', 'application/x-moonscript')), 'MoselLexer': ('pygments.lexers.mosel', 'Mosel', ('mosel',), ('*.mos',), ()), 'MozPreprocCssLexer': ('pygments.lexers.markup', 'CSS+mozpreproc', ('css+mozpreproc',), ('*.css.in',), ()), @@ -315,22 +315,22 @@ LEXERS = { 'MyghtyJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Myghty', ('javascript+myghty', 'js+myghty'), (), ('application/x-javascript+myghty', 'text/x-javascript+myghty', 'text/javascript+mygthy')), 'MyghtyLexer': ('pygments.lexers.templates', 'Myghty', ('myghty',), ('*.myt', 'autodelegate'), ('application/x-myghty',)), 'MyghtyXmlLexer': ('pygments.lexers.templates', 'XML+Myghty', ('xml+myghty',), (), ('application/xml+myghty',)), - 'NCLLexer': ('pygments.lexers.ncl', 'NCL', ('ncl',), ('*.ncl',), ('text/ncl',)), + 'NCLLexer': ('pygments.lexers.ncl', 'NCL', ('ncl',), ('*.ncl',), ('text/ncl',)), 'NSISLexer': ('pygments.lexers.installers', 'NSIS', ('nsis', 'nsi', 'nsh'), ('*.nsi', '*.nsh'), ('text/x-nsis',)), 'NasmLexer': ('pygments.lexers.asm', 'NASM', ('nasm',), ('*.asm', '*.ASM'), ('text/x-nasm',)), 'NasmObjdumpLexer': ('pygments.lexers.asm', 'objdump-nasm', ('objdump-nasm',), ('*.objdump-intel',), ('text/x-nasm-objdump',)), 'NemerleLexer': ('pygments.lexers.dotnet', 'Nemerle', ('nemerle',), ('*.n',), ('text/x-nemerle',)), 'NesCLexer': ('pygments.lexers.c_like', 'nesC', ('nesc',), ('*.nc',), ('text/x-nescsrc',)), 'NestedTextLexer': ('pygments.lexers.configs', 'NestedText', ('nestedtext', 'nt'), ('*.nt',), ()), - 'NewLispLexer': ('pygments.lexers.lisp', 'NewLisp', ('newlisp',), ('*.lsp', '*.nl', '*.kif'), ('text/x-newlisp', 'application/x-newlisp')), + 'NewLispLexer': ('pygments.lexers.lisp', 'NewLisp', ('newlisp',), ('*.lsp', '*.nl', '*.kif'), ('text/x-newlisp', 'application/x-newlisp')), 'NewspeakLexer': ('pygments.lexers.smalltalk', 'Newspeak', ('newspeak',), ('*.ns2',), ('text/x-newspeak',)), - 'NginxConfLexer': ('pygments.lexers.configs', 'Nginx configuration file', ('nginx',), ('nginx.conf',), ('text/x-nginx-conf',)), + 'NginxConfLexer': ('pygments.lexers.configs', 'Nginx configuration file', ('nginx',), ('nginx.conf',), ('text/x-nginx-conf',)), 'NimrodLexer': ('pygments.lexers.nimrod', 'Nimrod', ('nimrod', 'nim'), ('*.nim', '*.nimrod'), ('text/x-nim',)), 'NitLexer': ('pygments.lexers.nit', 'Nit', ('nit',), ('*.nit',), ()), 'NixLexer': ('pygments.lexers.nix', 'Nix', ('nixos', 'nix'), ('*.nix',), ('text/x-nix',)), 'NodeConsoleLexer': ('pygments.lexers.javascript', 'Node.js REPL console session', ('nodejsrepl',), (), ('text/x-nodejsrepl',)), 'NotmuchLexer': ('pygments.lexers.textfmts', 'Notmuch', ('notmuch',), (), ()), - 'NuSMVLexer': ('pygments.lexers.smv', 'NuSMV', ('nusmv',), ('*.smv',), ()), + 'NuSMVLexer': ('pygments.lexers.smv', 'NuSMV', ('nusmv',), ('*.smv',), ()), 'NumPyLexer': ('pygments.lexers.python', 'NumPy', ('numpy',), (), ()), 'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)), 'ObjectiveCLexer': ('pygments.lexers.objective', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m', '*.h'), ('text/x-objective-c',)), @@ -357,7 +357,7 @@ LEXERS = { 'PkgConfigLexer': ('pygments.lexers.configs', 'PkgConfig', ('pkgconfig',), ('*.pc',), ()), 'PlPgsqlLexer': ('pygments.lexers.sql', 'PL/pgSQL', ('plpgsql',), (), ('text/x-plpgsql',)), 'PointlessLexer': ('pygments.lexers.pointless', 'Pointless', ('pointless',), ('*.ptls',), ()), - 'PonyLexer': ('pygments.lexers.pony', 'Pony', ('pony',), ('*.pony',), ()), + 'PonyLexer': ('pygments.lexers.pony', 'Pony', ('pony',), ('*.pony',), ()), 'PostScriptLexer': ('pygments.lexers.graphics', 'PostScript', ('postscript', 'postscr'), ('*.ps', '*.eps'), ('application/postscript',)), 'PostgresConsoleLexer': ('pygments.lexers.sql', 'PostgreSQL console (psql)', ('psql', 'postgresql-console', 'postgres-console'), (), ('text/x-postgresql-psql',)), 'PostgresLexer': ('pygments.lexers.sql', 'PostgreSQL SQL dialect', ('postgresql', 'postgres'), (), ('text/x-postgresql',)), @@ -371,7 +371,7 @@ LEXERS = { 'PropertiesLexer': ('pygments.lexers.configs', 'Properties', ('properties', 'jproperties'), ('*.properties',), ('text/x-java-properties',)), 'ProtoBufLexer': ('pygments.lexers.dsls', 'Protocol Buffer', ('protobuf', 'proto'), ('*.proto',), ()), 'PsyshConsoleLexer': ('pygments.lexers.php', 'PsySH console session for PHP', ('psysh',), (), ()), - 'PugLexer': ('pygments.lexers.html', 'Pug', ('pug', 'jade'), ('*.pug', '*.jade'), ('text/x-pug', 'text/x-jade')), + 'PugLexer': ('pygments.lexers.html', 'Pug', ('pug', 'jade'), ('*.pug', '*.jade'), ('text/x-pug', 'text/x-jade')), 'PuppetLexer': ('pygments.lexers.dsls', 'Puppet', ('puppet',), ('*.pp',), ()), 'PyPyLogLexer': ('pygments.lexers.console', 'PyPy Log', ('pypylog', 'pypy'), ('*.pypylog',), ('application/x-pypylog',)), 'Python2Lexer': ('pygments.lexers.python', 'Python 2.x', ('python2', 'py2'), (), ('text/x-python2', 'application/x-python2')), @@ -416,10 +416,10 @@ LEXERS = { 'RubyConsoleLexer': ('pygments.lexers.ruby', 'Ruby irb session', ('rbcon', 'irb'), (), ('text/x-ruby-shellsession',)), 'RubyLexer': ('pygments.lexers.ruby', 'Ruby', ('ruby', 'rb', 'duby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby', 'Gemfile', 'Vagrantfile'), ('text/x-ruby', 'application/x-ruby')), 'RustLexer': ('pygments.lexers.rust', 'Rust', ('rust', 'rs'), ('*.rs', '*.rs.in'), ('text/rust', 'text/x-rust')), - 'SASLexer': ('pygments.lexers.sas', 'SAS', ('sas',), ('*.SAS', '*.sas'), ('text/x-sas', 'text/sas', 'application/x-sas')), + 'SASLexer': ('pygments.lexers.sas', 'SAS', ('sas',), ('*.SAS', '*.sas'), ('text/x-sas', 'text/sas', 'application/x-sas')), 'SLexer': ('pygments.lexers.r', 'S', ('splus', 's', 'r'), ('*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'), ('text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', 'text/x-R', 'text/x-r-history', 'text/x-r-profile')), 'SMLLexer': ('pygments.lexers.ml', 'Standard ML', ('sml',), ('*.sml', '*.sig', '*.fun'), ('text/x-standardml', 'application/x-standardml')), - 'SarlLexer': ('pygments.lexers.jvm', 'SARL', ('sarl',), ('*.sarl',), ('text/x-sarl',)), + 'SarlLexer': ('pygments.lexers.jvm', 'SARL', ('sarl',), ('*.sarl',), ('text/x-sarl',)), 'SassLexer': ('pygments.lexers.css', 'Sass', ('sass',), ('*.sass',), ('text/x-sass',)), 'SaviLexer': ('pygments.lexers.savi', 'Savi', ('savi',), ('*.savi',), ()), 'ScalaLexer': ('pygments.lexers.jvm', 'Scala', ('scala',), ('*.scala',), ('text/x-scala',)), @@ -432,18 +432,18 @@ LEXERS = { 'ShExCLexer': ('pygments.lexers.rdf', 'ShExC', ('shexc', 'shex'), ('*.shex',), ('text/shex',)), 'ShenLexer': ('pygments.lexers.lisp', 'Shen', ('shen',), ('*.shen',), ('text/x-shen', 'application/x-shen')), 'SieveLexer': ('pygments.lexers.sieve', 'Sieve', ('sieve',), ('*.siv', '*.sieve'), ()), - 'SilverLexer': ('pygments.lexers.verification', 'Silver', ('silver',), ('*.sil', '*.vpr'), ()), + 'SilverLexer': ('pygments.lexers.verification', 'Silver', ('silver',), ('*.sil', '*.vpr'), ()), 'SingularityLexer': ('pygments.lexers.configs', 'Singularity', ('singularity',), ('*.def', 'Singularity'), ()), 'SlashLexer': ('pygments.lexers.slash', 'Slash', ('slash',), ('*.sla',), ()), 'SlimLexer': ('pygments.lexers.webmisc', 'Slim', ('slim',), ('*.slim',), ('text/x-slim',)), - 'SlurmBashLexer': ('pygments.lexers.shell', 'Slurm', ('slurm', 'sbatch'), ('*.sl',), ()), + 'SlurmBashLexer': ('pygments.lexers.shell', 'Slurm', ('slurm', 'sbatch'), ('*.sl',), ()), 'SmaliLexer': ('pygments.lexers.dalvik', 'Smali', ('smali',), ('*.smali',), ('text/smali',)), 'SmalltalkLexer': ('pygments.lexers.smalltalk', 'Smalltalk', ('smalltalk', 'squeak', 'st'), ('*.st',), ('text/x-smalltalk',)), - 'SmartGameFormatLexer': ('pygments.lexers.sgf', 'SmartGameFormat', ('sgf',), ('*.sgf',), ()), + 'SmartGameFormatLexer': ('pygments.lexers.sgf', 'SmartGameFormat', ('sgf',), ('*.sgf',), ()), 'SmartyLexer': ('pygments.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)), 'SmithyLexer': ('pygments.lexers.smithy', 'Smithy', ('smithy',), ('*.smithy',), ()), 'SnobolLexer': ('pygments.lexers.snobol', 'Snobol', ('snobol',), ('*.snobol',), ('text/x-snobol',)), - 'SnowballLexer': ('pygments.lexers.dsls', 'Snowball', ('snowball',), ('*.sbl',), ()), + 'SnowballLexer': ('pygments.lexers.dsls', 'Snowball', ('snowball',), ('*.sbl',), ()), 'SolidityLexer': ('pygments.lexers.solidity', 'Solidity', ('solidity',), ('*.sol',), ()), 'SophiaLexer': ('pygments.lexers.sophia', 'Sophia', ('sophia',), ('*.aes',), ()), 'SourcePawnLexer': ('pygments.lexers.pawn', 'SourcePawn', ('sp',), ('*.sp',), ('text/x-sourcepawn',)), @@ -456,7 +456,7 @@ LEXERS = { 'SrcinfoLexer': ('pygments.lexers.srcinfo', 'Srcinfo', ('srcinfo',), ('.SRCINFO',), ()), 'SspLexer': ('pygments.lexers.templates', 'Scalate Server Page', ('ssp',), ('*.ssp',), ('application/x-ssp',)), 'StanLexer': ('pygments.lexers.modeling', 'Stan', ('stan',), ('*.stan',), ()), - 'StataLexer': ('pygments.lexers.stata', 'Stata', ('stata', 'do'), ('*.do', '*.ado'), ('text/x-stata', 'text/stata', 'application/x-stata')), + 'StataLexer': ('pygments.lexers.stata', 'Stata', ('stata', 'do'), ('*.do', '*.ado'), ('text/x-stata', 'text/stata', 'application/x-stata')), 'SuperColliderLexer': ('pygments.lexers.supercollider', 'SuperCollider', ('supercollider', 'sc'), ('*.sc', '*.scd'), ('application/supercollider', 'text/supercollider')), 'SwiftLexer': ('pygments.lexers.objective', 'Swift', ('swift',), ('*.swift',), ('text/x-swift',)), 'SwigLexer': ('pygments.lexers.c_like', 'SWIG', ('swig',), ('*.swg', '*.i'), ('text/swig',)), @@ -465,7 +465,7 @@ LEXERS = { 'TNTLexer': ('pygments.lexers.tnt', 'Typographic Number Theory', ('tnt',), ('*.tnt',), ()), 'TOMLLexer': ('pygments.lexers.configs', 'TOML', ('toml',), ('*.toml', 'Pipfile', 'poetry.lock'), ()), 'Tads3Lexer': ('pygments.lexers.int_fiction', 'TADS 3', ('tads3',), ('*.t',), ()), - 'TasmLexer': ('pygments.lexers.asm', 'TASM', ('tasm',), ('*.asm', '*.ASM', '*.tasm'), ('text/x-tasm',)), + 'TasmLexer': ('pygments.lexers.asm', 'TASM', ('tasm',), ('*.asm', '*.ASM', '*.tasm'), ('text/x-tasm',)), 'TclLexer': ('pygments.lexers.tcl', 'Tcl', ('tcl',), ('*.tcl', '*.rvt'), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')), 'TcshLexer': ('pygments.lexers.shell', 'Tcsh', ('tcsh', 'csh'), ('*.tcsh', '*.csh'), ('application/x-csh',)), 'TcshSessionLexer': ('pygments.lexers.shell', 'Tcsh Session', ('tcshcon',), (), ()), @@ -481,22 +481,22 @@ LEXERS = { 'ThriftLexer': ('pygments.lexers.dsls', 'Thrift', ('thrift',), ('*.thrift',), ('application/x-thrift',)), 'TiddlyWiki5Lexer': ('pygments.lexers.markup', 'tiddler', ('tid',), ('*.tid',), ('text/vnd.tiddlywiki',)), 'TodotxtLexer': ('pygments.lexers.textfmts', 'Todotxt', ('todotxt',), ('todo.txt', '*.todotxt'), ('text/x-todo',)), - 'TransactSqlLexer': ('pygments.lexers.sql', 'Transact-SQL', ('tsql', 't-sql'), ('*.sql',), ('text/x-tsql',)), + 'TransactSqlLexer': ('pygments.lexers.sql', 'Transact-SQL', ('tsql', 't-sql'), ('*.sql',), ('text/x-tsql',)), 'TreetopLexer': ('pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()), 'TurtleLexer': ('pygments.lexers.rdf', 'Turtle', ('turtle',), ('*.ttl',), ('text/turtle', 'application/x-turtle')), 'TwigHtmlLexer': ('pygments.lexers.templates', 'HTML+Twig', ('html+twig',), ('*.twig',), ('text/html+twig',)), 'TwigLexer': ('pygments.lexers.templates', 'Twig', ('twig',), (), ('application/x-twig',)), 'TypeScriptLexer': ('pygments.lexers.javascript', 'TypeScript', ('typescript', 'ts'), ('*.ts',), ('application/x-typescript', 'text/x-typescript')), - 'TypoScriptCssDataLexer': ('pygments.lexers.typoscript', 'TypoScriptCssData', ('typoscriptcssdata',), (), ()), - 'TypoScriptHtmlDataLexer': ('pygments.lexers.typoscript', 'TypoScriptHtmlData', ('typoscripthtmldata',), (), ()), - 'TypoScriptLexer': ('pygments.lexers.typoscript', 'TypoScript', ('typoscript',), ('*.typoscript',), ('text/x-typoscript',)), - 'UcodeLexer': ('pygments.lexers.unicon', 'ucode', ('ucode',), ('*.u', '*.u1', '*.u2'), ()), - 'UniconLexer': ('pygments.lexers.unicon', 'Unicon', ('unicon',), ('*.icn',), ('text/unicon',)), + 'TypoScriptCssDataLexer': ('pygments.lexers.typoscript', 'TypoScriptCssData', ('typoscriptcssdata',), (), ()), + 'TypoScriptHtmlDataLexer': ('pygments.lexers.typoscript', 'TypoScriptHtmlData', ('typoscripthtmldata',), (), ()), + 'TypoScriptLexer': ('pygments.lexers.typoscript', 'TypoScript', ('typoscript',), ('*.typoscript',), ('text/x-typoscript',)), + 'UcodeLexer': ('pygments.lexers.unicon', 'ucode', ('ucode',), ('*.u', '*.u1', '*.u2'), ()), + 'UniconLexer': ('pygments.lexers.unicon', 'Unicon', ('unicon',), ('*.icn',), ('text/unicon',)), 'UrbiscriptLexer': ('pygments.lexers.urbi', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)), 'UsdLexer': ('pygments.lexers.usd', 'USD', ('usd', 'usda'), ('*.usd', '*.usda'), ()), - 'VBScriptLexer': ('pygments.lexers.basic', 'VBScript', ('vbscript',), ('*.vbs', '*.VBS'), ()), - 'VCLLexer': ('pygments.lexers.varnish', 'VCL', ('vcl',), ('*.vcl',), ('text/x-vclsrc',)), - 'VCLSnippetLexer': ('pygments.lexers.varnish', 'VCLSnippets', ('vclsnippets', 'vclsnippet'), (), ('text/x-vclsnippet',)), + 'VBScriptLexer': ('pygments.lexers.basic', 'VBScript', ('vbscript',), ('*.vbs', '*.VBS'), ()), + 'VCLLexer': ('pygments.lexers.varnish', 'VCL', ('vcl',), ('*.vcl',), ('text/x-vclsrc',)), + 'VCLSnippetLexer': ('pygments.lexers.varnish', 'VCLSnippets', ('vclsnippets', 'vclsnippet'), (), ('text/x-vclsnippet',)), 'VCTreeStatusLexer': ('pygments.lexers.console', 'VCTreeStatus', ('vctreestatus',), (), ()), 'VGLLexer': ('pygments.lexers.dsls', 'VGL', ('vgl',), ('*.rpf',), ()), 'ValaLexer': ('pygments.lexers.c_like', 'Vala', ('vala', 'vapi'), ('*.vala', '*.vapi'), ('text/x-vala',)), @@ -508,10 +508,10 @@ LEXERS = { 'VerilogLexer': ('pygments.lexers.hdl', 'verilog', ('verilog', 'v'), ('*.v',), ('text/x-verilog',)), 'VhdlLexer': ('pygments.lexers.hdl', 'vhdl', ('vhdl',), ('*.vhdl', '*.vhd'), ('text/x-vhdl',)), 'VimLexer': ('pygments.lexers.textedit', 'VimL', ('vim',), ('*.vim', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc', 'vimrc', 'gvimrc'), ('text/x-vim',)), - 'WDiffLexer': ('pygments.lexers.diff', 'WDiff', ('wdiff',), ('*.wdiff',), ()), + 'WDiffLexer': ('pygments.lexers.diff', 'WDiff', ('wdiff',), ('*.wdiff',), ()), 'WatLexer': ('pygments.lexers.webassembly', 'WebAssembly', ('wast', 'wat'), ('*.wat', '*.wast'), ()), 'WebIDLLexer': ('pygments.lexers.webidl', 'Web IDL', ('webidl',), ('*.webidl',), ()), - 'WhileyLexer': ('pygments.lexers.whiley', 'Whiley', ('whiley',), ('*.whiley',), ('text/x-whiley',)), + 'WhileyLexer': ('pygments.lexers.whiley', 'Whiley', ('whiley',), ('*.whiley',), ('text/x-whiley',)), 'X10Lexer': ('pygments.lexers.x10', 'X10', ('x10', 'xten'), ('*.x10',), ('text/x-x10',)), 'XQueryLexer': ('pygments.lexers.webmisc', 'XQuery', ('xquery', 'xqy', 'xq', 'xql', 'xqm'), ('*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm'), ('text/xquery', 'application/xquery')), 'XmlDjangoLexer': ('pygments.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), (), ('application/xml+django', 'application/xml+jinja')), @@ -519,10 +519,10 @@ LEXERS = { 'XmlLexer': ('pygments.lexers.html', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl', '*.wsf'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml')), 'XmlPhpLexer': ('pygments.lexers.templates', 'XML+PHP', ('xml+php',), (), ('application/xml+php',)), 'XmlSmartyLexer': ('pygments.lexers.templates', 'XML+Smarty', ('xml+smarty',), (), ('application/xml+smarty',)), - 'XorgLexer': ('pygments.lexers.xorg', 'Xorg', ('xorg.conf',), ('xorg.conf',), ()), + 'XorgLexer': ('pygments.lexers.xorg', 'Xorg', ('xorg.conf',), ('xorg.conf',), ()), 'XsltLexer': ('pygments.lexers.html', 'XSLT', ('xslt',), ('*.xsl', '*.xslt', '*.xpl'), ('application/xsl+xml', 'application/xslt+xml')), 'XtendLexer': ('pygments.lexers.jvm', 'Xtend', ('xtend',), ('*.xtend',), ('text/x-xtend',)), - 'XtlangLexer': ('pygments.lexers.lisp', 'xtlang', ('extempore',), ('*.xtm',), ()), + 'XtlangLexer': ('pygments.lexers.lisp', 'xtlang', ('extempore',), ('*.xtm',), ()), 'YamlJinjaLexer': ('pygments.lexers.templates', 'YAML+Jinja', ('yaml+jinja', 'salt', 'sls'), ('*.sls',), ('text/x-yaml+jinja', 'text/x-sls')), 'YamlLexer': ('pygments.lexers.data', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',)), 'YangLexer': ('pygments.lexers.yang', 'YANG', ('yang',), ('*.yang',), ('application/yang',)), @@ -572,7 +572,7 @@ if __name__ == '__main__': # pragma: no cover footer = content[content.find("if __name__ == '__main__':"):] # write new file - with open(__file__, 'w') as fp: + with open(__file__, 'w') as fp: fp.write(header) fp.write('LEXERS = {\n %s,\n}\n\n' % ',\n '.join(found_lexers)) fp.write(footer) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py index 24e9e2756a..168cb4460b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py @@ -4685,7 +4685,7 @@ if __name__ == '__main__': # pragma: no cover PHP_MANUAL_URL = 'http://us3.php.net/distributions/manual/php_manual_en.tar.gz' PHP_MANUAL_DIR = './php-chunked-xhtml/' PHP_REFERENCE_GLOB = 'ref.*' - PHP_FUNCTION_RE = r'<a href="function\..*?\.html">(.*?)</a>' + PHP_FUNCTION_RE = r'<a href="function\..*?\.html">(.*?)</a>' PHP_MODULE_RE = '<title>(.*?) Functions</title>' def get_php_functions(): @@ -4695,19 +4695,19 @@ if __name__ == '__main__': # pragma: no cover for file in get_php_references(): module = '' - with open(file) as f: - for line in f: - if not module: - search = module_re.search(line) - if search: - module = search.group(1) - modules[module] = [] + with open(file) as f: + for line in f: + if not module: + search = module_re.search(line) + if search: + module = search.group(1) + modules[module] = [] - elif 'href="function.' in line: - for match in function_re.finditer(line): - fn = match.group(1) - if '->' not in fn and '::' not in fn and fn not in modules[module]: - modules[module].append(fn) + elif 'href="function.' in line: + for match in function_re.finditer(line): + fn = match.group(1) + if '->' not in fn and '::' not in fn and fn not in modules[module]: + modules[module].append(fn) if module: # These are dummy manual pages, not actual functions @@ -4724,8 +4724,8 @@ if __name__ == '__main__': # pragma: no cover def get_php_references(): download = urlretrieve(PHP_MANUAL_URL) - with tarfile.open(download[0]) as tar: - tar.extractall() + with tarfile.open(download[0]) as tar: + tar.extractall() yield from glob.glob("%s%s" % (PHP_MANUAL_DIR, PHP_REFERENCE_GLOB)) os.remove(download[0]) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py index 571d3e2371..f15167053a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py @@ -3,15 +3,15 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names of functions for Stan used by - ``pygments.lexers.math.StanLexer. This is for Stan language version 2.17.0. + ``pygments.lexers.math.StanLexer. This is for Stan language version 2.17.0. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ KEYWORDS = ( - 'break', - 'continue', + 'break', + 'continue', 'else', 'for', 'if', @@ -19,7 +19,7 @@ KEYWORDS = ( 'print', 'reject', 'return', - 'while', + 'while', ) TYPES = ( @@ -36,15 +36,15 @@ TYPES = ( 'simplex', 'unit_vector', 'vector', - 'void', -) + 'void', +) FUNCTIONS = ( 'abs', 'acos', 'acosh', - 'algebra_solver', - 'append_array', + 'algebra_solver', + 'append_array', 'append_col', 'append_row', 'asin', @@ -53,58 +53,58 @@ FUNCTIONS = ( 'atan2', 'atanh', 'bernoulli_cdf', - 'bernoulli_lccdf', - 'bernoulli_lcdf', - 'bernoulli_logit_lpmf', - 'bernoulli_logit_rng', - 'bernoulli_lpmf', + 'bernoulli_lccdf', + 'bernoulli_lcdf', + 'bernoulli_logit_lpmf', + 'bernoulli_logit_rng', + 'bernoulli_lpmf', 'bernoulli_rng', 'bessel_first_kind', 'bessel_second_kind', 'beta_binomial_cdf', - 'beta_binomial_lccdf', - 'beta_binomial_lcdf', - 'beta_binomial_lpmf', + 'beta_binomial_lccdf', + 'beta_binomial_lcdf', + 'beta_binomial_lpmf', 'beta_binomial_rng', 'beta_cdf', - 'beta_lccdf', - 'beta_lcdf', - 'beta_lpdf', + 'beta_lccdf', + 'beta_lcdf', + 'beta_lpdf', 'beta_rng', 'binary_log_loss', 'binomial_cdf', 'binomial_coefficient_log', - 'binomial_lccdf', - 'binomial_lcdf', - 'binomial_logit_lpmf', - 'binomial_lpmf', + 'binomial_lccdf', + 'binomial_lcdf', + 'binomial_logit_lpmf', + 'binomial_lpmf', 'binomial_rng', 'block', - 'categorical_logit_lpmf', - 'categorical_logit_rng', - 'categorical_lpmf', + 'categorical_logit_lpmf', + 'categorical_logit_rng', + 'categorical_lpmf', 'categorical_rng', 'cauchy_cdf', - 'cauchy_lccdf', - 'cauchy_lcdf', - 'cauchy_lpdf', + 'cauchy_lccdf', + 'cauchy_lcdf', + 'cauchy_lpdf', 'cauchy_rng', 'cbrt', 'ceil', 'chi_square_cdf', - 'chi_square_lccdf', - 'chi_square_lcdf', - 'chi_square_lpdf', + 'chi_square_lccdf', + 'chi_square_lcdf', + 'chi_square_lpdf', 'chi_square_rng', 'cholesky_decompose', - 'choose', + 'choose', 'col', 'cols', 'columns_dot_product', 'columns_dot_self', 'cos', 'cosh', - 'cov_exp_quad', + 'cov_exp_quad', 'crossprod', 'csr_extract_u', 'csr_extract_v', @@ -119,15 +119,15 @@ FUNCTIONS = ( 'diagonal', 'digamma', 'dims', - 'dirichlet_lpdf', + 'dirichlet_lpdf', 'dirichlet_rng', 'distance', 'dot_product', 'dot_self', 'double_exponential_cdf', - 'double_exponential_lccdf', - 'double_exponential_lcdf', - 'double_exponential_lpdf', + 'double_exponential_lccdf', + 'double_exponential_lcdf', + 'double_exponential_lpdf', 'double_exponential_rng', 'e', 'eigenvalues_sym', @@ -137,15 +137,15 @@ FUNCTIONS = ( 'exp', 'exp2', 'exp_mod_normal_cdf', - 'exp_mod_normal_lccdf', - 'exp_mod_normal_lcdf', - 'exp_mod_normal_lpdf', + 'exp_mod_normal_lccdf', + 'exp_mod_normal_lcdf', + 'exp_mod_normal_lpdf', 'exp_mod_normal_rng', 'expm1', 'exponential_cdf', - 'exponential_lccdf', - 'exponential_lcdf', - 'exponential_lpdf', + 'exponential_lccdf', + 'exponential_lcdf', + 'exponential_lpdf', 'exponential_rng', 'fabs', 'falling_factorial', @@ -156,64 +156,64 @@ FUNCTIONS = ( 'fmin', 'fmod', 'frechet_cdf', - 'frechet_lccdf', - 'frechet_lcdf', - 'frechet_lpdf', + 'frechet_lccdf', + 'frechet_lcdf', + 'frechet_lpdf', 'frechet_rng', 'gamma_cdf', - 'gamma_lccdf', - 'gamma_lcdf', - 'gamma_lpdf', + 'gamma_lccdf', + 'gamma_lcdf', + 'gamma_lpdf', 'gamma_p', 'gamma_q', 'gamma_rng', - 'gaussian_dlm_obs_lpdf', + 'gaussian_dlm_obs_lpdf', 'get_lp', 'gumbel_cdf', - 'gumbel_lccdf', - 'gumbel_lcdf', - 'gumbel_lpdf', + 'gumbel_lccdf', + 'gumbel_lcdf', + 'gumbel_lpdf', 'gumbel_rng', 'head', - 'hypergeometric_lpmf', + 'hypergeometric_lpmf', 'hypergeometric_rng', 'hypot', - 'inc_beta', + 'inc_beta', 'int_step', - 'integrate_ode', - 'integrate_ode_bdf', - 'integrate_ode_rk45', + 'integrate_ode', + 'integrate_ode_bdf', + 'integrate_ode_rk45', 'inv', 'inv_chi_square_cdf', - 'inv_chi_square_lccdf', - 'inv_chi_square_lcdf', - 'inv_chi_square_lpdf', + 'inv_chi_square_lccdf', + 'inv_chi_square_lcdf', + 'inv_chi_square_lpdf', 'inv_chi_square_rng', 'inv_cloglog', 'inv_gamma_cdf', - 'inv_gamma_lccdf', - 'inv_gamma_lcdf', - 'inv_gamma_lpdf', + 'inv_gamma_lccdf', + 'inv_gamma_lcdf', + 'inv_gamma_lpdf', 'inv_gamma_rng', 'inv_logit', - 'inv_Phi', + 'inv_Phi', 'inv_sqrt', 'inv_square', - 'inv_wishart_lpdf', + 'inv_wishart_lpdf', 'inv_wishart_rng', 'inverse', 'inverse_spd', 'is_inf', 'is_nan', 'lbeta', - 'lchoose', + 'lchoose', 'lgamma', - 'lkj_corr_cholesky_lpdf', + 'lkj_corr_cholesky_lpdf', 'lkj_corr_cholesky_rng', - 'lkj_corr_lpdf', + 'lkj_corr_lpdf', 'lkj_corr_rng', 'lmgamma', - 'lmultiply', + 'lmultiply', 'log', 'log10', 'log1m', @@ -231,86 +231,86 @@ FUNCTIONS = ( 'log_softmax', 'log_sum_exp', 'logistic_cdf', - 'logistic_lccdf', - 'logistic_lcdf', - 'logistic_lpdf', + 'logistic_lccdf', + 'logistic_lcdf', + 'logistic_lpdf', 'logistic_rng', 'logit', 'lognormal_cdf', - 'lognormal_lccdf', - 'lognormal_lcdf', - 'lognormal_lpdf', + 'lognormal_lccdf', + 'lognormal_lcdf', + 'lognormal_lpdf', 'lognormal_rng', 'machine_precision', - 'matrix_exp', + 'matrix_exp', 'max', - 'mdivide_left_spd', + 'mdivide_left_spd', 'mdivide_left_tri_low', - 'mdivide_right_spd', + 'mdivide_right_spd', 'mdivide_right_tri_low', 'mean', 'min', 'modified_bessel_first_kind', 'modified_bessel_second_kind', - 'multi_gp_cholesky_lpdf', - 'multi_gp_lpdf', - 'multi_normal_cholesky_lpdf', + 'multi_gp_cholesky_lpdf', + 'multi_gp_lpdf', + 'multi_normal_cholesky_lpdf', 'multi_normal_cholesky_rng', - 'multi_normal_lpdf', - 'multi_normal_prec_lpdf', + 'multi_normal_lpdf', + 'multi_normal_prec_lpdf', 'multi_normal_rng', - 'multi_student_t_lpdf', + 'multi_student_t_lpdf', 'multi_student_t_rng', - 'multinomial_lpmf', + 'multinomial_lpmf', 'multinomial_rng', 'multiply_log', 'multiply_lower_tri_self_transpose', 'neg_binomial_2_cdf', - 'neg_binomial_2_lccdf', - 'neg_binomial_2_lcdf', - 'neg_binomial_2_log_lpmf', + 'neg_binomial_2_lccdf', + 'neg_binomial_2_lcdf', + 'neg_binomial_2_log_lpmf', 'neg_binomial_2_log_rng', - 'neg_binomial_2_lpmf', + 'neg_binomial_2_lpmf', 'neg_binomial_2_rng', 'neg_binomial_cdf', - 'neg_binomial_lccdf', - 'neg_binomial_lcdf', - 'neg_binomial_lpmf', + 'neg_binomial_lccdf', + 'neg_binomial_lcdf', + 'neg_binomial_lpmf', 'neg_binomial_rng', 'negative_infinity', 'normal_cdf', - 'normal_lccdf', - 'normal_lcdf', - 'normal_lpdf', + 'normal_lccdf', + 'normal_lcdf', + 'normal_lpdf', 'normal_rng', 'not_a_number', 'num_elements', - 'ordered_logistic_lpmf', + 'ordered_logistic_lpmf', 'ordered_logistic_rng', 'owens_t', 'pareto_cdf', - 'pareto_lccdf', - 'pareto_lcdf', - 'pareto_lpdf', + 'pareto_lccdf', + 'pareto_lcdf', + 'pareto_lpdf', 'pareto_rng', 'pareto_type_2_cdf', - 'pareto_type_2_lccdf', - 'pareto_type_2_lcdf', - 'pareto_type_2_lpdf', + 'pareto_type_2_lccdf', + 'pareto_type_2_lcdf', + 'pareto_type_2_lpdf', 'pareto_type_2_rng', - 'Phi', - 'Phi_approx', + 'Phi', + 'Phi_approx', 'pi', 'poisson_cdf', - 'poisson_lccdf', - 'poisson_lcdf', - 'poisson_log_lpmf', + 'poisson_lccdf', + 'poisson_lcdf', + 'poisson_log_lpmf', 'poisson_log_rng', - 'poisson_lpmf', + 'poisson_lpmf', 'poisson_rng', 'positive_infinity', 'pow', - 'print', + 'print', 'prod', 'qr_Q', 'qr_R', @@ -319,11 +319,11 @@ FUNCTIONS = ( 'quad_form_sym', 'rank', 'rayleigh_cdf', - 'rayleigh_lccdf', - 'rayleigh_lcdf', - 'rayleigh_lpdf', + 'rayleigh_lccdf', + 'rayleigh_lcdf', + 'rayleigh_lpdf', 'rayleigh_rng', - 'reject', + 'reject', 'rep_array', 'rep_matrix', 'rep_row_vector', @@ -335,9 +335,9 @@ FUNCTIONS = ( 'rows_dot_product', 'rows_dot_self', 'scaled_inv_chi_square_cdf', - 'scaled_inv_chi_square_lccdf', - 'scaled_inv_chi_square_lcdf', - 'scaled_inv_chi_square_lpdf', + 'scaled_inv_chi_square_lccdf', + 'scaled_inv_chi_square_lcdf', + 'scaled_inv_chi_square_lpdf', 'scaled_inv_chi_square_rng', 'sd', 'segment', @@ -346,9 +346,9 @@ FUNCTIONS = ( 'sinh', 'size', 'skew_normal_cdf', - 'skew_normal_lccdf', - 'skew_normal_lcdf', - 'skew_normal_lpdf', + 'skew_normal_lccdf', + 'skew_normal_lcdf', + 'skew_normal_lpdf', 'skew_normal_rng', 'softmax', 'sort_asc', @@ -361,9 +361,9 @@ FUNCTIONS = ( 'squared_distance', 'step', 'student_t_cdf', - 'student_t_lccdf', - 'student_t_lcdf', - 'student_t_lpdf', + 'student_t_lccdf', + 'student_t_lcdf', + 'student_t_lpdf', 'student_t_rng', 'sub_col', 'sub_row', @@ -371,7 +371,7 @@ FUNCTIONS = ( 'tail', 'tan', 'tanh', - 'target', + 'target', 'tcrossprod', 'tgamma', 'to_array_1d', @@ -385,21 +385,21 @@ FUNCTIONS = ( 'trigamma', 'trunc', 'uniform_cdf', - 'uniform_lccdf', - 'uniform_lcdf', - 'uniform_lpdf', + 'uniform_lccdf', + 'uniform_lcdf', + 'uniform_lpdf', 'uniform_rng', 'variance', - 'von_mises_lpdf', + 'von_mises_lpdf', 'von_mises_rng', 'weibull_cdf', - 'weibull_lccdf', - 'weibull_lcdf', - 'weibull_lpdf', + 'weibull_lccdf', + 'weibull_lcdf', + 'weibull_lpdf', 'weibull_rng', - 'wiener_lpdf', - 'wishart_lpdf', - 'wishart_rng', + 'wiener_lpdf', + 'wishart_lpdf', + 'wishart_rng', ) DISTRIBUTIONS = ( @@ -453,7 +453,7 @@ DISTRIBUTIONS = ( 'von_mises', 'weibull', 'wiener', - 'wishart', + 'wishart', ) RESERVED = ( @@ -484,23 +484,23 @@ RESERVED = ( 'do', 'double', 'dynamic_cast', - 'else', + 'else', 'enum', 'explicit', 'export', 'extern', 'false', 'float', - 'for', + 'for', 'friend', 'fvar', 'goto', - 'if', - 'in', + 'if', + 'in', 'inline', 'int', 'long', - 'lp__', + 'lp__', 'mutable', 'namespace', 'new', @@ -517,16 +517,16 @@ RESERVED = ( 'register', 'reinterpret_cast', 'repeat', - 'return', + 'return', 'short', 'signed', 'sizeof', - 'STAN_MAJOR', - 'STAN_MATH_MAJOR', - 'STAN_MATH_MINOR', - 'STAN_MATH_PATCH', - 'STAN_MINOR', - 'STAN_PATCH', + 'STAN_MAJOR', + 'STAN_MATH_MAJOR', + 'STAN_MATH_MINOR', + 'STAN_MATH_PATCH', + 'STAN_MINOR', + 'STAN_PATCH', 'static', 'static_assert', 'static_cast', @@ -551,7 +551,7 @@ RESERVED = ( 'void', 'volatile', 'wchar_t', - 'while', + 'while', 'xor', - 'xor_eq', + 'xor_eq', ) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py index aa899172a6..0fabe36863 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py @@ -1,371 +1,371 @@ -""" - pygments.lexers._stata_builtins - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Builtins for Stata - +""" + pygments.lexers._stata_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Builtins for Stata + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - - -builtins_special = ( - "if", "in", "using", "replace", "by", "gen", "generate" -) - -builtins_base = ( - "if", "else", "in", "foreach", "for", "forv", "forva", - "forval", "forvalu", "forvalue", "forvalues", "by", "bys", - "bysort", "quietly", "qui", "about", "ac", - "ac_7", "acprplot", "acprplot_7", "adjust", "ado", "adopath", - "adoupdate", "alpha", "ameans", "an", "ano", "anov", "anova", - "anova_estat", "anova_terms", "anovadef", "aorder", "ap", "app", - "appe", "appen", "append", "arch", "arch_dr", "arch_estat", - "arch_p", "archlm", "areg", "areg_p", "args", "arima", - "arima_dr", "arima_estat", "arima_p", "as", "asmprobit", - "asmprobit_estat", "asmprobit_lf", "asmprobit_mfx__dlg", - "asmprobit_p", "ass", "asse", "asser", "assert", "avplot", - "avplot_7", "avplots", "avplots_7", "bcskew0", "bgodfrey", - "binreg", "bip0_lf", "biplot", "bipp_lf", "bipr_lf", - "bipr_p", "biprobit", "bitest", "bitesti", "bitowt", "blogit", - "bmemsize", "boot", "bootsamp", "bootstrap", "bootstrap_8", - "boxco_l", "boxco_p", "boxcox", "boxcox_6", "boxcox_p", - "bprobit", "br", "break", "brier", "bro", "brow", "brows", - "browse", "brr", "brrstat", "bs", "bs_7", "bsampl_w", - "bsample", "bsample_7", "bsqreg", "bstat", "bstat_7", "bstat_8", - "bstrap", "bstrap_7", "ca", "ca_estat", "ca_p", "cabiplot", - "camat", "canon", "canon_8", "canon_8_p", "canon_estat", - "canon_p", "cap", "caprojection", "capt", "captu", "captur", - "capture", "cat", "cc", "cchart", "cchart_7", "cci", - "cd", "censobs_table", "centile", "cf", "char", "chdir", - "checkdlgfiles", "checkestimationsample", "checkhlpfiles", - "checksum", "chelp", "ci", "cii", "cl", "class", "classutil", - "clear", "cli", "clis", "clist", "clo", "clog", "clog_lf", - "clog_p", "clogi", "clogi_sw", "clogit", "clogit_lf", - "clogit_p", "clogitp", "clogl_sw", "cloglog", "clonevar", - "clslistarray", "cluster", "cluster_measures", "cluster_stop", - "cluster_tree", "cluster_tree_8", "clustermat", "cmdlog", - "cnr", "cnre", "cnreg", "cnreg_p", "cnreg_sw", "cnsreg", - "codebook", "collaps4", "collapse", "colormult_nb", - "colormult_nw", "compare", "compress", "conf", "confi", - "confir", "confirm", "conren", "cons", "const", "constr", - "constra", "constrai", "constrain", "constraint", "continue", - "contract", "copy", "copyright", "copysource", "cor", "corc", - "corr", "corr2data", "corr_anti", "corr_kmo", "corr_smc", - "corre", "correl", "correla", "correlat", "correlate", - "corrgram", "cou", "coun", "count", "cox", "cox_p", "cox_sw", - "coxbase", "coxhaz", "coxvar", "cprplot", "cprplot_7", - "crc", "cret", "cretu", "cretur", "creturn", "cross", "cs", - "cscript", "cscript_log", "csi", "ct", "ct_is", "ctset", - "ctst_5", "ctst_st", "cttost", "cumsp", "cumsp_7", "cumul", - "cusum", "cusum_7", "cutil", "d", "datasig", "datasign", - "datasigna", "datasignat", "datasignatu", "datasignatur", - "datasignature", "datetof", "db", "dbeta", "de", "dec", - "deco", "decod", "decode", "deff", "des", "desc", "descr", - "descri", "describ", "describe", "destring", "dfbeta", - "dfgls", "dfuller", "di", "di_g", "dir", "dirstats", "dis", - "discard", "disp", "disp_res", "disp_s", "displ", "displa", - "display", "distinct", "do", "doe", "doed", "doedi", - "doedit", "dotplot", "dotplot_7", "dprobit", "drawnorm", - "drop", "ds", "ds_util", "dstdize", "duplicates", "durbina", - "dwstat", "dydx", "e", "ed", "edi", "edit", "egen", - "eivreg", "emdef", "end", "en", "enc", "enco", "encod", "encode", - "eq", "erase", "ereg", "ereg_lf", "ereg_p", "ereg_sw", - "ereghet", "ereghet_glf", "ereghet_glf_sh", "ereghet_gp", - "ereghet_ilf", "ereghet_ilf_sh", "ereghet_ip", "eret", - "eretu", "eretur", "ereturn", "err", "erro", "error", "est", - "est_cfexist", "est_cfname", "est_clickable", "est_expand", - "est_hold", "est_table", "est_unhold", "est_unholdok", - "estat", "estat_default", "estat_summ", "estat_vce_only", - "esti", "estimates", "etodow", "etof", "etomdy", "ex", - "exi", "exit", "expand", "expandcl", "fac", "fact", "facto", - "factor", "factor_estat", "factor_p", "factor_pca_rotated", - "factor_rotate", "factormat", "fcast", "fcast_compute", - "fcast_graph", "fdades", "fdadesc", "fdadescr", "fdadescri", - "fdadescrib", "fdadescribe", "fdasav", "fdasave", "fdause", - "fh_st", "open", "read", "close", - "file", "filefilter", "fillin", "find_hlp_file", "findfile", - "findit", "findit_7", "fit", "fl", "fli", "flis", "flist", - "for5_0", "form", "forma", "format", "fpredict", "frac_154", - "frac_adj", "frac_chk", "frac_cox", "frac_ddp", "frac_dis", - "frac_dv", "frac_in", "frac_mun", "frac_pp", "frac_pq", - "frac_pv", "frac_wgt", "frac_xo", "fracgen", "fracplot", - "fracplot_7", "fracpoly", "fracpred", "fron_ex", "fron_hn", - "fron_p", "fron_tn", "fron_tn2", "frontier", "ftodate", "ftoe", - "ftomdy", "ftowdate", "g", "gamhet_glf", "gamhet_gp", - "gamhet_ilf", "gamhet_ip", "gamma", "gamma_d2", "gamma_p", - "gamma_sw", "gammahet", "gdi_hexagon", "gdi_spokes", "ge", - "gen", "gene", "gener", "genera", "generat", "generate", - "genrank", "genstd", "genvmean", "gettoken", "gl", "gladder", - "gladder_7", "glim_l01", "glim_l02", "glim_l03", "glim_l04", - "glim_l05", "glim_l06", "glim_l07", "glim_l08", "glim_l09", - "glim_l10", "glim_l11", "glim_l12", "glim_lf", "glim_mu", - "glim_nw1", "glim_nw2", "glim_nw3", "glim_p", "glim_v1", - "glim_v2", "glim_v3", "glim_v4", "glim_v5", "glim_v6", - "glim_v7", "glm", "glm_6", "glm_p", "glm_sw", "glmpred", "glo", - "glob", "globa", "global", "glogit", "glogit_8", "glogit_p", - "gmeans", "gnbre_lf", "gnbreg", "gnbreg_5", "gnbreg_p", - "gomp_lf", "gompe_sw", "gomper_p", "gompertz", "gompertzhet", - "gomphet_glf", "gomphet_glf_sh", "gomphet_gp", "gomphet_ilf", - "gomphet_ilf_sh", "gomphet_ip", "gphdot", "gphpen", - "gphprint", "gprefs", "gprobi_p", "gprobit", "gprobit_8", "gr", - "gr7", "gr_copy", "gr_current", "gr_db", "gr_describe", - "gr_dir", "gr_draw", "gr_draw_replay", "gr_drop", "gr_edit", - "gr_editviewopts", "gr_example", "gr_example2", "gr_export", - "gr_print", "gr_qscheme", "gr_query", "gr_read", "gr_rename", - "gr_replay", "gr_save", "gr_set", "gr_setscheme", "gr_table", - "gr_undo", "gr_use", "graph", "graph7", "grebar", "greigen", - "greigen_7", "greigen_8", "grmeanby", "grmeanby_7", - "gs_fileinfo", "gs_filetype", "gs_graphinfo", "gs_stat", - "gsort", "gwood", "h", "hadimvo", "hareg", "hausman", - "haver", "he", "heck_d2", "heckma_p", "heckman", "heckp_lf", - "heckpr_p", "heckprob", "hel", "help", "hereg", "hetpr_lf", - "hetpr_p", "hetprob", "hettest", "hexdump", "hilite", - "hist", "hist_7", "histogram", "hlogit", "hlu", "hmeans", - "hotel", "hotelling", "hprobit", "hreg", "hsearch", "icd9", - "icd9_ff", "icd9p", "iis", "impute", "imtest", "inbase", - "include", "inf", "infi", "infil", "infile", "infix", "inp", - "inpu", "input", "ins", "insheet", "insp", "inspe", - "inspec", "inspect", "integ", "inten", "intreg", "intreg_7", - "intreg_p", "intrg2_ll", "intrg_ll", "intrg_ll2", "ipolate", - "iqreg", "ir", "irf", "irf_create", "irfm", "iri", "is_svy", - "is_svysum", "isid", "istdize", "ivprob_1_lf", "ivprob_lf", - "ivprobit", "ivprobit_p", "ivreg", "ivreg_footnote", - "ivtob_1_lf", "ivtob_lf", "ivtobit", "ivtobit_p", "jackknife", - "jacknife", "jknife", "jknife_6", "jknife_8", "jkstat", - "joinby", "kalarma1", "kap", "kap_3", "kapmeier", "kappa", - "kapwgt", "kdensity", "kdensity_7", "keep", "ksm", "ksmirnov", - "ktau", "kwallis", "l", "la", "lab", "labe", "label", - "labelbook", "ladder", "levels", "levelsof", "leverage", - "lfit", "lfit_p", "li", "lincom", "line", "linktest", - "lis", "list", "lloghet_glf", "lloghet_glf_sh", "lloghet_gp", - "lloghet_ilf", "lloghet_ilf_sh", "lloghet_ip", "llogi_sw", - "llogis_p", "llogist", "llogistic", "llogistichet", - "lnorm_lf", "lnorm_sw", "lnorma_p", "lnormal", "lnormalhet", - "lnormhet_glf", "lnormhet_glf_sh", "lnormhet_gp", - "lnormhet_ilf", "lnormhet_ilf_sh", "lnormhet_ip", "lnskew0", - "loadingplot", "loc", "loca", "local", "log", "logi", - "logis_lf", "logistic", "logistic_p", "logit", "logit_estat", - "logit_p", "loglogs", "logrank", "loneway", "lookfor", - "lookup", "lowess", "lowess_7", "lpredict", "lrecomp", "lroc", - "lroc_7", "lrtest", "ls", "lsens", "lsens_7", "lsens_x", - "lstat", "ltable", "ltable_7", "ltriang", "lv", "lvr2plot", - "lvr2plot_7", "m", "ma", "mac", "macr", "macro", "makecns", - "man", "manova", "manova_estat", "manova_p", "manovatest", - "mantel", "mark", "markin", "markout", "marksample", "mat", - "mat_capp", "mat_order", "mat_put_rr", "mat_rapp", "mata", - "mata_clear", "mata_describe", "mata_drop", "mata_matdescribe", - "mata_matsave", "mata_matuse", "mata_memory", "mata_mlib", - "mata_mosave", "mata_rename", "mata_which", "matalabel", - "matcproc", "matlist", "matname", "matr", "matri", - "matrix", "matrix_input__dlg", "matstrik", "mcc", "mcci", - "md0_", "md1_", "md1debug_", "md2_", "md2debug_", "mds", - "mds_estat", "mds_p", "mdsconfig", "mdslong", "mdsmat", - "mdsshepard", "mdytoe", "mdytof", "me_derd", "mean", - "means", "median", "memory", "memsize", "meqparse", "mer", - "merg", "merge", "mfp", "mfx", "mhelp", "mhodds", "minbound", - "mixed_ll", "mixed_ll_reparm", "mkassert", "mkdir", - "mkmat", "mkspline", "ml", "ml_5", "ml_adjs", "ml_bhhhs", - "ml_c_d", "ml_check", "ml_clear", "ml_cnt", "ml_debug", - "ml_defd", "ml_e0", "ml_e0_bfgs", "ml_e0_cycle", "ml_e0_dfp", - "ml_e0i", "ml_e1", "ml_e1_bfgs", "ml_e1_bhhh", "ml_e1_cycle", - "ml_e1_dfp", "ml_e2", "ml_e2_cycle", "ml_ebfg0", "ml_ebfr0", - "ml_ebfr1", "ml_ebh0q", "ml_ebhh0", "ml_ebhr0", "ml_ebr0i", - "ml_ecr0i", "ml_edfp0", "ml_edfr0", "ml_edfr1", "ml_edr0i", - "ml_eds", "ml_eer0i", "ml_egr0i", "ml_elf", "ml_elf_bfgs", - "ml_elf_bhhh", "ml_elf_cycle", "ml_elf_dfp", "ml_elfi", - "ml_elfs", "ml_enr0i", "ml_enrr0", "ml_erdu0", "ml_erdu0_bfgs", - "ml_erdu0_bhhh", "ml_erdu0_bhhhq", "ml_erdu0_cycle", - "ml_erdu0_dfp", "ml_erdu0_nrbfgs", "ml_exde", "ml_footnote", - "ml_geqnr", "ml_grad0", "ml_graph", "ml_hbhhh", "ml_hd0", - "ml_hold", "ml_init", "ml_inv", "ml_log", "ml_max", - "ml_mlout", "ml_mlout_8", "ml_model", "ml_nb0", "ml_opt", - "ml_p", "ml_plot", "ml_query", "ml_rdgrd", "ml_repor", - "ml_s_e", "ml_score", "ml_searc", "ml_technique", "ml_unhold", - "mleval", "mlf_", "mlmatbysum", "mlmatsum", "mlog", "mlogi", - "mlogit", "mlogit_footnote", "mlogit_p", "mlopts", "mlsum", - "mlvecsum", "mnl0_", "mor", "more", "mov", "move", "mprobit", - "mprobit_lf", "mprobit_p", "mrdu0_", "mrdu1_", "mvdecode", - "mvencode", "mvreg", "mvreg_estat", "n", "nbreg", - "nbreg_al", "nbreg_lf", "nbreg_p", "nbreg_sw", "nestreg", "net", - "newey", "newey_7", "newey_p", "news", "nl", "nl_7", "nl_9", - "nl_9_p", "nl_p", "nl_p_7", "nlcom", "nlcom_p", "nlexp2", - "nlexp2_7", "nlexp2a", "nlexp2a_7", "nlexp3", "nlexp3_7", - "nlgom3", "nlgom3_7", "nlgom4", "nlgom4_7", "nlinit", "nllog3", - "nllog3_7", "nllog4", "nllog4_7", "nlog_rd", "nlogit", - "nlogit_p", "nlogitgen", "nlogittree", "nlpred", "no", - "nobreak", "noi", "nois", "noisi", "noisil", "noisily", "note", - "notes", "notes_dlg", "nptrend", "numlabel", "numlist", "odbc", - "old_ver", "olo", "olog", "ologi", "ologi_sw", "ologit", - "ologit_p", "ologitp", "on", "one", "onew", "onewa", "oneway", - "op_colnm", "op_comp", "op_diff", "op_inv", "op_str", "opr", - "opro", "oprob", "oprob_sw", "oprobi", "oprobi_p", "oprobit", - "oprobitp", "opts_exclusive", "order", "orthog", "orthpoly", - "ou", "out", "outf", "outfi", "outfil", "outfile", "outs", - "outsh", "outshe", "outshee", "outsheet", "ovtest", "pac", - "pac_7", "palette", "parse", "parse_dissim", "pause", "pca", - "pca_8", "pca_display", "pca_estat", "pca_p", "pca_rotate", - "pcamat", "pchart", "pchart_7", "pchi", "pchi_7", "pcorr", - "pctile", "pentium", "pergram", "pergram_7", "permute", - "permute_8", "personal", "peto_st", "pkcollapse", "pkcross", - "pkequiv", "pkexamine", "pkexamine_7", "pkshape", "pksumm", - "pksumm_7", "pl", "plo", "plot", "plugin", "pnorm", - "pnorm_7", "poisgof", "poiss_lf", "poiss_sw", "poisso_p", - "poisson", "poisson_estat", "post", "postclose", "postfile", - "postutil", "pperron", "pr", "prais", "prais_e", "prais_e2", - "prais_p", "predict", "predictnl", "preserve", "print", - "pro", "prob", "probi", "probit", "probit_estat", "probit_p", - "proc_time", "procoverlay", "procrustes", "procrustes_estat", - "procrustes_p", "profiler", "prog", "progr", "progra", - "program", "prop", "proportion", "prtest", "prtesti", "pwcorr", - "pwd", "q", "s", "qby", "qbys", "qchi", "qchi_7", "qladder", - "qladder_7", "qnorm", "qnorm_7", "qqplot", "qqplot_7", "qreg", - "qreg_c", "qreg_p", "qreg_sw", "qu", "quadchk", "quantile", - "quantile_7", "que", "quer", "query", "range", "ranksum", - "ratio", "rchart", "rchart_7", "rcof", "recast", "reclink", - "recode", "reg", "reg3", "reg3_p", "regdw", "regr", "regre", - "regre_p2", "regres", "regres_p", "regress", "regress_estat", - "regriv_p", "remap", "ren", "rena", "renam", "rename", - "renpfix", "repeat", "replace", "report", "reshape", - "restore", "ret", "retu", "retur", "return", "rm", "rmdir", - "robvar", "roccomp", "roccomp_7", "roccomp_8", "rocf_lf", - "rocfit", "rocfit_8", "rocgold", "rocplot", "rocplot_7", - "roctab", "roctab_7", "rolling", "rologit", "rologit_p", - "rot", "rota", "rotat", "rotate", "rotatemat", "rreg", - "rreg_p", "ru", "run", "runtest", "rvfplot", "rvfplot_7", - "rvpplot", "rvpplot_7", "sa", "safesum", "sample", - "sampsi", "sav", "save", "savedresults", "saveold", "sc", - "sca", "scal", "scala", "scalar", "scatter", "scm_mine", - "sco", "scob_lf", "scob_p", "scobi_sw", "scobit", "scor", - "score", "scoreplot", "scoreplot_help", "scree", "screeplot", - "screeplot_help", "sdtest", "sdtesti", "se", "search", - "separate", "seperate", "serrbar", "serrbar_7", "serset", "set", - "set_defaults", "sfrancia", "sh", "she", "shel", "shell", - "shewhart", "shewhart_7", "signestimationsample", "signrank", - "signtest", "simul", "simul_7", "simulate", "simulate_8", - "sktest", "sleep", "slogit", "slogit_d2", "slogit_p", "smooth", - "snapspan", "so", "sor", "sort", "spearman", "spikeplot", - "spikeplot_7", "spikeplt", "spline_x", "split", "sqreg", - "sqreg_p", "sret", "sretu", "sretur", "sreturn", "ssc", "st", - "st_ct", "st_hc", "st_hcd", "st_hcd_sh", "st_is", "st_issys", - "st_note", "st_promo", "st_set", "st_show", "st_smpl", - "st_subid", "stack", "statsby", "statsby_8", "stbase", "stci", - "stci_7", "stcox", "stcox_estat", "stcox_fr", "stcox_fr_ll", - "stcox_p", "stcox_sw", "stcoxkm", "stcoxkm_7", "stcstat", - "stcurv", "stcurve", "stcurve_7", "stdes", "stem", "stepwise", - "stereg", "stfill", "stgen", "stir", "stjoin", "stmc", "stmh", - "stphplot", "stphplot_7", "stphtest", "stphtest_7", - "stptime", "strate", "strate_7", "streg", "streg_sw", "streset", - "sts", "sts_7", "stset", "stsplit", "stsum", "sttocc", - "sttoct", "stvary", "stweib", "su", "suest", "suest_8", - "sum", "summ", "summa", "summar", "summari", "summariz", - "summarize", "sunflower", "sureg", "survcurv", "survsum", - "svar", "svar_p", "svmat", "svy", "svy_disp", "svy_dreg", - "svy_est", "svy_est_7", "svy_estat", "svy_get", "svy_gnbreg_p", - "svy_head", "svy_header", "svy_heckman_p", "svy_heckprob_p", - "svy_intreg_p", "svy_ivreg_p", "svy_logistic_p", "svy_logit_p", - "svy_mlogit_p", "svy_nbreg_p", "svy_ologit_p", "svy_oprobit_p", - "svy_poisson_p", "svy_probit_p", "svy_regress_p", "svy_sub", - "svy_sub_7", "svy_x", "svy_x_7", "svy_x_p", "svydes", - "svydes_8", "svygen", "svygnbreg", "svyheckman", "svyheckprob", - "svyintreg", "svyintreg_7", "svyintrg", "svyivreg", "svylc", - "svylog_p", "svylogit", "svymarkout", "svymarkout_8", - "svymean", "svymlog", "svymlogit", "svynbreg", "svyolog", - "svyologit", "svyoprob", "svyoprobit", "svyopts", - "svypois", "svypois_7", "svypoisson", "svyprobit", "svyprobt", - "svyprop", "svyprop_7", "svyratio", "svyreg", "svyreg_p", - "svyregress", "svyset", "svyset_7", "svyset_8", "svytab", - "svytab_7", "svytest", "svytotal", "sw", "sw_8", "swcnreg", - "swcox", "swereg", "swilk", "swlogis", "swlogit", - "swologit", "swoprbt", "swpois", "swprobit", "swqreg", - "swtobit", "swweib", "symmetry", "symmi", "symplot", - "symplot_7", "syntax", "sysdescribe", "sysdir", "sysuse", - "szroeter", "ta", "tab", "tab1", "tab2", "tab_or", "tabd", - "tabdi", "tabdis", "tabdisp", "tabi", "table", "tabodds", - "tabodds_7", "tabstat", "tabu", "tabul", "tabula", "tabulat", - "tabulate", "te", "tempfile", "tempname", "tempvar", "tes", - "test", "testnl", "testparm", "teststd", "tetrachoric", - "time_it", "timer", "tis", "tob", "tobi", "tobit", "tobit_p", - "tobit_sw", "token", "tokeni", "tokeniz", "tokenize", - "tostring", "total", "translate", "translator", "transmap", - "treat_ll", "treatr_p", "treatreg", "trim", "trnb_cons", - "trnb_mean", "trpoiss_d2", "trunc_ll", "truncr_p", "truncreg", - "tsappend", "tset", "tsfill", "tsline", "tsline_ex", - "tsreport", "tsrevar", "tsrline", "tsset", "tssmooth", - "tsunab", "ttest", "ttesti", "tut_chk", "tut_wait", "tutorial", - "tw", "tware_st", "two", "twoway", "twoway__fpfit_serset", - "twoway__function_gen", "twoway__histogram_gen", - "twoway__ipoint_serset", "twoway__ipoints_serset", - "twoway__kdensity_gen", "twoway__lfit_serset", - "twoway__normgen_gen", "twoway__pci_serset", - "twoway__qfit_serset", "twoway__scatteri_serset", - "twoway__sunflower_gen", "twoway_ksm_serset", "ty", "typ", - "type", "typeof", "u", "unab", "unabbrev", "unabcmd", - "update", "us", "use", "uselabel", "var", "var_mkcompanion", - "var_p", "varbasic", "varfcast", "vargranger", "varirf", - "varirf_add", "varirf_cgraph", "varirf_create", "varirf_ctable", - "varirf_describe", "varirf_dir", "varirf_drop", "varirf_erase", - "varirf_graph", "varirf_ograph", "varirf_rename", "varirf_set", - "varirf_table", "varlist", "varlmar", "varnorm", "varsoc", - "varstable", "varstable_w", "varstable_w2", "varwle", - "vce", "vec", "vec_fevd", "vec_mkphi", "vec_p", "vec_p_w", - "vecirf_create", "veclmar", "veclmar_w", "vecnorm", - "vecnorm_w", "vecrank", "vecstable", "verinst", "vers", - "versi", "versio", "version", "view", "viewsource", "vif", - "vwls", "wdatetof", "webdescribe", "webseek", "webuse", - "weib1_lf", "weib2_lf", "weib_lf", "weib_lf0", "weibhet_glf", - "weibhet_glf_sh", "weibhet_glfa", "weibhet_glfa_sh", - "weibhet_gp", "weibhet_ilf", "weibhet_ilf_sh", "weibhet_ilfa", - "weibhet_ilfa_sh", "weibhet_ip", "weibu_sw", "weibul_p", - "weibull", "weibull_c", "weibull_s", "weibullhet", - "wh", "whelp", "whi", "which", "whil", "while", "wilc_st", - "wilcoxon", "win", "wind", "windo", "window", "winexec", - "wntestb", "wntestb_7", "wntestq", "xchart", "xchart_7", - "xcorr", "xcorr_7", "xi", "xi_6", "xmlsav", "xmlsave", - "xmluse", "xpose", "xsh", "xshe", "xshel", "xshell", - "xt_iis", "xt_tis", "xtab_p", "xtabond", "xtbin_p", - "xtclog", "xtcloglog", "xtcloglog_8", "xtcloglog_d2", - "xtcloglog_pa_p", "xtcloglog_re_p", "xtcnt_p", "xtcorr", - "xtdata", "xtdes", "xtfront_p", "xtfrontier", "xtgee", - "xtgee_elink", "xtgee_estat", "xtgee_makeivar", "xtgee_p", - "xtgee_plink", "xtgls", "xtgls_p", "xthaus", "xthausman", - "xtht_p", "xthtaylor", "xtile", "xtint_p", "xtintreg", - "xtintreg_8", "xtintreg_d2", "xtintreg_p", "xtivp_1", - "xtivp_2", "xtivreg", "xtline", "xtline_ex", "xtlogit", - "xtlogit_8", "xtlogit_d2", "xtlogit_fe_p", "xtlogit_pa_p", - "xtlogit_re_p", "xtmixed", "xtmixed_estat", "xtmixed_p", - "xtnb_fe", "xtnb_lf", "xtnbreg", "xtnbreg_pa_p", - "xtnbreg_refe_p", "xtpcse", "xtpcse_p", "xtpois", "xtpoisson", - "xtpoisson_d2", "xtpoisson_pa_p", "xtpoisson_refe_p", "xtpred", - "xtprobit", "xtprobit_8", "xtprobit_d2", "xtprobit_re_p", - "xtps_fe", "xtps_lf", "xtps_ren", "xtps_ren_8", "xtrar_p", - "xtrc", "xtrc_p", "xtrchh", "xtrefe_p", "xtreg", "xtreg_be", - "xtreg_fe", "xtreg_ml", "xtreg_pa_p", "xtreg_re", - "xtregar", "xtrere_p", "xtset", "xtsf_ll", "xtsf_llti", - "xtsum", "xttab", "xttest0", "xttobit", "xttobit_8", - "xttobit_p", "xttrans", "yx", "yxview__barlike_draw", - "yxview_area_draw", "yxview_bar_draw", "yxview_dot_draw", - "yxview_dropline_draw", "yxview_function_draw", - "yxview_iarrow_draw", "yxview_ilabels_draw", - "yxview_normal_draw", "yxview_pcarrow_draw", - "yxview_pcbarrow_draw", "yxview_pccapsym_draw", - "yxview_pcscatter_draw", "yxview_pcspike_draw", - "yxview_rarea_draw", "yxview_rbar_draw", "yxview_rbarm_draw", - "yxview_rcap_draw", "yxview_rcapsym_draw", - "yxview_rconnected_draw", "yxview_rline_draw", - "yxview_rscatter_draw", "yxview_rspike_draw", - "yxview_spike_draw", "yxview_sunflower_draw", "zap_s", "zinb", - "zinb_llf", "zinb_plf", "zip", "zip_llf", "zip_p", "zip_plf", - "zt_ct_5", "zt_hc_5", "zt_hcd_5", "zt_is_5", "zt_iss_5", - "zt_sho_5", "zt_smp_5", "ztbase_5", "ztcox_5", "ztdes_5", - "ztereg_5", "ztfill_5", "ztgen_5", "ztir_5", "ztjoin_5", "ztnb", - "ztnb_p", "ztp", "ztp_p", "zts_5", "ztset_5", "ztspli_5", - "ztsum_5", "zttoct_5", "ztvary_5", "ztweib_5" -) - + :license: BSD, see LICENSE for details. +""" + + +builtins_special = ( + "if", "in", "using", "replace", "by", "gen", "generate" +) + +builtins_base = ( + "if", "else", "in", "foreach", "for", "forv", "forva", + "forval", "forvalu", "forvalue", "forvalues", "by", "bys", + "bysort", "quietly", "qui", "about", "ac", + "ac_7", "acprplot", "acprplot_7", "adjust", "ado", "adopath", + "adoupdate", "alpha", "ameans", "an", "ano", "anov", "anova", + "anova_estat", "anova_terms", "anovadef", "aorder", "ap", "app", + "appe", "appen", "append", "arch", "arch_dr", "arch_estat", + "arch_p", "archlm", "areg", "areg_p", "args", "arima", + "arima_dr", "arima_estat", "arima_p", "as", "asmprobit", + "asmprobit_estat", "asmprobit_lf", "asmprobit_mfx__dlg", + "asmprobit_p", "ass", "asse", "asser", "assert", "avplot", + "avplot_7", "avplots", "avplots_7", "bcskew0", "bgodfrey", + "binreg", "bip0_lf", "biplot", "bipp_lf", "bipr_lf", + "bipr_p", "biprobit", "bitest", "bitesti", "bitowt", "blogit", + "bmemsize", "boot", "bootsamp", "bootstrap", "bootstrap_8", + "boxco_l", "boxco_p", "boxcox", "boxcox_6", "boxcox_p", + "bprobit", "br", "break", "brier", "bro", "brow", "brows", + "browse", "brr", "brrstat", "bs", "bs_7", "bsampl_w", + "bsample", "bsample_7", "bsqreg", "bstat", "bstat_7", "bstat_8", + "bstrap", "bstrap_7", "ca", "ca_estat", "ca_p", "cabiplot", + "camat", "canon", "canon_8", "canon_8_p", "canon_estat", + "canon_p", "cap", "caprojection", "capt", "captu", "captur", + "capture", "cat", "cc", "cchart", "cchart_7", "cci", + "cd", "censobs_table", "centile", "cf", "char", "chdir", + "checkdlgfiles", "checkestimationsample", "checkhlpfiles", + "checksum", "chelp", "ci", "cii", "cl", "class", "classutil", + "clear", "cli", "clis", "clist", "clo", "clog", "clog_lf", + "clog_p", "clogi", "clogi_sw", "clogit", "clogit_lf", + "clogit_p", "clogitp", "clogl_sw", "cloglog", "clonevar", + "clslistarray", "cluster", "cluster_measures", "cluster_stop", + "cluster_tree", "cluster_tree_8", "clustermat", "cmdlog", + "cnr", "cnre", "cnreg", "cnreg_p", "cnreg_sw", "cnsreg", + "codebook", "collaps4", "collapse", "colormult_nb", + "colormult_nw", "compare", "compress", "conf", "confi", + "confir", "confirm", "conren", "cons", "const", "constr", + "constra", "constrai", "constrain", "constraint", "continue", + "contract", "copy", "copyright", "copysource", "cor", "corc", + "corr", "corr2data", "corr_anti", "corr_kmo", "corr_smc", + "corre", "correl", "correla", "correlat", "correlate", + "corrgram", "cou", "coun", "count", "cox", "cox_p", "cox_sw", + "coxbase", "coxhaz", "coxvar", "cprplot", "cprplot_7", + "crc", "cret", "cretu", "cretur", "creturn", "cross", "cs", + "cscript", "cscript_log", "csi", "ct", "ct_is", "ctset", + "ctst_5", "ctst_st", "cttost", "cumsp", "cumsp_7", "cumul", + "cusum", "cusum_7", "cutil", "d", "datasig", "datasign", + "datasigna", "datasignat", "datasignatu", "datasignatur", + "datasignature", "datetof", "db", "dbeta", "de", "dec", + "deco", "decod", "decode", "deff", "des", "desc", "descr", + "descri", "describ", "describe", "destring", "dfbeta", + "dfgls", "dfuller", "di", "di_g", "dir", "dirstats", "dis", + "discard", "disp", "disp_res", "disp_s", "displ", "displa", + "display", "distinct", "do", "doe", "doed", "doedi", + "doedit", "dotplot", "dotplot_7", "dprobit", "drawnorm", + "drop", "ds", "ds_util", "dstdize", "duplicates", "durbina", + "dwstat", "dydx", "e", "ed", "edi", "edit", "egen", + "eivreg", "emdef", "end", "en", "enc", "enco", "encod", "encode", + "eq", "erase", "ereg", "ereg_lf", "ereg_p", "ereg_sw", + "ereghet", "ereghet_glf", "ereghet_glf_sh", "ereghet_gp", + "ereghet_ilf", "ereghet_ilf_sh", "ereghet_ip", "eret", + "eretu", "eretur", "ereturn", "err", "erro", "error", "est", + "est_cfexist", "est_cfname", "est_clickable", "est_expand", + "est_hold", "est_table", "est_unhold", "est_unholdok", + "estat", "estat_default", "estat_summ", "estat_vce_only", + "esti", "estimates", "etodow", "etof", "etomdy", "ex", + "exi", "exit", "expand", "expandcl", "fac", "fact", "facto", + "factor", "factor_estat", "factor_p", "factor_pca_rotated", + "factor_rotate", "factormat", "fcast", "fcast_compute", + "fcast_graph", "fdades", "fdadesc", "fdadescr", "fdadescri", + "fdadescrib", "fdadescribe", "fdasav", "fdasave", "fdause", + "fh_st", "open", "read", "close", + "file", "filefilter", "fillin", "find_hlp_file", "findfile", + "findit", "findit_7", "fit", "fl", "fli", "flis", "flist", + "for5_0", "form", "forma", "format", "fpredict", "frac_154", + "frac_adj", "frac_chk", "frac_cox", "frac_ddp", "frac_dis", + "frac_dv", "frac_in", "frac_mun", "frac_pp", "frac_pq", + "frac_pv", "frac_wgt", "frac_xo", "fracgen", "fracplot", + "fracplot_7", "fracpoly", "fracpred", "fron_ex", "fron_hn", + "fron_p", "fron_tn", "fron_tn2", "frontier", "ftodate", "ftoe", + "ftomdy", "ftowdate", "g", "gamhet_glf", "gamhet_gp", + "gamhet_ilf", "gamhet_ip", "gamma", "gamma_d2", "gamma_p", + "gamma_sw", "gammahet", "gdi_hexagon", "gdi_spokes", "ge", + "gen", "gene", "gener", "genera", "generat", "generate", + "genrank", "genstd", "genvmean", "gettoken", "gl", "gladder", + "gladder_7", "glim_l01", "glim_l02", "glim_l03", "glim_l04", + "glim_l05", "glim_l06", "glim_l07", "glim_l08", "glim_l09", + "glim_l10", "glim_l11", "glim_l12", "glim_lf", "glim_mu", + "glim_nw1", "glim_nw2", "glim_nw3", "glim_p", "glim_v1", + "glim_v2", "glim_v3", "glim_v4", "glim_v5", "glim_v6", + "glim_v7", "glm", "glm_6", "glm_p", "glm_sw", "glmpred", "glo", + "glob", "globa", "global", "glogit", "glogit_8", "glogit_p", + "gmeans", "gnbre_lf", "gnbreg", "gnbreg_5", "gnbreg_p", + "gomp_lf", "gompe_sw", "gomper_p", "gompertz", "gompertzhet", + "gomphet_glf", "gomphet_glf_sh", "gomphet_gp", "gomphet_ilf", + "gomphet_ilf_sh", "gomphet_ip", "gphdot", "gphpen", + "gphprint", "gprefs", "gprobi_p", "gprobit", "gprobit_8", "gr", + "gr7", "gr_copy", "gr_current", "gr_db", "gr_describe", + "gr_dir", "gr_draw", "gr_draw_replay", "gr_drop", "gr_edit", + "gr_editviewopts", "gr_example", "gr_example2", "gr_export", + "gr_print", "gr_qscheme", "gr_query", "gr_read", "gr_rename", + "gr_replay", "gr_save", "gr_set", "gr_setscheme", "gr_table", + "gr_undo", "gr_use", "graph", "graph7", "grebar", "greigen", + "greigen_7", "greigen_8", "grmeanby", "grmeanby_7", + "gs_fileinfo", "gs_filetype", "gs_graphinfo", "gs_stat", + "gsort", "gwood", "h", "hadimvo", "hareg", "hausman", + "haver", "he", "heck_d2", "heckma_p", "heckman", "heckp_lf", + "heckpr_p", "heckprob", "hel", "help", "hereg", "hetpr_lf", + "hetpr_p", "hetprob", "hettest", "hexdump", "hilite", + "hist", "hist_7", "histogram", "hlogit", "hlu", "hmeans", + "hotel", "hotelling", "hprobit", "hreg", "hsearch", "icd9", + "icd9_ff", "icd9p", "iis", "impute", "imtest", "inbase", + "include", "inf", "infi", "infil", "infile", "infix", "inp", + "inpu", "input", "ins", "insheet", "insp", "inspe", + "inspec", "inspect", "integ", "inten", "intreg", "intreg_7", + "intreg_p", "intrg2_ll", "intrg_ll", "intrg_ll2", "ipolate", + "iqreg", "ir", "irf", "irf_create", "irfm", "iri", "is_svy", + "is_svysum", "isid", "istdize", "ivprob_1_lf", "ivprob_lf", + "ivprobit", "ivprobit_p", "ivreg", "ivreg_footnote", + "ivtob_1_lf", "ivtob_lf", "ivtobit", "ivtobit_p", "jackknife", + "jacknife", "jknife", "jknife_6", "jknife_8", "jkstat", + "joinby", "kalarma1", "kap", "kap_3", "kapmeier", "kappa", + "kapwgt", "kdensity", "kdensity_7", "keep", "ksm", "ksmirnov", + "ktau", "kwallis", "l", "la", "lab", "labe", "label", + "labelbook", "ladder", "levels", "levelsof", "leverage", + "lfit", "lfit_p", "li", "lincom", "line", "linktest", + "lis", "list", "lloghet_glf", "lloghet_glf_sh", "lloghet_gp", + "lloghet_ilf", "lloghet_ilf_sh", "lloghet_ip", "llogi_sw", + "llogis_p", "llogist", "llogistic", "llogistichet", + "lnorm_lf", "lnorm_sw", "lnorma_p", "lnormal", "lnormalhet", + "lnormhet_glf", "lnormhet_glf_sh", "lnormhet_gp", + "lnormhet_ilf", "lnormhet_ilf_sh", "lnormhet_ip", "lnskew0", + "loadingplot", "loc", "loca", "local", "log", "logi", + "logis_lf", "logistic", "logistic_p", "logit", "logit_estat", + "logit_p", "loglogs", "logrank", "loneway", "lookfor", + "lookup", "lowess", "lowess_7", "lpredict", "lrecomp", "lroc", + "lroc_7", "lrtest", "ls", "lsens", "lsens_7", "lsens_x", + "lstat", "ltable", "ltable_7", "ltriang", "lv", "lvr2plot", + "lvr2plot_7", "m", "ma", "mac", "macr", "macro", "makecns", + "man", "manova", "manova_estat", "manova_p", "manovatest", + "mantel", "mark", "markin", "markout", "marksample", "mat", + "mat_capp", "mat_order", "mat_put_rr", "mat_rapp", "mata", + "mata_clear", "mata_describe", "mata_drop", "mata_matdescribe", + "mata_matsave", "mata_matuse", "mata_memory", "mata_mlib", + "mata_mosave", "mata_rename", "mata_which", "matalabel", + "matcproc", "matlist", "matname", "matr", "matri", + "matrix", "matrix_input__dlg", "matstrik", "mcc", "mcci", + "md0_", "md1_", "md1debug_", "md2_", "md2debug_", "mds", + "mds_estat", "mds_p", "mdsconfig", "mdslong", "mdsmat", + "mdsshepard", "mdytoe", "mdytof", "me_derd", "mean", + "means", "median", "memory", "memsize", "meqparse", "mer", + "merg", "merge", "mfp", "mfx", "mhelp", "mhodds", "minbound", + "mixed_ll", "mixed_ll_reparm", "mkassert", "mkdir", + "mkmat", "mkspline", "ml", "ml_5", "ml_adjs", "ml_bhhhs", + "ml_c_d", "ml_check", "ml_clear", "ml_cnt", "ml_debug", + "ml_defd", "ml_e0", "ml_e0_bfgs", "ml_e0_cycle", "ml_e0_dfp", + "ml_e0i", "ml_e1", "ml_e1_bfgs", "ml_e1_bhhh", "ml_e1_cycle", + "ml_e1_dfp", "ml_e2", "ml_e2_cycle", "ml_ebfg0", "ml_ebfr0", + "ml_ebfr1", "ml_ebh0q", "ml_ebhh0", "ml_ebhr0", "ml_ebr0i", + "ml_ecr0i", "ml_edfp0", "ml_edfr0", "ml_edfr1", "ml_edr0i", + "ml_eds", "ml_eer0i", "ml_egr0i", "ml_elf", "ml_elf_bfgs", + "ml_elf_bhhh", "ml_elf_cycle", "ml_elf_dfp", "ml_elfi", + "ml_elfs", "ml_enr0i", "ml_enrr0", "ml_erdu0", "ml_erdu0_bfgs", + "ml_erdu0_bhhh", "ml_erdu0_bhhhq", "ml_erdu0_cycle", + "ml_erdu0_dfp", "ml_erdu0_nrbfgs", "ml_exde", "ml_footnote", + "ml_geqnr", "ml_grad0", "ml_graph", "ml_hbhhh", "ml_hd0", + "ml_hold", "ml_init", "ml_inv", "ml_log", "ml_max", + "ml_mlout", "ml_mlout_8", "ml_model", "ml_nb0", "ml_opt", + "ml_p", "ml_plot", "ml_query", "ml_rdgrd", "ml_repor", + "ml_s_e", "ml_score", "ml_searc", "ml_technique", "ml_unhold", + "mleval", "mlf_", "mlmatbysum", "mlmatsum", "mlog", "mlogi", + "mlogit", "mlogit_footnote", "mlogit_p", "mlopts", "mlsum", + "mlvecsum", "mnl0_", "mor", "more", "mov", "move", "mprobit", + "mprobit_lf", "mprobit_p", "mrdu0_", "mrdu1_", "mvdecode", + "mvencode", "mvreg", "mvreg_estat", "n", "nbreg", + "nbreg_al", "nbreg_lf", "nbreg_p", "nbreg_sw", "nestreg", "net", + "newey", "newey_7", "newey_p", "news", "nl", "nl_7", "nl_9", + "nl_9_p", "nl_p", "nl_p_7", "nlcom", "nlcom_p", "nlexp2", + "nlexp2_7", "nlexp2a", "nlexp2a_7", "nlexp3", "nlexp3_7", + "nlgom3", "nlgom3_7", "nlgom4", "nlgom4_7", "nlinit", "nllog3", + "nllog3_7", "nllog4", "nllog4_7", "nlog_rd", "nlogit", + "nlogit_p", "nlogitgen", "nlogittree", "nlpred", "no", + "nobreak", "noi", "nois", "noisi", "noisil", "noisily", "note", + "notes", "notes_dlg", "nptrend", "numlabel", "numlist", "odbc", + "old_ver", "olo", "olog", "ologi", "ologi_sw", "ologit", + "ologit_p", "ologitp", "on", "one", "onew", "onewa", "oneway", + "op_colnm", "op_comp", "op_diff", "op_inv", "op_str", "opr", + "opro", "oprob", "oprob_sw", "oprobi", "oprobi_p", "oprobit", + "oprobitp", "opts_exclusive", "order", "orthog", "orthpoly", + "ou", "out", "outf", "outfi", "outfil", "outfile", "outs", + "outsh", "outshe", "outshee", "outsheet", "ovtest", "pac", + "pac_7", "palette", "parse", "parse_dissim", "pause", "pca", + "pca_8", "pca_display", "pca_estat", "pca_p", "pca_rotate", + "pcamat", "pchart", "pchart_7", "pchi", "pchi_7", "pcorr", + "pctile", "pentium", "pergram", "pergram_7", "permute", + "permute_8", "personal", "peto_st", "pkcollapse", "pkcross", + "pkequiv", "pkexamine", "pkexamine_7", "pkshape", "pksumm", + "pksumm_7", "pl", "plo", "plot", "plugin", "pnorm", + "pnorm_7", "poisgof", "poiss_lf", "poiss_sw", "poisso_p", + "poisson", "poisson_estat", "post", "postclose", "postfile", + "postutil", "pperron", "pr", "prais", "prais_e", "prais_e2", + "prais_p", "predict", "predictnl", "preserve", "print", + "pro", "prob", "probi", "probit", "probit_estat", "probit_p", + "proc_time", "procoverlay", "procrustes", "procrustes_estat", + "procrustes_p", "profiler", "prog", "progr", "progra", + "program", "prop", "proportion", "prtest", "prtesti", "pwcorr", + "pwd", "q", "s", "qby", "qbys", "qchi", "qchi_7", "qladder", + "qladder_7", "qnorm", "qnorm_7", "qqplot", "qqplot_7", "qreg", + "qreg_c", "qreg_p", "qreg_sw", "qu", "quadchk", "quantile", + "quantile_7", "que", "quer", "query", "range", "ranksum", + "ratio", "rchart", "rchart_7", "rcof", "recast", "reclink", + "recode", "reg", "reg3", "reg3_p", "regdw", "regr", "regre", + "regre_p2", "regres", "regres_p", "regress", "regress_estat", + "regriv_p", "remap", "ren", "rena", "renam", "rename", + "renpfix", "repeat", "replace", "report", "reshape", + "restore", "ret", "retu", "retur", "return", "rm", "rmdir", + "robvar", "roccomp", "roccomp_7", "roccomp_8", "rocf_lf", + "rocfit", "rocfit_8", "rocgold", "rocplot", "rocplot_7", + "roctab", "roctab_7", "rolling", "rologit", "rologit_p", + "rot", "rota", "rotat", "rotate", "rotatemat", "rreg", + "rreg_p", "ru", "run", "runtest", "rvfplot", "rvfplot_7", + "rvpplot", "rvpplot_7", "sa", "safesum", "sample", + "sampsi", "sav", "save", "savedresults", "saveold", "sc", + "sca", "scal", "scala", "scalar", "scatter", "scm_mine", + "sco", "scob_lf", "scob_p", "scobi_sw", "scobit", "scor", + "score", "scoreplot", "scoreplot_help", "scree", "screeplot", + "screeplot_help", "sdtest", "sdtesti", "se", "search", + "separate", "seperate", "serrbar", "serrbar_7", "serset", "set", + "set_defaults", "sfrancia", "sh", "she", "shel", "shell", + "shewhart", "shewhart_7", "signestimationsample", "signrank", + "signtest", "simul", "simul_7", "simulate", "simulate_8", + "sktest", "sleep", "slogit", "slogit_d2", "slogit_p", "smooth", + "snapspan", "so", "sor", "sort", "spearman", "spikeplot", + "spikeplot_7", "spikeplt", "spline_x", "split", "sqreg", + "sqreg_p", "sret", "sretu", "sretur", "sreturn", "ssc", "st", + "st_ct", "st_hc", "st_hcd", "st_hcd_sh", "st_is", "st_issys", + "st_note", "st_promo", "st_set", "st_show", "st_smpl", + "st_subid", "stack", "statsby", "statsby_8", "stbase", "stci", + "stci_7", "stcox", "stcox_estat", "stcox_fr", "stcox_fr_ll", + "stcox_p", "stcox_sw", "stcoxkm", "stcoxkm_7", "stcstat", + "stcurv", "stcurve", "stcurve_7", "stdes", "stem", "stepwise", + "stereg", "stfill", "stgen", "stir", "stjoin", "stmc", "stmh", + "stphplot", "stphplot_7", "stphtest", "stphtest_7", + "stptime", "strate", "strate_7", "streg", "streg_sw", "streset", + "sts", "sts_7", "stset", "stsplit", "stsum", "sttocc", + "sttoct", "stvary", "stweib", "su", "suest", "suest_8", + "sum", "summ", "summa", "summar", "summari", "summariz", + "summarize", "sunflower", "sureg", "survcurv", "survsum", + "svar", "svar_p", "svmat", "svy", "svy_disp", "svy_dreg", + "svy_est", "svy_est_7", "svy_estat", "svy_get", "svy_gnbreg_p", + "svy_head", "svy_header", "svy_heckman_p", "svy_heckprob_p", + "svy_intreg_p", "svy_ivreg_p", "svy_logistic_p", "svy_logit_p", + "svy_mlogit_p", "svy_nbreg_p", "svy_ologit_p", "svy_oprobit_p", + "svy_poisson_p", "svy_probit_p", "svy_regress_p", "svy_sub", + "svy_sub_7", "svy_x", "svy_x_7", "svy_x_p", "svydes", + "svydes_8", "svygen", "svygnbreg", "svyheckman", "svyheckprob", + "svyintreg", "svyintreg_7", "svyintrg", "svyivreg", "svylc", + "svylog_p", "svylogit", "svymarkout", "svymarkout_8", + "svymean", "svymlog", "svymlogit", "svynbreg", "svyolog", + "svyologit", "svyoprob", "svyoprobit", "svyopts", + "svypois", "svypois_7", "svypoisson", "svyprobit", "svyprobt", + "svyprop", "svyprop_7", "svyratio", "svyreg", "svyreg_p", + "svyregress", "svyset", "svyset_7", "svyset_8", "svytab", + "svytab_7", "svytest", "svytotal", "sw", "sw_8", "swcnreg", + "swcox", "swereg", "swilk", "swlogis", "swlogit", + "swologit", "swoprbt", "swpois", "swprobit", "swqreg", + "swtobit", "swweib", "symmetry", "symmi", "symplot", + "symplot_7", "syntax", "sysdescribe", "sysdir", "sysuse", + "szroeter", "ta", "tab", "tab1", "tab2", "tab_or", "tabd", + "tabdi", "tabdis", "tabdisp", "tabi", "table", "tabodds", + "tabodds_7", "tabstat", "tabu", "tabul", "tabula", "tabulat", + "tabulate", "te", "tempfile", "tempname", "tempvar", "tes", + "test", "testnl", "testparm", "teststd", "tetrachoric", + "time_it", "timer", "tis", "tob", "tobi", "tobit", "tobit_p", + "tobit_sw", "token", "tokeni", "tokeniz", "tokenize", + "tostring", "total", "translate", "translator", "transmap", + "treat_ll", "treatr_p", "treatreg", "trim", "trnb_cons", + "trnb_mean", "trpoiss_d2", "trunc_ll", "truncr_p", "truncreg", + "tsappend", "tset", "tsfill", "tsline", "tsline_ex", + "tsreport", "tsrevar", "tsrline", "tsset", "tssmooth", + "tsunab", "ttest", "ttesti", "tut_chk", "tut_wait", "tutorial", + "tw", "tware_st", "two", "twoway", "twoway__fpfit_serset", + "twoway__function_gen", "twoway__histogram_gen", + "twoway__ipoint_serset", "twoway__ipoints_serset", + "twoway__kdensity_gen", "twoway__lfit_serset", + "twoway__normgen_gen", "twoway__pci_serset", + "twoway__qfit_serset", "twoway__scatteri_serset", + "twoway__sunflower_gen", "twoway_ksm_serset", "ty", "typ", + "type", "typeof", "u", "unab", "unabbrev", "unabcmd", + "update", "us", "use", "uselabel", "var", "var_mkcompanion", + "var_p", "varbasic", "varfcast", "vargranger", "varirf", + "varirf_add", "varirf_cgraph", "varirf_create", "varirf_ctable", + "varirf_describe", "varirf_dir", "varirf_drop", "varirf_erase", + "varirf_graph", "varirf_ograph", "varirf_rename", "varirf_set", + "varirf_table", "varlist", "varlmar", "varnorm", "varsoc", + "varstable", "varstable_w", "varstable_w2", "varwle", + "vce", "vec", "vec_fevd", "vec_mkphi", "vec_p", "vec_p_w", + "vecirf_create", "veclmar", "veclmar_w", "vecnorm", + "vecnorm_w", "vecrank", "vecstable", "verinst", "vers", + "versi", "versio", "version", "view", "viewsource", "vif", + "vwls", "wdatetof", "webdescribe", "webseek", "webuse", + "weib1_lf", "weib2_lf", "weib_lf", "weib_lf0", "weibhet_glf", + "weibhet_glf_sh", "weibhet_glfa", "weibhet_glfa_sh", + "weibhet_gp", "weibhet_ilf", "weibhet_ilf_sh", "weibhet_ilfa", + "weibhet_ilfa_sh", "weibhet_ip", "weibu_sw", "weibul_p", + "weibull", "weibull_c", "weibull_s", "weibullhet", + "wh", "whelp", "whi", "which", "whil", "while", "wilc_st", + "wilcoxon", "win", "wind", "windo", "window", "winexec", + "wntestb", "wntestb_7", "wntestq", "xchart", "xchart_7", + "xcorr", "xcorr_7", "xi", "xi_6", "xmlsav", "xmlsave", + "xmluse", "xpose", "xsh", "xshe", "xshel", "xshell", + "xt_iis", "xt_tis", "xtab_p", "xtabond", "xtbin_p", + "xtclog", "xtcloglog", "xtcloglog_8", "xtcloglog_d2", + "xtcloglog_pa_p", "xtcloglog_re_p", "xtcnt_p", "xtcorr", + "xtdata", "xtdes", "xtfront_p", "xtfrontier", "xtgee", + "xtgee_elink", "xtgee_estat", "xtgee_makeivar", "xtgee_p", + "xtgee_plink", "xtgls", "xtgls_p", "xthaus", "xthausman", + "xtht_p", "xthtaylor", "xtile", "xtint_p", "xtintreg", + "xtintreg_8", "xtintreg_d2", "xtintreg_p", "xtivp_1", + "xtivp_2", "xtivreg", "xtline", "xtline_ex", "xtlogit", + "xtlogit_8", "xtlogit_d2", "xtlogit_fe_p", "xtlogit_pa_p", + "xtlogit_re_p", "xtmixed", "xtmixed_estat", "xtmixed_p", + "xtnb_fe", "xtnb_lf", "xtnbreg", "xtnbreg_pa_p", + "xtnbreg_refe_p", "xtpcse", "xtpcse_p", "xtpois", "xtpoisson", + "xtpoisson_d2", "xtpoisson_pa_p", "xtpoisson_refe_p", "xtpred", + "xtprobit", "xtprobit_8", "xtprobit_d2", "xtprobit_re_p", + "xtps_fe", "xtps_lf", "xtps_ren", "xtps_ren_8", "xtrar_p", + "xtrc", "xtrc_p", "xtrchh", "xtrefe_p", "xtreg", "xtreg_be", + "xtreg_fe", "xtreg_ml", "xtreg_pa_p", "xtreg_re", + "xtregar", "xtrere_p", "xtset", "xtsf_ll", "xtsf_llti", + "xtsum", "xttab", "xttest0", "xttobit", "xttobit_8", + "xttobit_p", "xttrans", "yx", "yxview__barlike_draw", + "yxview_area_draw", "yxview_bar_draw", "yxview_dot_draw", + "yxview_dropline_draw", "yxview_function_draw", + "yxview_iarrow_draw", "yxview_ilabels_draw", + "yxview_normal_draw", "yxview_pcarrow_draw", + "yxview_pcbarrow_draw", "yxview_pccapsym_draw", + "yxview_pcscatter_draw", "yxview_pcspike_draw", + "yxview_rarea_draw", "yxview_rbar_draw", "yxview_rbarm_draw", + "yxview_rcap_draw", "yxview_rcapsym_draw", + "yxview_rconnected_draw", "yxview_rline_draw", + "yxview_rscatter_draw", "yxview_rspike_draw", + "yxview_spike_draw", "yxview_sunflower_draw", "zap_s", "zinb", + "zinb_llf", "zinb_plf", "zip", "zip_llf", "zip_p", "zip_plf", + "zt_ct_5", "zt_hc_5", "zt_hcd_5", "zt_is_5", "zt_iss_5", + "zt_sho_5", "zt_smp_5", "ztbase_5", "ztcox_5", "ztdes_5", + "ztereg_5", "ztfill_5", "ztgen_5", "ztir_5", "ztjoin_5", "ztnb", + "ztnb_p", "ztp", "ztp_p", "zts_5", "ztset_5", "ztspli_5", + "ztsum_5", "zttoct_5", "ztvary_5", "ztweib_5" +) + -builtins_functions = ( +builtins_functions = ( "abbrev", "abs", "acos", "acosh", "asin", "asinh", "atan", "atan2", "atanh", "autocode", "betaden", "binomial", "binomialp", "binomialtail", "binormal", "bofd", @@ -454,4 +454,4 @@ builtins_functions = ( "weibullphtailabgx", "weibulltailabx", "weibulltailabgx", "wofd", "word", "wordbreaklocale", "wordcount", "year", "yearly", "yh", "ym", "yofd", "yq", "yw" -) +) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py index 6e85d9aada..e72e5a5a87 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py @@ -1,1003 +1,1003 @@ -""" - pygments.lexers._tsql_builtins - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - These are manually translated lists from https://msdn.microsoft.com. - +""" + pygments.lexers._tsql_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + These are manually translated lists from https://msdn.microsoft.com. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -# See https://msdn.microsoft.com/en-us/library/ms174986.aspx. -OPERATORS = ( - '!<', - '!=', - '!>', - '<', - '<=', - '<>', - '=', - '>', - '>=', - '+', - '+=', - '-', - '-=', - '*', - '*=', - '/', - '/=', - '%', - '%=', - '&', - '&=', - '|', - '|=', - '^', - '^=', - '~', - '::', -) - -OPERATOR_WORDS = ( - 'all', - 'and', - 'any', - 'between', - 'except', - 'exists', - 'in', - 'intersect', - 'like', - 'not', - 'or', - 'some', - 'union', -) - -_KEYWORDS_SERVER = ( - 'add', - 'all', - 'alter', - 'and', - 'any', - 'as', - 'asc', - 'authorization', - 'backup', - 'begin', - 'between', - 'break', - 'browse', - 'bulk', - 'by', - 'cascade', - 'case', - 'catch', - 'check', - 'checkpoint', - 'close', - 'clustered', - 'coalesce', - 'collate', - 'column', - 'commit', - 'compute', - 'constraint', - 'contains', - 'containstable', - 'continue', - 'convert', - 'create', - 'cross', - 'current', - 'current_date', - 'current_time', - 'current_timestamp', - 'current_user', - 'cursor', - 'database', - 'dbcc', - 'deallocate', - 'declare', - 'default', - 'delete', - 'deny', - 'desc', - 'disk', - 'distinct', - 'distributed', - 'double', - 'drop', - 'dump', - 'else', - 'end', - 'errlvl', - 'escape', - 'except', - 'exec', - 'execute', - 'exists', - 'exit', - 'external', - 'fetch', - 'file', - 'fillfactor', - 'for', - 'foreign', - 'freetext', - 'freetexttable', - 'from', - 'full', - 'function', - 'goto', - 'grant', - 'group', - 'having', - 'holdlock', - 'identity', - 'identity_insert', - 'identitycol', - 'if', - 'in', - 'index', - 'inner', - 'insert', - 'intersect', - 'into', - 'is', - 'join', - 'key', - 'kill', - 'left', - 'like', - 'lineno', - 'load', - 'merge', - 'national', - 'nocheck', - 'nonclustered', - 'not', - 'null', - 'nullif', - 'of', - 'off', - 'offsets', - 'on', - 'open', - 'opendatasource', - 'openquery', - 'openrowset', - 'openxml', - 'option', - 'or', - 'order', - 'outer', - 'over', - 'percent', - 'pivot', - 'plan', - 'precision', - 'primary', - 'print', - 'proc', - 'procedure', - 'public', - 'raiserror', - 'read', - 'readtext', - 'reconfigure', - 'references', - 'replication', - 'restore', - 'restrict', - 'return', - 'revert', - 'revoke', - 'right', - 'rollback', - 'rowcount', - 'rowguidcol', - 'rule', - 'save', - 'schema', - 'securityaudit', - 'select', - 'semantickeyphrasetable', - 'semanticsimilaritydetailstable', - 'semanticsimilaritytable', - 'session_user', - 'set', - 'setuser', - 'shutdown', - 'some', - 'statistics', - 'system_user', - 'table', - 'tablesample', - 'textsize', - 'then', - 'throw', - 'to', - 'top', - 'tran', - 'transaction', - 'trigger', - 'truncate', - 'try', - 'try_convert', - 'tsequal', - 'union', - 'unique', - 'unpivot', - 'update', - 'updatetext', - 'use', - 'user', - 'values', - 'varying', - 'view', - 'waitfor', - 'when', - 'where', - 'while', - 'with', - 'within', - 'writetext', -) - -_KEYWORDS_FUTURE = ( - 'absolute', - 'action', - 'admin', - 'after', - 'aggregate', - 'alias', - 'allocate', - 'are', - 'array', - 'asensitive', - 'assertion', - 'asymmetric', - 'at', - 'atomic', - 'before', - 'binary', - 'bit', - 'blob', - 'boolean', - 'both', - 'breadth', - 'call', - 'called', - 'cardinality', - 'cascaded', - 'cast', - 'catalog', - 'char', - 'character', - 'class', - 'clob', - 'collation', - 'collect', - 'completion', - 'condition', - 'connect', - 'connection', - 'constraints', - 'constructor', - 'corr', - 'corresponding', - 'covar_pop', - 'covar_samp', - 'cube', - 'cume_dist', - 'current_catalog', - 'current_default_transform_group', - 'current_path', - 'current_role', - 'current_schema', - 'current_transform_group_for_type', - 'cycle', - 'data', - 'date', - 'day', - 'dec', - 'decimal', - 'deferrable', - 'deferred', - 'depth', - 'deref', - 'describe', - 'descriptor', - 'destroy', - 'destructor', - 'deterministic', - 'diagnostics', - 'dictionary', - 'disconnect', - 'domain', - 'dynamic', - 'each', - 'element', - 'end-exec', - 'equals', - 'every', - 'exception', - 'false', - 'filter', - 'first', - 'float', - 'found', - 'free', - 'fulltexttable', - 'fusion', - 'general', - 'get', - 'global', - 'go', - 'grouping', - 'hold', - 'host', - 'hour', - 'ignore', - 'immediate', - 'indicator', - 'initialize', - 'initially', - 'inout', - 'input', - 'int', - 'integer', - 'intersection', - 'interval', - 'isolation', - 'iterate', - 'language', - 'large', - 'last', - 'lateral', - 'leading', - 'less', - 'level', - 'like_regex', - 'limit', - 'ln', - 'local', - 'localtime', - 'localtimestamp', - 'locator', - 'map', - 'match', - 'member', - 'method', - 'minute', - 'mod', - 'modifies', - 'modify', - 'module', - 'month', - 'multiset', - 'names', - 'natural', - 'nchar', - 'nclob', - 'new', - 'next', - 'no', - 'none', - 'normalize', - 'numeric', - 'object', - 'occurrences_regex', - 'old', - 'only', - 'operation', - 'ordinality', - 'out', - 'output', - 'overlay', - 'pad', - 'parameter', - 'parameters', - 'partial', - 'partition', - 'path', - 'percent_rank', - 'percentile_cont', - 'percentile_disc', - 'position_regex', - 'postfix', - 'prefix', - 'preorder', - 'prepare', - 'preserve', - 'prior', - 'privileges', - 'range', - 'reads', - 'real', - 'recursive', - 'ref', - 'referencing', - 'regr_avgx', - 'regr_avgy', - 'regr_count', - 'regr_intercept', - 'regr_r2', - 'regr_slope', - 'regr_sxx', - 'regr_sxy', - 'regr_syy', - 'relative', - 'release', - 'result', - 'returns', - 'role', - 'rollup', - 'routine', - 'row', - 'rows', - 'savepoint', - 'scope', - 'scroll', - 'search', - 'second', - 'section', - 'sensitive', - 'sequence', - 'session', - 'sets', - 'similar', - 'size', - 'smallint', - 'space', - 'specific', - 'specifictype', - 'sql', - 'sqlexception', - 'sqlstate', - 'sqlwarning', - 'start', - 'state', - 'statement', - 'static', - 'stddev_pop', - 'stddev_samp', - 'structure', - 'submultiset', - 'substring_regex', - 'symmetric', - 'system', - 'temporary', - 'terminate', - 'than', - 'time', - 'timestamp', - 'timezone_hour', - 'timezone_minute', - 'trailing', - 'translate_regex', - 'translation', - 'treat', - 'true', - 'uescape', - 'under', - 'unknown', - 'unnest', - 'usage', - 'using', - 'value', - 'var_pop', - 'var_samp', - 'varchar', - 'variable', - 'whenever', - 'width_bucket', - 'window', - 'within', - 'without', - 'work', - 'write', - 'xmlagg', - 'xmlattributes', - 'xmlbinary', - 'xmlcast', - 'xmlcomment', - 'xmlconcat', - 'xmldocument', - 'xmlelement', - 'xmlexists', - 'xmlforest', - 'xmliterate', - 'xmlnamespaces', - 'xmlparse', - 'xmlpi', - 'xmlquery', - 'xmlserialize', - 'xmltable', - 'xmltext', - 'xmlvalidate', - 'year', - 'zone', -) - -_KEYWORDS_ODBC = ( - 'absolute', - 'action', - 'ada', - 'add', - 'all', - 'allocate', - 'alter', - 'and', - 'any', - 'are', - 'as', - 'asc', - 'assertion', - 'at', - 'authorization', - 'avg', - 'begin', - 'between', - 'bit', - 'bit_length', - 'both', - 'by', - 'cascade', - 'cascaded', - 'case', - 'cast', - 'catalog', - 'char', - 'char_length', - 'character', - 'character_length', - 'check', - 'close', - 'coalesce', - 'collate', - 'collation', - 'column', - 'commit', - 'connect', - 'connection', - 'constraint', - 'constraints', - 'continue', - 'convert', - 'corresponding', - 'count', - 'create', - 'cross', - 'current', - 'current_date', - 'current_time', - 'current_timestamp', - 'current_user', - 'cursor', - 'date', - 'day', - 'deallocate', - 'dec', - 'decimal', - 'declare', - 'default', - 'deferrable', - 'deferred', - 'delete', - 'desc', - 'describe', - 'descriptor', - 'diagnostics', - 'disconnect', - 'distinct', - 'domain', - 'double', - 'drop', - 'else', - 'end', - 'end-exec', - 'escape', - 'except', - 'exception', - 'exec', - 'execute', - 'exists', - 'external', - 'extract', - 'false', - 'fetch', - 'first', - 'float', - 'for', - 'foreign', - 'fortran', - 'found', - 'from', - 'full', - 'get', - 'global', - 'go', - 'goto', - 'grant', - 'group', - 'having', - 'hour', - 'identity', - 'immediate', - 'in', - 'include', - 'index', - 'indicator', - 'initially', - 'inner', - 'input', - 'insensitive', - 'insert', - 'int', - 'integer', - 'intersect', - 'interval', - 'into', - 'is', - 'isolation', - 'join', - 'key', - 'language', - 'last', - 'leading', - 'left', - 'level', - 'like', - 'local', - 'lower', - 'match', - 'max', - 'min', - 'minute', - 'module', - 'month', - 'names', - 'national', - 'natural', - 'nchar', - 'next', - 'no', - 'none', - 'not', - 'null', - 'nullif', - 'numeric', - 'octet_length', - 'of', - 'on', - 'only', - 'open', - 'option', - 'or', - 'order', - 'outer', - 'output', - 'overlaps', - 'pad', - 'partial', - 'pascal', - 'position', - 'precision', - 'prepare', - 'preserve', - 'primary', - 'prior', - 'privileges', - 'procedure', - 'public', - 'read', - 'real', - 'references', - 'relative', - 'restrict', - 'revoke', - 'right', - 'rollback', - 'rows', - 'schema', - 'scroll', - 'second', - 'section', - 'select', - 'session', - 'session_user', - 'set', - 'size', - 'smallint', - 'some', - 'space', - 'sql', - 'sqlca', - 'sqlcode', - 'sqlerror', - 'sqlstate', - 'sqlwarning', - 'substring', - 'sum', - 'system_user', - 'table', - 'temporary', - 'then', - 'time', - 'timestamp', - 'timezone_hour', - 'timezone_minute', - 'to', - 'trailing', - 'transaction', - 'translate', - 'translation', - 'trim', - 'true', - 'union', - 'unique', - 'unknown', - 'update', - 'upper', - 'usage', - 'user', - 'using', - 'value', - 'values', - 'varchar', - 'varying', - 'view', - 'when', - 'whenever', - 'where', - 'with', - 'work', - 'write', - 'year', - 'zone', -) - -# See https://msdn.microsoft.com/en-us/library/ms189822.aspx. -KEYWORDS = sorted(set(_KEYWORDS_FUTURE + _KEYWORDS_ODBC + _KEYWORDS_SERVER)) - -# See https://msdn.microsoft.com/en-us/library/ms187752.aspx. -TYPES = ( - 'bigint', - 'binary', - 'bit', - 'char', - 'cursor', - 'date', - 'datetime', - 'datetime2', - 'datetimeoffset', - 'decimal', - 'float', - 'hierarchyid', - 'image', - 'int', - 'money', - 'nchar', - 'ntext', - 'numeric', - 'nvarchar', - 'real', - 'smalldatetime', - 'smallint', - 'smallmoney', - 'sql_variant', - 'table', - 'text', - 'time', - 'timestamp', - 'tinyint', - 'uniqueidentifier', - 'varbinary', - 'varchar', - 'xml', -) - -# See https://msdn.microsoft.com/en-us/library/ms174318.aspx. -FUNCTIONS = ( - '$partition', - 'abs', - 'acos', - 'app_name', - 'applock_mode', - 'applock_test', - 'ascii', - 'asin', - 'assemblyproperty', - 'atan', - 'atn2', - 'avg', - 'binary_checksum', - 'cast', - 'ceiling', - 'certencoded', - 'certprivatekey', - 'char', - 'charindex', - 'checksum', - 'checksum_agg', - 'choose', - 'col_length', - 'col_name', - 'columnproperty', - 'compress', - 'concat', - 'connectionproperty', - 'context_info', - 'convert', - 'cos', - 'cot', - 'count', - 'count_big', - 'current_request_id', - 'current_timestamp', - 'current_transaction_id', - 'current_user', - 'cursor_status', - 'database_principal_id', - 'databasepropertyex', - 'dateadd', - 'datediff', - 'datediff_big', - 'datefromparts', - 'datename', - 'datepart', - 'datetime2fromparts', - 'datetimefromparts', - 'datetimeoffsetfromparts', - 'day', - 'db_id', - 'db_name', - 'decompress', - 'degrees', - 'dense_rank', - 'difference', - 'eomonth', - 'error_line', - 'error_message', - 'error_number', - 'error_procedure', - 'error_severity', - 'error_state', - 'exp', - 'file_id', - 'file_idex', - 'file_name', - 'filegroup_id', - 'filegroup_name', - 'filegroupproperty', - 'fileproperty', - 'floor', - 'format', - 'formatmessage', - 'fulltextcatalogproperty', - 'fulltextserviceproperty', - 'get_filestream_transaction_context', - 'getansinull', - 'getdate', - 'getutcdate', - 'grouping', - 'grouping_id', - 'has_perms_by_name', - 'host_id', - 'host_name', - 'iif', - 'index_col', - 'indexkey_property', - 'indexproperty', - 'is_member', - 'is_rolemember', - 'is_srvrolemember', - 'isdate', - 'isjson', - 'isnull', - 'isnumeric', - 'json_modify', - 'json_query', - 'json_value', - 'left', - 'len', - 'log', - 'log10', - 'lower', - 'ltrim', - 'max', - 'min', - 'min_active_rowversion', - 'month', - 'nchar', - 'newid', - 'newsequentialid', - 'ntile', - 'object_definition', - 'object_id', - 'object_name', - 'object_schema_name', - 'objectproperty', - 'objectpropertyex', - 'opendatasource', - 'openjson', - 'openquery', - 'openrowset', - 'openxml', - 'original_db_name', - 'original_login', - 'parse', - 'parsename', - 'patindex', - 'permissions', - 'pi', - 'power', - 'pwdcompare', - 'pwdencrypt', - 'quotename', - 'radians', - 'rand', - 'rank', - 'replace', - 'replicate', - 'reverse', - 'right', - 'round', - 'row_number', - 'rowcount_big', - 'rtrim', - 'schema_id', - 'schema_name', - 'scope_identity', - 'serverproperty', - 'session_context', - 'session_user', - 'sign', - 'sin', - 'smalldatetimefromparts', - 'soundex', - 'sp_helplanguage', - 'space', - 'sqrt', - 'square', - 'stats_date', - 'stdev', - 'stdevp', - 'str', - 'string_escape', - 'string_split', - 'stuff', - 'substring', - 'sum', - 'suser_id', - 'suser_name', - 'suser_sid', - 'suser_sname', - 'switchoffset', - 'sysdatetime', - 'sysdatetimeoffset', - 'system_user', - 'sysutcdatetime', - 'tan', - 'textptr', - 'textvalid', - 'timefromparts', - 'todatetimeoffset', - 'try_cast', - 'try_convert', - 'try_parse', - 'type_id', - 'type_name', - 'typeproperty', - 'unicode', - 'upper', - 'user_id', - 'user_name', - 'var', - 'varp', - 'xact_state', - 'year', -) + :license: BSD, see LICENSE for details. +""" + +# See https://msdn.microsoft.com/en-us/library/ms174986.aspx. +OPERATORS = ( + '!<', + '!=', + '!>', + '<', + '<=', + '<>', + '=', + '>', + '>=', + '+', + '+=', + '-', + '-=', + '*', + '*=', + '/', + '/=', + '%', + '%=', + '&', + '&=', + '|', + '|=', + '^', + '^=', + '~', + '::', +) + +OPERATOR_WORDS = ( + 'all', + 'and', + 'any', + 'between', + 'except', + 'exists', + 'in', + 'intersect', + 'like', + 'not', + 'or', + 'some', + 'union', +) + +_KEYWORDS_SERVER = ( + 'add', + 'all', + 'alter', + 'and', + 'any', + 'as', + 'asc', + 'authorization', + 'backup', + 'begin', + 'between', + 'break', + 'browse', + 'bulk', + 'by', + 'cascade', + 'case', + 'catch', + 'check', + 'checkpoint', + 'close', + 'clustered', + 'coalesce', + 'collate', + 'column', + 'commit', + 'compute', + 'constraint', + 'contains', + 'containstable', + 'continue', + 'convert', + 'create', + 'cross', + 'current', + 'current_date', + 'current_time', + 'current_timestamp', + 'current_user', + 'cursor', + 'database', + 'dbcc', + 'deallocate', + 'declare', + 'default', + 'delete', + 'deny', + 'desc', + 'disk', + 'distinct', + 'distributed', + 'double', + 'drop', + 'dump', + 'else', + 'end', + 'errlvl', + 'escape', + 'except', + 'exec', + 'execute', + 'exists', + 'exit', + 'external', + 'fetch', + 'file', + 'fillfactor', + 'for', + 'foreign', + 'freetext', + 'freetexttable', + 'from', + 'full', + 'function', + 'goto', + 'grant', + 'group', + 'having', + 'holdlock', + 'identity', + 'identity_insert', + 'identitycol', + 'if', + 'in', + 'index', + 'inner', + 'insert', + 'intersect', + 'into', + 'is', + 'join', + 'key', + 'kill', + 'left', + 'like', + 'lineno', + 'load', + 'merge', + 'national', + 'nocheck', + 'nonclustered', + 'not', + 'null', + 'nullif', + 'of', + 'off', + 'offsets', + 'on', + 'open', + 'opendatasource', + 'openquery', + 'openrowset', + 'openxml', + 'option', + 'or', + 'order', + 'outer', + 'over', + 'percent', + 'pivot', + 'plan', + 'precision', + 'primary', + 'print', + 'proc', + 'procedure', + 'public', + 'raiserror', + 'read', + 'readtext', + 'reconfigure', + 'references', + 'replication', + 'restore', + 'restrict', + 'return', + 'revert', + 'revoke', + 'right', + 'rollback', + 'rowcount', + 'rowguidcol', + 'rule', + 'save', + 'schema', + 'securityaudit', + 'select', + 'semantickeyphrasetable', + 'semanticsimilaritydetailstable', + 'semanticsimilaritytable', + 'session_user', + 'set', + 'setuser', + 'shutdown', + 'some', + 'statistics', + 'system_user', + 'table', + 'tablesample', + 'textsize', + 'then', + 'throw', + 'to', + 'top', + 'tran', + 'transaction', + 'trigger', + 'truncate', + 'try', + 'try_convert', + 'tsequal', + 'union', + 'unique', + 'unpivot', + 'update', + 'updatetext', + 'use', + 'user', + 'values', + 'varying', + 'view', + 'waitfor', + 'when', + 'where', + 'while', + 'with', + 'within', + 'writetext', +) + +_KEYWORDS_FUTURE = ( + 'absolute', + 'action', + 'admin', + 'after', + 'aggregate', + 'alias', + 'allocate', + 'are', + 'array', + 'asensitive', + 'assertion', + 'asymmetric', + 'at', + 'atomic', + 'before', + 'binary', + 'bit', + 'blob', + 'boolean', + 'both', + 'breadth', + 'call', + 'called', + 'cardinality', + 'cascaded', + 'cast', + 'catalog', + 'char', + 'character', + 'class', + 'clob', + 'collation', + 'collect', + 'completion', + 'condition', + 'connect', + 'connection', + 'constraints', + 'constructor', + 'corr', + 'corresponding', + 'covar_pop', + 'covar_samp', + 'cube', + 'cume_dist', + 'current_catalog', + 'current_default_transform_group', + 'current_path', + 'current_role', + 'current_schema', + 'current_transform_group_for_type', + 'cycle', + 'data', + 'date', + 'day', + 'dec', + 'decimal', + 'deferrable', + 'deferred', + 'depth', + 'deref', + 'describe', + 'descriptor', + 'destroy', + 'destructor', + 'deterministic', + 'diagnostics', + 'dictionary', + 'disconnect', + 'domain', + 'dynamic', + 'each', + 'element', + 'end-exec', + 'equals', + 'every', + 'exception', + 'false', + 'filter', + 'first', + 'float', + 'found', + 'free', + 'fulltexttable', + 'fusion', + 'general', + 'get', + 'global', + 'go', + 'grouping', + 'hold', + 'host', + 'hour', + 'ignore', + 'immediate', + 'indicator', + 'initialize', + 'initially', + 'inout', + 'input', + 'int', + 'integer', + 'intersection', + 'interval', + 'isolation', + 'iterate', + 'language', + 'large', + 'last', + 'lateral', + 'leading', + 'less', + 'level', + 'like_regex', + 'limit', + 'ln', + 'local', + 'localtime', + 'localtimestamp', + 'locator', + 'map', + 'match', + 'member', + 'method', + 'minute', + 'mod', + 'modifies', + 'modify', + 'module', + 'month', + 'multiset', + 'names', + 'natural', + 'nchar', + 'nclob', + 'new', + 'next', + 'no', + 'none', + 'normalize', + 'numeric', + 'object', + 'occurrences_regex', + 'old', + 'only', + 'operation', + 'ordinality', + 'out', + 'output', + 'overlay', + 'pad', + 'parameter', + 'parameters', + 'partial', + 'partition', + 'path', + 'percent_rank', + 'percentile_cont', + 'percentile_disc', + 'position_regex', + 'postfix', + 'prefix', + 'preorder', + 'prepare', + 'preserve', + 'prior', + 'privileges', + 'range', + 'reads', + 'real', + 'recursive', + 'ref', + 'referencing', + 'regr_avgx', + 'regr_avgy', + 'regr_count', + 'regr_intercept', + 'regr_r2', + 'regr_slope', + 'regr_sxx', + 'regr_sxy', + 'regr_syy', + 'relative', + 'release', + 'result', + 'returns', + 'role', + 'rollup', + 'routine', + 'row', + 'rows', + 'savepoint', + 'scope', + 'scroll', + 'search', + 'second', + 'section', + 'sensitive', + 'sequence', + 'session', + 'sets', + 'similar', + 'size', + 'smallint', + 'space', + 'specific', + 'specifictype', + 'sql', + 'sqlexception', + 'sqlstate', + 'sqlwarning', + 'start', + 'state', + 'statement', + 'static', + 'stddev_pop', + 'stddev_samp', + 'structure', + 'submultiset', + 'substring_regex', + 'symmetric', + 'system', + 'temporary', + 'terminate', + 'than', + 'time', + 'timestamp', + 'timezone_hour', + 'timezone_minute', + 'trailing', + 'translate_regex', + 'translation', + 'treat', + 'true', + 'uescape', + 'under', + 'unknown', + 'unnest', + 'usage', + 'using', + 'value', + 'var_pop', + 'var_samp', + 'varchar', + 'variable', + 'whenever', + 'width_bucket', + 'window', + 'within', + 'without', + 'work', + 'write', + 'xmlagg', + 'xmlattributes', + 'xmlbinary', + 'xmlcast', + 'xmlcomment', + 'xmlconcat', + 'xmldocument', + 'xmlelement', + 'xmlexists', + 'xmlforest', + 'xmliterate', + 'xmlnamespaces', + 'xmlparse', + 'xmlpi', + 'xmlquery', + 'xmlserialize', + 'xmltable', + 'xmltext', + 'xmlvalidate', + 'year', + 'zone', +) + +_KEYWORDS_ODBC = ( + 'absolute', + 'action', + 'ada', + 'add', + 'all', + 'allocate', + 'alter', + 'and', + 'any', + 'are', + 'as', + 'asc', + 'assertion', + 'at', + 'authorization', + 'avg', + 'begin', + 'between', + 'bit', + 'bit_length', + 'both', + 'by', + 'cascade', + 'cascaded', + 'case', + 'cast', + 'catalog', + 'char', + 'char_length', + 'character', + 'character_length', + 'check', + 'close', + 'coalesce', + 'collate', + 'collation', + 'column', + 'commit', + 'connect', + 'connection', + 'constraint', + 'constraints', + 'continue', + 'convert', + 'corresponding', + 'count', + 'create', + 'cross', + 'current', + 'current_date', + 'current_time', + 'current_timestamp', + 'current_user', + 'cursor', + 'date', + 'day', + 'deallocate', + 'dec', + 'decimal', + 'declare', + 'default', + 'deferrable', + 'deferred', + 'delete', + 'desc', + 'describe', + 'descriptor', + 'diagnostics', + 'disconnect', + 'distinct', + 'domain', + 'double', + 'drop', + 'else', + 'end', + 'end-exec', + 'escape', + 'except', + 'exception', + 'exec', + 'execute', + 'exists', + 'external', + 'extract', + 'false', + 'fetch', + 'first', + 'float', + 'for', + 'foreign', + 'fortran', + 'found', + 'from', + 'full', + 'get', + 'global', + 'go', + 'goto', + 'grant', + 'group', + 'having', + 'hour', + 'identity', + 'immediate', + 'in', + 'include', + 'index', + 'indicator', + 'initially', + 'inner', + 'input', + 'insensitive', + 'insert', + 'int', + 'integer', + 'intersect', + 'interval', + 'into', + 'is', + 'isolation', + 'join', + 'key', + 'language', + 'last', + 'leading', + 'left', + 'level', + 'like', + 'local', + 'lower', + 'match', + 'max', + 'min', + 'minute', + 'module', + 'month', + 'names', + 'national', + 'natural', + 'nchar', + 'next', + 'no', + 'none', + 'not', + 'null', + 'nullif', + 'numeric', + 'octet_length', + 'of', + 'on', + 'only', + 'open', + 'option', + 'or', + 'order', + 'outer', + 'output', + 'overlaps', + 'pad', + 'partial', + 'pascal', + 'position', + 'precision', + 'prepare', + 'preserve', + 'primary', + 'prior', + 'privileges', + 'procedure', + 'public', + 'read', + 'real', + 'references', + 'relative', + 'restrict', + 'revoke', + 'right', + 'rollback', + 'rows', + 'schema', + 'scroll', + 'second', + 'section', + 'select', + 'session', + 'session_user', + 'set', + 'size', + 'smallint', + 'some', + 'space', + 'sql', + 'sqlca', + 'sqlcode', + 'sqlerror', + 'sqlstate', + 'sqlwarning', + 'substring', + 'sum', + 'system_user', + 'table', + 'temporary', + 'then', + 'time', + 'timestamp', + 'timezone_hour', + 'timezone_minute', + 'to', + 'trailing', + 'transaction', + 'translate', + 'translation', + 'trim', + 'true', + 'union', + 'unique', + 'unknown', + 'update', + 'upper', + 'usage', + 'user', + 'using', + 'value', + 'values', + 'varchar', + 'varying', + 'view', + 'when', + 'whenever', + 'where', + 'with', + 'work', + 'write', + 'year', + 'zone', +) + +# See https://msdn.microsoft.com/en-us/library/ms189822.aspx. +KEYWORDS = sorted(set(_KEYWORDS_FUTURE + _KEYWORDS_ODBC + _KEYWORDS_SERVER)) + +# See https://msdn.microsoft.com/en-us/library/ms187752.aspx. +TYPES = ( + 'bigint', + 'binary', + 'bit', + 'char', + 'cursor', + 'date', + 'datetime', + 'datetime2', + 'datetimeoffset', + 'decimal', + 'float', + 'hierarchyid', + 'image', + 'int', + 'money', + 'nchar', + 'ntext', + 'numeric', + 'nvarchar', + 'real', + 'smalldatetime', + 'smallint', + 'smallmoney', + 'sql_variant', + 'table', + 'text', + 'time', + 'timestamp', + 'tinyint', + 'uniqueidentifier', + 'varbinary', + 'varchar', + 'xml', +) + +# See https://msdn.microsoft.com/en-us/library/ms174318.aspx. +FUNCTIONS = ( + '$partition', + 'abs', + 'acos', + 'app_name', + 'applock_mode', + 'applock_test', + 'ascii', + 'asin', + 'assemblyproperty', + 'atan', + 'atn2', + 'avg', + 'binary_checksum', + 'cast', + 'ceiling', + 'certencoded', + 'certprivatekey', + 'char', + 'charindex', + 'checksum', + 'checksum_agg', + 'choose', + 'col_length', + 'col_name', + 'columnproperty', + 'compress', + 'concat', + 'connectionproperty', + 'context_info', + 'convert', + 'cos', + 'cot', + 'count', + 'count_big', + 'current_request_id', + 'current_timestamp', + 'current_transaction_id', + 'current_user', + 'cursor_status', + 'database_principal_id', + 'databasepropertyex', + 'dateadd', + 'datediff', + 'datediff_big', + 'datefromparts', + 'datename', + 'datepart', + 'datetime2fromparts', + 'datetimefromparts', + 'datetimeoffsetfromparts', + 'day', + 'db_id', + 'db_name', + 'decompress', + 'degrees', + 'dense_rank', + 'difference', + 'eomonth', + 'error_line', + 'error_message', + 'error_number', + 'error_procedure', + 'error_severity', + 'error_state', + 'exp', + 'file_id', + 'file_idex', + 'file_name', + 'filegroup_id', + 'filegroup_name', + 'filegroupproperty', + 'fileproperty', + 'floor', + 'format', + 'formatmessage', + 'fulltextcatalogproperty', + 'fulltextserviceproperty', + 'get_filestream_transaction_context', + 'getansinull', + 'getdate', + 'getutcdate', + 'grouping', + 'grouping_id', + 'has_perms_by_name', + 'host_id', + 'host_name', + 'iif', + 'index_col', + 'indexkey_property', + 'indexproperty', + 'is_member', + 'is_rolemember', + 'is_srvrolemember', + 'isdate', + 'isjson', + 'isnull', + 'isnumeric', + 'json_modify', + 'json_query', + 'json_value', + 'left', + 'len', + 'log', + 'log10', + 'lower', + 'ltrim', + 'max', + 'min', + 'min_active_rowversion', + 'month', + 'nchar', + 'newid', + 'newsequentialid', + 'ntile', + 'object_definition', + 'object_id', + 'object_name', + 'object_schema_name', + 'objectproperty', + 'objectpropertyex', + 'opendatasource', + 'openjson', + 'openquery', + 'openrowset', + 'openxml', + 'original_db_name', + 'original_login', + 'parse', + 'parsename', + 'patindex', + 'permissions', + 'pi', + 'power', + 'pwdcompare', + 'pwdencrypt', + 'quotename', + 'radians', + 'rand', + 'rank', + 'replace', + 'replicate', + 'reverse', + 'right', + 'round', + 'row_number', + 'rowcount_big', + 'rtrim', + 'schema_id', + 'schema_name', + 'scope_identity', + 'serverproperty', + 'session_context', + 'session_user', + 'sign', + 'sin', + 'smalldatetimefromparts', + 'soundex', + 'sp_helplanguage', + 'space', + 'sqrt', + 'square', + 'stats_date', + 'stdev', + 'stdevp', + 'str', + 'string_escape', + 'string_split', + 'stuff', + 'substring', + 'sum', + 'suser_id', + 'suser_name', + 'suser_sid', + 'suser_sname', + 'switchoffset', + 'sysdatetime', + 'sysdatetimeoffset', + 'system_user', + 'sysutcdatetime', + 'tan', + 'textptr', + 'textvalid', + 'timefromparts', + 'todatetimeoffset', + 'try_cast', + 'try_convert', + 'try_parse', + 'type_id', + 'type_name', + 'typeproperty', + 'unicode', + 'upper', + 'user_id', + 'user_name', + 'var', + 'varp', + 'xact_state', + 'year', +) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py index 8f5175209b..7256a06f17 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py @@ -1,279 +1,279 @@ -""" - pygments.lexers._vbscript_builtins - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - These are manually translated lists from - http://www.indusoft.com/pdf/VBScript%20Reference.pdf. - +""" + pygments.lexers._vbscript_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + These are manually translated lists from + http://www.indusoft.com/pdf/VBScript%20Reference.pdf. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -KEYWORDS = [ - 'ByRef', - 'ByVal', - # dim: special rule - 'call', - 'case', - 'class', - # const: special rule - 'do', - 'each', - 'else', - 'elseif', - 'end', - 'erase', - 'execute', - 'function', - 'exit', - 'for', - 'function', - 'GetRef', - 'global', - 'if', - 'let', - 'loop', - 'next', - 'new', - # option: special rule - 'private', - 'public', - 'redim', - 'select', - 'set', - 'sub', - 'then', - 'wend', - 'while', - 'with', -] - -BUILTIN_FUNCTIONS = [ - 'Abs', - 'Array', - 'Asc', - 'Atn', - 'CBool', - 'CByte', - 'CCur', - 'CDate', - 'CDbl', - 'Chr', - 'CInt', - 'CLng', - 'Cos', - 'CreateObject', - 'CSng', - 'CStr', - 'Date', - 'DateAdd', - 'DateDiff', - 'DatePart', - 'DateSerial', - 'DateValue', - 'Day', - 'Eval', - 'Exp', - 'Filter', - 'Fix', - 'FormatCurrency', - 'FormatDateTime', - 'FormatNumber', - 'FormatPercent', - 'GetObject', - 'GetLocale', - 'Hex', - 'Hour', - 'InStr', - 'inStrRev', - 'Int', - 'IsArray', - 'IsDate', - 'IsEmpty', - 'IsNull', - 'IsNumeric', - 'IsObject', - 'Join', - 'LBound', - 'LCase', - 'Left', - 'Len', - 'LoadPicture', - 'Log', - 'LTrim', - 'Mid', - 'Minute', - 'Month', - 'MonthName', - 'MsgBox', - 'Now', - 'Oct', - 'Randomize', - 'RegExp', - 'Replace', - 'RGB', - 'Right', - 'Rnd', - 'Round', - 'RTrim', - 'ScriptEngine', - 'ScriptEngineBuildVersion', - 'ScriptEngineMajorVersion', - 'ScriptEngineMinorVersion', - 'Second', - 'SetLocale', - 'Sgn', - 'Space', - 'Split', - 'Sqr', - 'StrComp', - 'String', - 'StrReverse', - 'Tan', - 'Time', - 'Timer', - 'TimeSerial', - 'TimeValue', - 'Trim', - 'TypeName', - 'UBound', - 'UCase', - 'VarType', - 'Weekday', - 'WeekdayName', - 'Year', -] - -BUILTIN_VARIABLES = [ - 'Debug', - 'Dictionary', - 'Drive', - 'Drives', - 'Err', - 'File', - 'Files', - 'FileSystemObject', - 'Folder', - 'Folders', - 'Match', - 'Matches', - 'RegExp', - 'Submatches', - 'TextStream', -] - -OPERATORS = [ - '+', - '-', - '*', - '/', - '\\', - '^', - '|', - '<', - '<=', - '>', - '>=', - '=', - '<>', - '&', - '$', -] - -OPERATOR_WORDS = [ - 'mod', - 'and', - 'or', - 'xor', - 'eqv', - 'imp', - 'is', - 'not', -] - -BUILTIN_CONSTANTS = [ - 'False', - 'True', - 'vbAbort', - 'vbAbortRetryIgnore', - 'vbApplicationModal', - 'vbArray', - 'vbBinaryCompare', - 'vbBlack', - 'vbBlue', - 'vbBoole', - 'vbByte', - 'vbCancel', - 'vbCr', - 'vbCritical', - 'vbCrLf', - 'vbCurrency', - 'vbCyan', - 'vbDataObject', - 'vbDate', - 'vbDefaultButton1', - 'vbDefaultButton2', - 'vbDefaultButton3', - 'vbDefaultButton4', - 'vbDouble', - 'vbEmpty', - 'vbError', - 'vbExclamation', - 'vbFalse', - 'vbFirstFullWeek', - 'vbFirstJan1', - 'vbFormFeed', - 'vbFriday', - 'vbGeneralDate', - 'vbGreen', - 'vbIgnore', - 'vbInformation', - 'vbInteger', - 'vbLf', - 'vbLong', - 'vbLongDate', - 'vbLongTime', - 'vbMagenta', - 'vbMonday', - 'vbMsgBoxHelpButton', - 'vbMsgBoxRight', - 'vbMsgBoxRtlReading', - 'vbMsgBoxSetForeground', - 'vbNewLine', - 'vbNo', - 'vbNull', - 'vbNullChar', - 'vbNullString', - 'vbObject', - 'vbObjectError', - 'vbOK', - 'vbOKCancel', - 'vbOKOnly', - 'vbQuestion', - 'vbRed', - 'vbRetry', - 'vbRetryCancel', - 'vbSaturday', - 'vbShortDate', - 'vbShortTime', - 'vbSingle', - 'vbString', - 'vbSunday', - 'vbSystemModal', - 'vbTab', - 'vbTextCompare', - 'vbThursday', - 'vbTrue', - 'vbTuesday', - 'vbUseDefault', - 'vbUseSystem', - 'vbUseSystem', - 'vbVariant', - 'vbVerticalTab', - 'vbWednesday', - 'vbWhite', - 'vbYellow', - 'vbYes', - 'vbYesNo', - 'vbYesNoCancel', -] + :license: BSD, see LICENSE for details. +""" + +KEYWORDS = [ + 'ByRef', + 'ByVal', + # dim: special rule + 'call', + 'case', + 'class', + # const: special rule + 'do', + 'each', + 'else', + 'elseif', + 'end', + 'erase', + 'execute', + 'function', + 'exit', + 'for', + 'function', + 'GetRef', + 'global', + 'if', + 'let', + 'loop', + 'next', + 'new', + # option: special rule + 'private', + 'public', + 'redim', + 'select', + 'set', + 'sub', + 'then', + 'wend', + 'while', + 'with', +] + +BUILTIN_FUNCTIONS = [ + 'Abs', + 'Array', + 'Asc', + 'Atn', + 'CBool', + 'CByte', + 'CCur', + 'CDate', + 'CDbl', + 'Chr', + 'CInt', + 'CLng', + 'Cos', + 'CreateObject', + 'CSng', + 'CStr', + 'Date', + 'DateAdd', + 'DateDiff', + 'DatePart', + 'DateSerial', + 'DateValue', + 'Day', + 'Eval', + 'Exp', + 'Filter', + 'Fix', + 'FormatCurrency', + 'FormatDateTime', + 'FormatNumber', + 'FormatPercent', + 'GetObject', + 'GetLocale', + 'Hex', + 'Hour', + 'InStr', + 'inStrRev', + 'Int', + 'IsArray', + 'IsDate', + 'IsEmpty', + 'IsNull', + 'IsNumeric', + 'IsObject', + 'Join', + 'LBound', + 'LCase', + 'Left', + 'Len', + 'LoadPicture', + 'Log', + 'LTrim', + 'Mid', + 'Minute', + 'Month', + 'MonthName', + 'MsgBox', + 'Now', + 'Oct', + 'Randomize', + 'RegExp', + 'Replace', + 'RGB', + 'Right', + 'Rnd', + 'Round', + 'RTrim', + 'ScriptEngine', + 'ScriptEngineBuildVersion', + 'ScriptEngineMajorVersion', + 'ScriptEngineMinorVersion', + 'Second', + 'SetLocale', + 'Sgn', + 'Space', + 'Split', + 'Sqr', + 'StrComp', + 'String', + 'StrReverse', + 'Tan', + 'Time', + 'Timer', + 'TimeSerial', + 'TimeValue', + 'Trim', + 'TypeName', + 'UBound', + 'UCase', + 'VarType', + 'Weekday', + 'WeekdayName', + 'Year', +] + +BUILTIN_VARIABLES = [ + 'Debug', + 'Dictionary', + 'Drive', + 'Drives', + 'Err', + 'File', + 'Files', + 'FileSystemObject', + 'Folder', + 'Folders', + 'Match', + 'Matches', + 'RegExp', + 'Submatches', + 'TextStream', +] + +OPERATORS = [ + '+', + '-', + '*', + '/', + '\\', + '^', + '|', + '<', + '<=', + '>', + '>=', + '=', + '<>', + '&', + '$', +] + +OPERATOR_WORDS = [ + 'mod', + 'and', + 'or', + 'xor', + 'eqv', + 'imp', + 'is', + 'not', +] + +BUILTIN_CONSTANTS = [ + 'False', + 'True', + 'vbAbort', + 'vbAbortRetryIgnore', + 'vbApplicationModal', + 'vbArray', + 'vbBinaryCompare', + 'vbBlack', + 'vbBlue', + 'vbBoole', + 'vbByte', + 'vbCancel', + 'vbCr', + 'vbCritical', + 'vbCrLf', + 'vbCurrency', + 'vbCyan', + 'vbDataObject', + 'vbDate', + 'vbDefaultButton1', + 'vbDefaultButton2', + 'vbDefaultButton3', + 'vbDefaultButton4', + 'vbDouble', + 'vbEmpty', + 'vbError', + 'vbExclamation', + 'vbFalse', + 'vbFirstFullWeek', + 'vbFirstJan1', + 'vbFormFeed', + 'vbFriday', + 'vbGeneralDate', + 'vbGreen', + 'vbIgnore', + 'vbInformation', + 'vbInteger', + 'vbLf', + 'vbLong', + 'vbLongDate', + 'vbLongTime', + 'vbMagenta', + 'vbMonday', + 'vbMsgBoxHelpButton', + 'vbMsgBoxRight', + 'vbMsgBoxRtlReading', + 'vbMsgBoxSetForeground', + 'vbNewLine', + 'vbNo', + 'vbNull', + 'vbNullChar', + 'vbNullString', + 'vbObject', + 'vbObjectError', + 'vbOK', + 'vbOKCancel', + 'vbOKOnly', + 'vbQuestion', + 'vbRed', + 'vbRetry', + 'vbRetryCancel', + 'vbSaturday', + 'vbShortDate', + 'vbShortTime', + 'vbSingle', + 'vbString', + 'vbSunday', + 'vbSystemModal', + 'vbTab', + 'vbTextCompare', + 'vbThursday', + 'vbTrue', + 'vbTuesday', + 'vbUseDefault', + 'vbUseSystem', + 'vbUseSystem', + 'vbVariant', + 'vbVerticalTab', + 'vbWednesday', + 'vbWhite', + 'vbYellow', + 'vbYes', + 'vbYesNo', + 'vbYesNoCancel', +] diff --git a/contrib/python/Pygments/py3/pygments/lexers/actionscript.py b/contrib/python/Pygments/py3/pygments/lexers/actionscript.py index ddea139566..28625586bd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/actionscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/actionscript.py @@ -129,7 +129,7 @@ class ActionScript3Lexer(RegexLexer): 'text/actionscript3'] identifier = r'[$a-zA-Z_]\w*' - typeidentifier = identifier + r'(?:\.<\w+>)?' + typeidentifier = identifier + r'(?:\.<\w+>)?' flags = re.DOTALL | re.MULTILINE tokens = { diff --git a/contrib/python/Pygments/py3/pygments/lexers/algebra.py b/contrib/python/Pygments/py3/pygments/lexers/algebra.py index 37d9ac9faa..3e5c47b8dd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/algebra.py +++ b/contrib/python/Pygments/py3/pygments/lexers/algebra.py @@ -122,9 +122,9 @@ class MathematicaLexer(RegexLexer): (r'#\d*', Name.Variable), (r'([a-zA-Z]+[a-zA-Z0-9]*)', Name), - (r'-?\d+\.\d*', Number.Float), - (r'-?\d*\.\d+', Number.Float), - (r'-?\d+', Number.Integer), + (r'-?\d+\.\d*', Number.Float), + (r'-?\d*\.\d+', Number.Float), + (r'-?\d+', Number.Integer), (words(operators), Operator), (words(punctuation), Punctuation), diff --git a/contrib/python/Pygments/py3/pygments/lexers/ampl.py b/contrib/python/Pygments/py3/pygments/lexers/ampl.py index 79c416a9bb..1d6e329020 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ampl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ampl.py @@ -1,86 +1,86 @@ -""" - pygments.lexers.ampl - ~~~~~~~~~~~~~~~~~~~~ - - Lexers for the AMPL language. - +""" + pygments.lexers.ampl + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for the AMPL language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, bygroups, using, this, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, using, this, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Whitespace - -__all__ = ['AmplLexer'] - - -class AmplLexer(RegexLexer): - """ - For `AMPL <http://ampl.com/>`_ source code. - - .. versionadded:: 2.2 - """ - name = 'Ampl' - aliases = ['ampl'] - filenames = ['*.run'] - - tokens = { - 'root': [ - (r'\n', Text), + +__all__ = ['AmplLexer'] + + +class AmplLexer(RegexLexer): + """ + For `AMPL <http://ampl.com/>`_ source code. + + .. versionadded:: 2.2 + """ + name = 'Ampl' + aliases = ['ampl'] + filenames = ['*.run'] + + tokens = { + 'root': [ + (r'\n', Text), (r'\s+', Whitespace), - (r'#.*?\n', Comment.Single), - (r'/[*](.|\n)*?[*]/', Comment.Multiline), - (words(( - 'call', 'cd', 'close', 'commands', 'data', 'delete', 'display', - 'drop', 'end', 'environ', 'exit', 'expand', 'include', 'load', - 'model', 'objective', 'option', 'problem', 'purge', 'quit', - 'redeclare', 'reload', 'remove', 'reset', 'restore', 'shell', - 'show', 'solexpand', 'solution', 'solve', 'update', 'unload', - 'xref', 'coeff', 'coef', 'cover', 'obj', 'interval', 'default', - 'from', 'to', 'to_come', 'net_in', 'net_out', 'dimen', - 'dimension', 'check', 'complements', 'write', 'function', - 'pipe', 'format', 'if', 'then', 'else', 'in', 'while', 'repeat', - 'for'), suffix=r'\b'), Keyword.Reserved), - (r'(integer|binary|symbolic|ordered|circular|reversed|INOUT|IN|OUT|LOCAL)', - Keyword.Type), - (r'\".*?\"', String.Double), - (r'\'.*?\'', String.Single), - (r'[()\[\]{},;:]+', Punctuation), - (r'\b(\w+)(\.)(astatus|init0|init|lb0|lb1|lb2|lb|lrc|' - r'lslack|rc|relax|slack|sstatus|status|ub0|ub1|ub2|' - r'ub|urc|uslack|val)', - bygroups(Name.Variable, Punctuation, Keyword.Reserved)), - (r'(set|param|var|arc|minimize|maximize|subject to|s\.t\.|subj to|' - r'node|table|suffix|read table|write table)(\s+)(\w+)', + (r'#.*?\n', Comment.Single), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + (words(( + 'call', 'cd', 'close', 'commands', 'data', 'delete', 'display', + 'drop', 'end', 'environ', 'exit', 'expand', 'include', 'load', + 'model', 'objective', 'option', 'problem', 'purge', 'quit', + 'redeclare', 'reload', 'remove', 'reset', 'restore', 'shell', + 'show', 'solexpand', 'solution', 'solve', 'update', 'unload', + 'xref', 'coeff', 'coef', 'cover', 'obj', 'interval', 'default', + 'from', 'to', 'to_come', 'net_in', 'net_out', 'dimen', + 'dimension', 'check', 'complements', 'write', 'function', + 'pipe', 'format', 'if', 'then', 'else', 'in', 'while', 'repeat', + 'for'), suffix=r'\b'), Keyword.Reserved), + (r'(integer|binary|symbolic|ordered|circular|reversed|INOUT|IN|OUT|LOCAL)', + Keyword.Type), + (r'\".*?\"', String.Double), + (r'\'.*?\'', String.Single), + (r'[()\[\]{},;:]+', Punctuation), + (r'\b(\w+)(\.)(astatus|init0|init|lb0|lb1|lb2|lb|lrc|' + r'lslack|rc|relax|slack|sstatus|status|ub0|ub1|ub2|' + r'ub|urc|uslack|val)', + bygroups(Name.Variable, Punctuation, Keyword.Reserved)), + (r'(set|param|var|arc|minimize|maximize|subject to|s\.t\.|subj to|' + r'node|table|suffix|read table|write table)(\s+)(\w+)', bygroups(Keyword.Declaration, Whitespace, Name.Variable)), - (r'(param)(\s*)(:)(\s*)(\w+)(\s*)(:)(\s*)((\w|\s)+)', + (r'(param)(\s*)(:)(\s*)(\w+)(\s*)(:)(\s*)((\w|\s)+)', bygroups(Keyword.Declaration, Whitespace, Punctuation, Whitespace, Name.Variable, Whitespace, Punctuation, Whitespace, Name.Variable)), - (r'(let|fix|unfix)(\s*)((?:\{.*\})?)(\s*)(\w+)', + (r'(let|fix|unfix)(\s*)((?:\{.*\})?)(\s*)(\w+)', bygroups(Keyword.Declaration, Whitespace, using(this), Whitespace, Name.Variable)), - (words(( - 'abs', 'acos', 'acosh', 'alias', 'asin', 'asinh', 'atan', 'atan2', - 'atanh', 'ceil', 'ctime', 'cos', 'exp', 'floor', 'log', 'log10', - 'max', 'min', 'precision', 'round', 'sin', 'sinh', 'sqrt', 'tan', - 'tanh', 'time', 'trunc', 'Beta', 'Cauchy', 'Exponential', 'Gamma', - 'Irand224', 'Normal', 'Normal01', 'Poisson', 'Uniform', 'Uniform01', - 'num', 'num0', 'ichar', 'char', 'length', 'substr', 'sprintf', - 'match', 'sub', 'gsub', 'print', 'printf', 'next', 'nextw', 'prev', - 'prevw', 'first', 'last', 'ord', 'ord0', 'card', 'arity', - 'indexarity'), prefix=r'\b', suffix=r'\b'), Name.Builtin), - (r'(\+|\-|\*|/|\*\*|=|<=|>=|==|\||\^|<|>|\!|\.\.|:=|\&|\!=|<<|>>)', - Operator), - (words(( - 'or', 'exists', 'forall', 'and', 'in', 'not', 'within', 'union', - 'diff', 'difference', 'symdiff', 'inter', 'intersect', - 'intersection', 'cross', 'setof', 'by', 'less', 'sum', 'prod', - 'product', 'div', 'mod'), suffix=r'\b'), - Keyword.Reserved), # Operator.Name but not enough emphasized with that - (r'(\d+\.(?!\.)\d*|\.(?!.)\d+)([eE][+-]?\d+)?', Number.Float), - (r'\d+([eE][+-]?\d+)?', Number.Integer), - (r'[+-]?Infinity', Number.Integer), - (r'(\w+|(\.(?!\.)))', Text) - ] - - } + (words(( + 'abs', 'acos', 'acosh', 'alias', 'asin', 'asinh', 'atan', 'atan2', + 'atanh', 'ceil', 'ctime', 'cos', 'exp', 'floor', 'log', 'log10', + 'max', 'min', 'precision', 'round', 'sin', 'sinh', 'sqrt', 'tan', + 'tanh', 'time', 'trunc', 'Beta', 'Cauchy', 'Exponential', 'Gamma', + 'Irand224', 'Normal', 'Normal01', 'Poisson', 'Uniform', 'Uniform01', + 'num', 'num0', 'ichar', 'char', 'length', 'substr', 'sprintf', + 'match', 'sub', 'gsub', 'print', 'printf', 'next', 'nextw', 'prev', + 'prevw', 'first', 'last', 'ord', 'ord0', 'card', 'arity', + 'indexarity'), prefix=r'\b', suffix=r'\b'), Name.Builtin), + (r'(\+|\-|\*|/|\*\*|=|<=|>=|==|\||\^|<|>|\!|\.\.|:=|\&|\!=|<<|>>)', + Operator), + (words(( + 'or', 'exists', 'forall', 'and', 'in', 'not', 'within', 'union', + 'diff', 'difference', 'symdiff', 'inter', 'intersect', + 'intersection', 'cross', 'setof', 'by', 'less', 'sum', 'prod', + 'product', 'div', 'mod'), suffix=r'\b'), + Keyword.Reserved), # Operator.Name but not enough emphasized with that + (r'(\d+\.(?!\.)\d*|\.(?!.)\d+)([eE][+-]?\d+)?', Number.Float), + (r'\d+([eE][+-]?\d+)?', Number.Integer), + (r'[+-]?Infinity', Number.Integer), + (r'(\w+|(\.(?!\.)))', Text) + ] + + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/asm.py b/contrib/python/Pygments/py3/pygments/lexers/asm.py index 035f091f02..e5f795f4f3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/asm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/asm.py @@ -10,7 +10,7 @@ import re -from pygments.lexer import RegexLexer, include, bygroups, using, words, \ +from pygments.lexer import RegexLexer, include, bygroups, using, words, \ DelegatingLexer, default from pygments.lexers.c_cpp import CppLexer, CLexer from pygments.lexers.d import DLexer @@ -35,7 +35,7 @@ class GasLexer(RegexLexer): #: optional Comment or Whitespace string = r'"(\\"|[^"])*"' char = r'[\w$.@-]' - identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)' + identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)' number = r'(?:0[xX][a-fA-F0-9]+|#?-?\d+)' register = '%' + identifier + r'\b' @@ -84,7 +84,7 @@ class GasLexer(RegexLexer): (r'([;#]|//).*?\n', Comment.Single, '#pop'), (r'/[*].*?[*]/', Comment.Multiline), (r'/[*].*?\n[\w\W]*?[*]/', Comment.Multiline, '#pop'), - + include('punctuation'), include('whitespace') ], @@ -210,141 +210,141 @@ class CObjdumpLexer(DelegatingLexer): super().__init__(CLexer, ObjdumpLexer, **options) -class HsailLexer(RegexLexer): - """ - For HSAIL assembly code. - - .. versionadded:: 2.2 - """ - name = 'HSAIL' - aliases = ['hsail', 'hsa'] - filenames = ['*.hsail'] - mimetypes = ['text/x-hsail'] - - string = r'"[^"]*?"' - identifier = r'[a-zA-Z_][\w.]*' - # Registers - register_number = r'[0-9]+' +class HsailLexer(RegexLexer): + """ + For HSAIL assembly code. + + .. versionadded:: 2.2 + """ + name = 'HSAIL' + aliases = ['hsail', 'hsa'] + filenames = ['*.hsail'] + mimetypes = ['text/x-hsail'] + + string = r'"[^"]*?"' + identifier = r'[a-zA-Z_][\w.]*' + # Registers + register_number = r'[0-9]+' register = r'(\$(c|s|d|q)' + register_number + r')\b' - # Qualifiers - alignQual = r'(align\(\d+\))' - widthQual = r'(width\((\d+|all)\))' - allocQual = r'(alloc\(agent\))' - # Instruction Modifiers - roundingMod = (r'((_ftz)?(_up|_down|_zero|_near))') - datatypeMod = (r'_(' - # packedTypes - r'u8x4|s8x4|u16x2|s16x2|u8x8|s8x8|u16x4|s16x4|u32x2|s32x2|' - r'u8x16|s8x16|u16x8|s16x8|u32x4|s32x4|u64x2|s64x2|' - r'f16x2|f16x4|f16x8|f32x2|f32x4|f64x2|' - # baseTypes - r'u8|s8|u16|s16|u32|s32|u64|s64|' - r'b128|b8|b16|b32|b64|b1|' - r'f16|f32|f64|' - # opaqueType - r'roimg|woimg|rwimg|samp|sig32|sig64)') - - # Numeric Constant - float = r'((\d+\.)|(\d*\.\d+))[eE][+-]?\d+' - hexfloat = r'0[xX](([0-9a-fA-F]+\.[0-9a-fA-F]*)|([0-9a-fA-F]*\.[0-9a-fA-F]+))[pP][+-]?\d+' - ieeefloat = r'0((h|H)[0-9a-fA-F]{4}|(f|F)[0-9a-fA-F]{8}|(d|D)[0-9a-fA-F]{16})' - - tokens = { - 'root': [ - include('whitespace'), - include('comments'), - - (string, String), - - (r'@' + identifier + ':?', Name.Label), - - (register, Name.Variable.Anonymous), - - include('keyword'), - - (r'&' + identifier, Name.Variable.Global), - (r'%' + identifier, Name.Variable), - - (hexfloat, Number.Hex), - (r'0[xX][a-fA-F0-9]+', Number.Hex), - (ieeefloat, Number.Float), - (float, Number.Float), - (r'\d+', Number.Integer), - - (r'[=<>{}\[\]()*.,:;!]|x\b', Punctuation) - ], - 'whitespace': [ + # Qualifiers + alignQual = r'(align\(\d+\))' + widthQual = r'(width\((\d+|all)\))' + allocQual = r'(alloc\(agent\))' + # Instruction Modifiers + roundingMod = (r'((_ftz)?(_up|_down|_zero|_near))') + datatypeMod = (r'_(' + # packedTypes + r'u8x4|s8x4|u16x2|s16x2|u8x8|s8x8|u16x4|s16x4|u32x2|s32x2|' + r'u8x16|s8x16|u16x8|s16x8|u32x4|s32x4|u64x2|s64x2|' + r'f16x2|f16x4|f16x8|f32x2|f32x4|f64x2|' + # baseTypes + r'u8|s8|u16|s16|u32|s32|u64|s64|' + r'b128|b8|b16|b32|b64|b1|' + r'f16|f32|f64|' + # opaqueType + r'roimg|woimg|rwimg|samp|sig32|sig64)') + + # Numeric Constant + float = r'((\d+\.)|(\d*\.\d+))[eE][+-]?\d+' + hexfloat = r'0[xX](([0-9a-fA-F]+\.[0-9a-fA-F]*)|([0-9a-fA-F]*\.[0-9a-fA-F]+))[pP][+-]?\d+' + ieeefloat = r'0((h|H)[0-9a-fA-F]{4}|(f|F)[0-9a-fA-F]{8}|(d|D)[0-9a-fA-F]{16})' + + tokens = { + 'root': [ + include('whitespace'), + include('comments'), + + (string, String), + + (r'@' + identifier + ':?', Name.Label), + + (register, Name.Variable.Anonymous), + + include('keyword'), + + (r'&' + identifier, Name.Variable.Global), + (r'%' + identifier, Name.Variable), + + (hexfloat, Number.Hex), + (r'0[xX][a-fA-F0-9]+', Number.Hex), + (ieeefloat, Number.Float), + (float, Number.Float), + (r'\d+', Number.Integer), + + (r'[=<>{}\[\]()*.,:;!]|x\b', Punctuation) + ], + 'whitespace': [ (r'(\n|\s)+', Whitespace), - ], - 'comments': [ - (r'/\*.*?\*/', Comment.Multiline), - (r'//.*?\n', Comment.Single), - ], - 'keyword': [ - # Types - (r'kernarg' + datatypeMod, Keyword.Type), - - # Regular keywords - (r'\$(full|base|small|large|default|zero|near)', Keyword), - (words(( - 'module', 'extension', 'pragma', 'prog', 'indirect', 'signature', - 'decl', 'kernel', 'function', 'enablebreakexceptions', - 'enabledetectexceptions', 'maxdynamicgroupsize', 'maxflatgridsize', - 'maxflatworkgroupsize', 'requireddim', 'requiredgridsize', - 'requiredworkgroupsize', 'requirenopartialworkgroups'), - suffix=r'\b'), Keyword), - - # instructions - (roundingMod, Keyword), - (datatypeMod, Keyword), - (r'_(' + alignQual + '|' + widthQual + ')', Keyword), - (r'_kernarg', Keyword), - (r'(nop|imagefence)\b', Keyword), - (words(( - 'cleardetectexcept', 'clock', 'cuid', 'debugtrap', 'dim', - 'getdetectexcept', 'groupbaseptr', 'kernargbaseptr', 'laneid', - 'maxcuid', 'maxwaveid', 'packetid', 'setdetectexcept', 'waveid', - 'workitemflatabsid', 'workitemflatid', 'nullptr', 'abs', 'bitrev', - 'currentworkgroupsize', 'currentworkitemflatid', 'fract', 'ncos', - 'neg', 'nexp2', 'nlog2', 'nrcp', 'nrsqrt', 'nsin', 'nsqrt', - 'gridgroups', 'gridsize', 'not', 'sqrt', 'workgroupid', - 'workgroupsize', 'workitemabsid', 'workitemid', 'ceil', 'floor', - 'rint', 'trunc', 'add', 'bitmask', 'borrow', 'carry', 'copysign', - 'div', 'rem', 'sub', 'shl', 'shr', 'and', 'or', 'xor', 'unpackhi', - 'unpacklo', 'max', 'min', 'fma', 'mad', 'bitextract', 'bitselect', - 'shuffle', 'cmov', 'bitalign', 'bytealign', 'lerp', 'nfma', 'mul', - 'mulhi', 'mul24hi', 'mul24', 'mad24', 'mad24hi', 'bitinsert', - 'combine', 'expand', 'lda', 'mov', 'pack', 'unpack', 'packcvt', - 'unpackcvt', 'sad', 'sementp', 'ftos', 'stof', 'cmp', 'ld', 'st', - '_eq', '_ne', '_lt', '_le', '_gt', '_ge', '_equ', '_neu', '_ltu', - '_leu', '_gtu', '_geu', '_num', '_nan', '_seq', '_sne', '_slt', - '_sle', '_sgt', '_sge', '_snum', '_snan', '_sequ', '_sneu', '_sltu', - '_sleu', '_sgtu', '_sgeu', 'atomic', '_ld', '_st', '_cas', '_add', - '_and', '_exch', '_max', '_min', '_or', '_sub', '_wrapdec', - '_wrapinc', '_xor', 'ret', 'cvt', '_readonly', '_kernarg', '_global', - 'br', 'cbr', 'sbr', '_scacq', '_screl', '_scar', '_rlx', '_wave', - '_wg', '_agent', '_system', 'ldimage', 'stimage', '_v2', '_v3', '_v4', - '_1d', '_2d', '_3d', '_1da', '_2da', '_1db', '_2ddepth', '_2dadepth', - '_width', '_height', '_depth', '_array', '_channelorder', - '_channeltype', 'querysampler', '_coord', '_filter', '_addressing', - 'barrier', 'wavebarrier', 'initfbar', 'joinfbar', 'waitfbar', - 'arrivefbar', 'leavefbar', 'releasefbar', 'ldf', 'activelaneid', - 'activelanecount', 'activelanemask', 'activelanepermute', 'call', - 'scall', 'icall', 'alloca', 'packetcompletionsig', - 'addqueuewriteindex', 'casqueuewriteindex', 'ldqueuereadindex', - 'stqueuereadindex', 'readonly', 'global', 'private', 'group', - 'spill', 'arg', '_upi', '_downi', '_zeroi', '_neari', '_upi_sat', - '_downi_sat', '_zeroi_sat', '_neari_sat', '_supi', '_sdowni', - '_szeroi', '_sneari', '_supi_sat', '_sdowni_sat', '_szeroi_sat', - '_sneari_sat', '_pp', '_ps', '_sp', '_ss', '_s', '_p', '_pp_sat', - '_ps_sat', '_sp_sat', '_ss_sat', '_s_sat', '_p_sat')), Keyword), - - # Integer types - (r'i[1-9]\d*', Keyword) - ] - } - - + ], + 'comments': [ + (r'/\*.*?\*/', Comment.Multiline), + (r'//.*?\n', Comment.Single), + ], + 'keyword': [ + # Types + (r'kernarg' + datatypeMod, Keyword.Type), + + # Regular keywords + (r'\$(full|base|small|large|default|zero|near)', Keyword), + (words(( + 'module', 'extension', 'pragma', 'prog', 'indirect', 'signature', + 'decl', 'kernel', 'function', 'enablebreakexceptions', + 'enabledetectexceptions', 'maxdynamicgroupsize', 'maxflatgridsize', + 'maxflatworkgroupsize', 'requireddim', 'requiredgridsize', + 'requiredworkgroupsize', 'requirenopartialworkgroups'), + suffix=r'\b'), Keyword), + + # instructions + (roundingMod, Keyword), + (datatypeMod, Keyword), + (r'_(' + alignQual + '|' + widthQual + ')', Keyword), + (r'_kernarg', Keyword), + (r'(nop|imagefence)\b', Keyword), + (words(( + 'cleardetectexcept', 'clock', 'cuid', 'debugtrap', 'dim', + 'getdetectexcept', 'groupbaseptr', 'kernargbaseptr', 'laneid', + 'maxcuid', 'maxwaveid', 'packetid', 'setdetectexcept', 'waveid', + 'workitemflatabsid', 'workitemflatid', 'nullptr', 'abs', 'bitrev', + 'currentworkgroupsize', 'currentworkitemflatid', 'fract', 'ncos', + 'neg', 'nexp2', 'nlog2', 'nrcp', 'nrsqrt', 'nsin', 'nsqrt', + 'gridgroups', 'gridsize', 'not', 'sqrt', 'workgroupid', + 'workgroupsize', 'workitemabsid', 'workitemid', 'ceil', 'floor', + 'rint', 'trunc', 'add', 'bitmask', 'borrow', 'carry', 'copysign', + 'div', 'rem', 'sub', 'shl', 'shr', 'and', 'or', 'xor', 'unpackhi', + 'unpacklo', 'max', 'min', 'fma', 'mad', 'bitextract', 'bitselect', + 'shuffle', 'cmov', 'bitalign', 'bytealign', 'lerp', 'nfma', 'mul', + 'mulhi', 'mul24hi', 'mul24', 'mad24', 'mad24hi', 'bitinsert', + 'combine', 'expand', 'lda', 'mov', 'pack', 'unpack', 'packcvt', + 'unpackcvt', 'sad', 'sementp', 'ftos', 'stof', 'cmp', 'ld', 'st', + '_eq', '_ne', '_lt', '_le', '_gt', '_ge', '_equ', '_neu', '_ltu', + '_leu', '_gtu', '_geu', '_num', '_nan', '_seq', '_sne', '_slt', + '_sle', '_sgt', '_sge', '_snum', '_snan', '_sequ', '_sneu', '_sltu', + '_sleu', '_sgtu', '_sgeu', 'atomic', '_ld', '_st', '_cas', '_add', + '_and', '_exch', '_max', '_min', '_or', '_sub', '_wrapdec', + '_wrapinc', '_xor', 'ret', 'cvt', '_readonly', '_kernarg', '_global', + 'br', 'cbr', 'sbr', '_scacq', '_screl', '_scar', '_rlx', '_wave', + '_wg', '_agent', '_system', 'ldimage', 'stimage', '_v2', '_v3', '_v4', + '_1d', '_2d', '_3d', '_1da', '_2da', '_1db', '_2ddepth', '_2dadepth', + '_width', '_height', '_depth', '_array', '_channelorder', + '_channeltype', 'querysampler', '_coord', '_filter', '_addressing', + 'barrier', 'wavebarrier', 'initfbar', 'joinfbar', 'waitfbar', + 'arrivefbar', 'leavefbar', 'releasefbar', 'ldf', 'activelaneid', + 'activelanecount', 'activelanemask', 'activelanepermute', 'call', + 'scall', 'icall', 'alloca', 'packetcompletionsig', + 'addqueuewriteindex', 'casqueuewriteindex', 'ldqueuereadindex', + 'stqueuereadindex', 'readonly', 'global', 'private', 'group', + 'spill', 'arg', '_upi', '_downi', '_zeroi', '_neari', '_upi_sat', + '_downi_sat', '_zeroi_sat', '_neari_sat', '_supi', '_sdowni', + '_szeroi', '_sneari', '_supi_sat', '_sdowni_sat', '_szeroi_sat', + '_sneari_sat', '_pp', '_ps', '_sp', '_ss', '_s', '_p', '_pp_sat', + '_ps_sat', '_sp_sat', '_ss_sat', '_s_sat', '_p_sat')), Keyword), + + # Integer types + (r'i[1-9]\d*', Keyword) + ] + } + + class LlvmLexer(RegexLexer): """ For LLVM assembly code. @@ -388,7 +388,7 @@ class LlvmLexer(RegexLexer): ], 'keyword': [ # Regular keywords - (words(( + (words(( 'aarch64_sve_vector_pcs', 'aarch64_vector_pcs', 'acq_rel', 'acquire', 'add', 'addrspace', 'addrspacecast', 'afn', 'alias', 'aliasee', 'align', 'alignLog2', 'alignstack', 'alloca', @@ -472,7 +472,7 @@ class LlvmLexer(RegexLexer): 'x86_mmx', 'x86_regcallcc', 'x86_stdcallcc', 'x86_thiscallcc', 'x86_vectorcallcc', 'xchg', 'xor', 'zeroext', 'zeroinitializer', 'zext', 'immarg', 'willreturn'), - suffix=r'\b'), Keyword), + suffix=r'\b'), Keyword), # Types (words(('void', 'half', 'bfloat', 'float', 'double', 'fp128', @@ -734,9 +734,9 @@ class NasmLexer(RegexLexer): r'mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7])\b') wordop = r'seg|wrt|strict' type = r'byte|[dq]?word' - # Directives must be followed by whitespace, otherwise CPU will match - # cpuid for instance. - directives = (r'(?:BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|' + # Directives must be followed by whitespace, otherwise CPU will match + # cpuid for instance. + directives = (r'(?:BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|' r'ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|' r'EXPORT|LIBRARY|MODULE)(?=\s)') @@ -807,90 +807,90 @@ class NasmObjdumpLexer(ObjdumpLexer): tokens = _objdump_lexer_tokens(NasmLexer) -class TasmLexer(RegexLexer): - """ - For Tasm (Turbo Assembler) assembly code. - """ - name = 'TASM' - aliases = ['tasm'] - filenames = ['*.asm', '*.ASM', '*.tasm'] - mimetypes = ['text/x-tasm'] - - identifier = r'[@a-z$._?][\w$.?#@~]*' - hexn = r'(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)' - octn = r'[0-7]+q' - binn = r'[01]+b' - decn = r'[0-9]+' - floatn = decn + r'\.e?' + decn - string = r'"(\\"|[^"\n])*"|' + r"'(\\'|[^'\n])*'|" + r"`(\\`|[^`\n])*`" - declkw = r'(?:res|d)[bwdqt]|times' +class TasmLexer(RegexLexer): + """ + For Tasm (Turbo Assembler) assembly code. + """ + name = 'TASM' + aliases = ['tasm'] + filenames = ['*.asm', '*.ASM', '*.tasm'] + mimetypes = ['text/x-tasm'] + + identifier = r'[@a-z$._?][\w$.?#@~]*' + hexn = r'(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)' + octn = r'[0-7]+q' + binn = r'[01]+b' + decn = r'[0-9]+' + floatn = decn + r'\.e?' + decn + string = r'"(\\"|[^"\n])*"|' + r"'(\\'|[^'\n])*'|" + r"`(\\`|[^`\n])*`" + declkw = r'(?:res|d)[bwdqt]|times' register = (r'(r[0-9][0-5]?[bwd]|' - r'[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|' + r'[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|' r'mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7])\b') - wordop = r'seg|wrt|strict' - type = r'byte|[dq]?word' - directives = (r'BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|' - r'ORG|ALIGN|STRUC|ENDSTRUC|ENDS|COMMON|CPU|GROUP|UPPERCASE|INCLUDE|' - r'EXPORT|LIBRARY|MODULE|PROC|ENDP|USES|ARG|DATASEG|UDATASEG|END|IDEAL|' - r'P386|MODEL|ASSUME|CODESEG|SIZE') - # T[A-Z][a-z] is more of a convention. Lexer should filter out STRUC definitions - # and then 'add' them to datatype somehow. - datatype = (r'db|dd|dw|T[A-Z][a-z]+') - - flags = re.IGNORECASE | re.MULTILINE - tokens = { - 'root': [ - (r'^\s*%', Comment.Preproc, 'preproc'), - include('whitespace'), - (identifier + ':', Name.Label), - (directives, Keyword, 'instruction-args'), - (r'(%s)(\s+)(%s)' % (identifier, datatype), + wordop = r'seg|wrt|strict' + type = r'byte|[dq]?word' + directives = (r'BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|' + r'ORG|ALIGN|STRUC|ENDSTRUC|ENDS|COMMON|CPU|GROUP|UPPERCASE|INCLUDE|' + r'EXPORT|LIBRARY|MODULE|PROC|ENDP|USES|ARG|DATASEG|UDATASEG|END|IDEAL|' + r'P386|MODEL|ASSUME|CODESEG|SIZE') + # T[A-Z][a-z] is more of a convention. Lexer should filter out STRUC definitions + # and then 'add' them to datatype somehow. + datatype = (r'db|dd|dw|T[A-Z][a-z]+') + + flags = re.IGNORECASE | re.MULTILINE + tokens = { + 'root': [ + (r'^\s*%', Comment.Preproc, 'preproc'), + include('whitespace'), + (identifier + ':', Name.Label), + (directives, Keyword, 'instruction-args'), + (r'(%s)(\s+)(%s)' % (identifier, datatype), bygroups(Name.Constant, Whitespace, Keyword.Declaration), - 'instruction-args'), - (declkw, Keyword.Declaration, 'instruction-args'), - (identifier, Name.Function, 'instruction-args'), + 'instruction-args'), + (declkw, Keyword.Declaration, 'instruction-args'), + (identifier, Name.Function, 'instruction-args'), (r'[\r\n]+', Whitespace) - ], - 'instruction-args': [ - (string, String), - (hexn, Number.Hex), - (octn, Number.Oct), - (binn, Number.Bin), - (floatn, Number.Float), - (decn, Number.Integer), - include('punctuation'), - (register, Name.Builtin), - (identifier, Name.Variable), - # Do not match newline when it's preceeded by a backslash + ], + 'instruction-args': [ + (string, String), + (hexn, Number.Hex), + (octn, Number.Oct), + (binn, Number.Bin), + (floatn, Number.Float), + (decn, Number.Integer), + include('punctuation'), + (register, Name.Builtin), + (identifier, Name.Variable), + # Do not match newline when it's preceeded by a backslash (r'(\\)(\s*)(;.*)([\r\n])', bygroups(Text, Whitespace, Comment.Single, Whitespace)), (r'[\r\n]+', Whitespace, '#pop'), - include('whitespace') - ], - 'preproc': [ - (r'[^;\n]+', Comment.Preproc), - (r';.*?\n', Comment.Single, '#pop'), - (r'\n', Comment.Preproc, '#pop'), - ], - 'whitespace': [ + include('whitespace') + ], + 'preproc': [ + (r'[^;\n]+', Comment.Preproc), + (r';.*?\n', Comment.Single, '#pop'), + (r'\n', Comment.Preproc, '#pop'), + ], + 'whitespace': [ (r'[\n\r]', Whitespace), (r'(\\)([\n\r])', bygroups(Text, Whitespace)), (r'[ \t]+', Whitespace), - (r';.*', Comment.Single) - ], - 'punctuation': [ - (r'[,():\[\]]+', Punctuation), - (r'[&|^<>+*=/%~-]+', Operator), - (r'[$]+', Keyword.Constant), - (wordop, Operator.Word), - (type, Keyword.Type) - ], - } - + (r';.*', Comment.Single) + ], + 'punctuation': [ + (r'[,():\[\]]+', Punctuation), + (r'[&|^<>+*=/%~-]+', Operator), + (r'[$]+', Keyword.Constant), + (wordop, Operator.Word), + (type, Keyword.Type) + ], + } + def analyse_text(text): # See above if re.match(r'PROC', text, re.I): return True - + class Ca65Lexer(RegexLexer): """ @@ -929,109 +929,109 @@ class Ca65Lexer(RegexLexer): # comments in GAS start with "#" if re.search(r'^\s*;', text, re.MULTILINE): return 0.9 - - -class Dasm16Lexer(RegexLexer): - """ + + +class Dasm16Lexer(RegexLexer): + """ For DCPU-16 Assembly. - - Check http://0x10c.com/doc/dcpu-16.txt - - .. versionadded:: 2.4 - """ - name = 'DASM16' - aliases = ['dasm16'] - filenames = ['*.dasm16', '*.dasm'] - mimetypes = ['text/x-dasm16'] - - INSTRUCTIONS = [ - 'SET', - 'ADD', 'SUB', - 'MUL', 'MLI', - 'DIV', 'DVI', - 'MOD', 'MDI', - 'AND', 'BOR', 'XOR', - 'SHR', 'ASR', 'SHL', - 'IFB', 'IFC', 'IFE', 'IFN', 'IFG', 'IFA', 'IFL', 'IFU', - 'ADX', 'SBX', - 'STI', 'STD', - 'JSR', - 'INT', 'IAG', 'IAS', 'RFI', 'IAQ', 'HWN', 'HWQ', 'HWI', - ] - - REGISTERS = [ - 'A', 'B', 'C', - 'X', 'Y', 'Z', - 'I', 'J', - 'SP', 'PC', 'EX', - 'POP', 'PEEK', 'PUSH' - ] - - # Regexes yo + + Check http://0x10c.com/doc/dcpu-16.txt + + .. versionadded:: 2.4 + """ + name = 'DASM16' + aliases = ['dasm16'] + filenames = ['*.dasm16', '*.dasm'] + mimetypes = ['text/x-dasm16'] + + INSTRUCTIONS = [ + 'SET', + 'ADD', 'SUB', + 'MUL', 'MLI', + 'DIV', 'DVI', + 'MOD', 'MDI', + 'AND', 'BOR', 'XOR', + 'SHR', 'ASR', 'SHL', + 'IFB', 'IFC', 'IFE', 'IFN', 'IFG', 'IFA', 'IFL', 'IFU', + 'ADX', 'SBX', + 'STI', 'STD', + 'JSR', + 'INT', 'IAG', 'IAS', 'RFI', 'IAQ', 'HWN', 'HWQ', 'HWI', + ] + + REGISTERS = [ + 'A', 'B', 'C', + 'X', 'Y', 'Z', + 'I', 'J', + 'SP', 'PC', 'EX', + 'POP', 'PEEK', 'PUSH' + ] + + # Regexes yo char = r'[a-zA-Z0-9_$@.]' - identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)' - number = r'[+-]?(?:0[xX][a-zA-Z0-9]+|\d+)' - binary_number = r'0b[01_]+' - instruction = r'(?i)(' + '|'.join(INSTRUCTIONS) + ')' - single_char = r"'\\?" + char + "'" - string = r'"(\\"|[^"])*"' - - def guess_identifier(lexer, match): - ident = match.group(0) - klass = Name.Variable if ident.upper() in lexer.REGISTERS else Name.Label - yield match.start(), klass, ident - - tokens = { - 'root': [ - include('whitespace'), - (':' + identifier, Name.Label), - (identifier + ':', Name.Label), - (instruction, Name.Function, 'instruction-args'), - (r'\.' + identifier, Name.Function, 'data-args'), + identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)' + number = r'[+-]?(?:0[xX][a-zA-Z0-9]+|\d+)' + binary_number = r'0b[01_]+' + instruction = r'(?i)(' + '|'.join(INSTRUCTIONS) + ')' + single_char = r"'\\?" + char + "'" + string = r'"(\\"|[^"])*"' + + def guess_identifier(lexer, match): + ident = match.group(0) + klass = Name.Variable if ident.upper() in lexer.REGISTERS else Name.Label + yield match.start(), klass, ident + + tokens = { + 'root': [ + include('whitespace'), + (':' + identifier, Name.Label), + (identifier + ':', Name.Label), + (instruction, Name.Function, 'instruction-args'), + (r'\.' + identifier, Name.Function, 'data-args'), (r'[\r\n]+', Whitespace) - ], - - 'numeric' : [ - (binary_number, Number.Integer), - (number, Number.Integer), - (single_char, String), - ], - - 'arg' : [ - (identifier, guess_identifier), - include('numeric') - ], - - 'deref' : [ - (r'\+', Punctuation), - (r'\]', Punctuation, '#pop'), - include('arg'), - include('whitespace') - ], - - 'instruction-line' : [ + ], + + 'numeric' : [ + (binary_number, Number.Integer), + (number, Number.Integer), + (single_char, String), + ], + + 'arg' : [ + (identifier, guess_identifier), + include('numeric') + ], + + 'deref' : [ + (r'\+', Punctuation), + (r'\]', Punctuation, '#pop'), + include('arg'), + include('whitespace') + ], + + 'instruction-line' : [ (r'[\r\n]+', Whitespace, '#pop'), - (r';.*?$', Comment, '#pop'), - include('whitespace') - ], - - 'instruction-args': [ - (r',', Punctuation), - (r'\[', Punctuation, 'deref'), - include('arg'), - include('instruction-line') - ], - - 'data-args' : [ - (r',', Punctuation), - include('numeric'), - (string, String), - include('instruction-line') - ], - - 'whitespace': [ + (r';.*?$', Comment, '#pop'), + include('whitespace') + ], + + 'instruction-args': [ + (r',', Punctuation), + (r'\[', Punctuation, 'deref'), + include('arg'), + include('instruction-line') + ], + + 'data-args' : [ + (r',', Punctuation), + include('numeric'), + (string, String), + include('instruction-line') + ], + + 'whitespace': [ (r'\n', Whitespace), (r'\s+', Whitespace), - (r';.*?\n', Comment) - ], - } + (r';.*?\n', Comment) + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/automation.py b/contrib/python/Pygments/py3/pygments/lexers/automation.py index 49cca75ea7..7b03e39a06 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/automation.py +++ b/contrib/python/Pygments/py3/pygments/lexers/automation.py @@ -30,8 +30,8 @@ class AutohotkeyLexer(RegexLexer): 'root': [ (r'^(\s*)(/\*)', bygroups(Text, Comment.Multiline), 'incomment'), (r'^(\s*)(\()', bygroups(Text, Generic), 'incontinuation'), - (r'\s+;.*?$', Comment.Single), - (r'^;.*?$', Comment.Single), + (r'\s+;.*?$', Comment.Single), + (r'^;.*?$', Comment.Single), (r'[]{}(),;[]', Punctuation), (r'(in|is|and|or|not)\b', Operator.Word), (r'\%[a-zA-Z_#@$][\w#@$]*\%', Name.Variable), diff --git a/contrib/python/Pygments/py3/pygments/lexers/basic.py b/contrib/python/Pygments/py3/pygments/lexers/basic.py index 730959a548..3ccadf1e07 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/basic.py +++ b/contrib/python/Pygments/py3/pygments/lexers/basic.py @@ -11,13 +11,13 @@ import re from pygments.lexer import RegexLexer, bygroups, default, words, include -from pygments.token import Comment, Error, Keyword, Name, Number, \ - Punctuation, Operator, String, Text, Whitespace -from pygments.lexers import _vbscript_builtins +from pygments.token import Comment, Error, Keyword, Name, Number, \ + Punctuation, Operator, String, Text, Whitespace +from pygments.lexers import _vbscript_builtins + - __all__ = ['BlitzBasicLexer', 'BlitzMaxLexer', 'MonkeyLexer', 'CbmBasicV2Lexer', - 'QBasicLexer', 'VBScriptLexer', 'BBCBasicLexer'] + 'QBasicLexer', 'VBScriptLexer', 'BBCBasicLexer'] class BlitzMaxLexer(RegexLexer): @@ -499,163 +499,163 @@ class QBasicLexer(RegexLexer): def analyse_text(text): if '$DYNAMIC' in text or '$STATIC' in text: return 0.9 - - -class VBScriptLexer(RegexLexer): - """ - VBScript is scripting language that is modeled on Visual Basic. - - .. versionadded:: 2.4 - """ - name = 'VBScript' - aliases = ['vbscript'] - filenames = ['*.vbs', '*.VBS'] - flags = re.IGNORECASE - - tokens = { - 'root': [ - (r"'[^\n]*", Comment.Single), - (r'\s+', Whitespace), - ('"', String.Double, 'string'), - ('&h[0-9a-f]+', Number.Hex), - # Float variant 1, for example: 1., 1.e2, 1.2e3 - (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float), - (r'\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), # Float variant 2, for example: .1, .1e2 - (r'[0-9]+e[+-]?[0-9]+', Number.Float), # Float variant 3, for example: 123e45 + + +class VBScriptLexer(RegexLexer): + """ + VBScript is scripting language that is modeled on Visual Basic. + + .. versionadded:: 2.4 + """ + name = 'VBScript' + aliases = ['vbscript'] + filenames = ['*.vbs', '*.VBS'] + flags = re.IGNORECASE + + tokens = { + 'root': [ + (r"'[^\n]*", Comment.Single), + (r'\s+', Whitespace), + ('"', String.Double, 'string'), + ('&h[0-9a-f]+', Number.Hex), + # Float variant 1, for example: 1., 1.e2, 1.2e3 + (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float), + (r'\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), # Float variant 2, for example: .1, .1e2 + (r'[0-9]+e[+-]?[0-9]+', Number.Float), # Float variant 3, for example: 123e45 (r'[0-9]+', Number.Integer), - ('#.+#', String), # date or time value - (r'(dim)(\s+)([a-z_][a-z0-9_]*)', - bygroups(Keyword.Declaration, Whitespace, Name.Variable), 'dim_more'), - (r'(function|sub)(\s+)([a-z_][a-z0-9_]*)', - bygroups(Keyword.Declaration, Whitespace, Name.Function)), + ('#.+#', String), # date or time value + (r'(dim)(\s+)([a-z_][a-z0-9_]*)', + bygroups(Keyword.Declaration, Whitespace, Name.Variable), 'dim_more'), + (r'(function|sub)(\s+)([a-z_][a-z0-9_]*)', + bygroups(Keyword.Declaration, Whitespace, Name.Function)), (r'(class)(\s+)([a-z_][a-z0-9_]*)', bygroups(Keyword.Declaration, Whitespace, Name.Class)), (r'(const)(\s+)([a-z_][a-z0-9_]*)', bygroups(Keyword.Declaration, Whitespace, Name.Constant)), (r'(end)(\s+)(class|function|if|property|sub|with)', bygroups(Keyword, Whitespace, Keyword)), - (r'(on)(\s+)(error)(\s+)(goto)(\s+)(0)', - bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Number.Integer)), - (r'(on)(\s+)(error)(\s+)(resume)(\s+)(next)', - bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Keyword)), - (r'(option)(\s+)(explicit)', bygroups(Keyword, Whitespace, Keyword)), - (r'(property)(\s+)(get|let|set)(\s+)([a-z_][a-z0-9_]*)', - bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Whitespace, Name.Property)), - (r'rem\s.*[^\n]*', Comment.Single), - (words(_vbscript_builtins.KEYWORDS, suffix=r'\b'), Keyword), - (words(_vbscript_builtins.OPERATORS), Operator), - (words(_vbscript_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word), - (words(_vbscript_builtins.BUILTIN_CONSTANTS, suffix=r'\b'), Name.Constant), - (words(_vbscript_builtins.BUILTIN_FUNCTIONS, suffix=r'\b'), Name.Builtin), - (words(_vbscript_builtins.BUILTIN_VARIABLES, suffix=r'\b'), Name.Builtin), - (r'[a-z_][a-z0-9_]*', Name), - (r'\b_\n', Operator), - (words(r'(),.:'), Punctuation), - (r'.+(\n)?', Error) - ], - 'dim_more': [ + (r'(on)(\s+)(error)(\s+)(goto)(\s+)(0)', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Number.Integer)), + (r'(on)(\s+)(error)(\s+)(resume)(\s+)(next)', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Keyword)), + (r'(option)(\s+)(explicit)', bygroups(Keyword, Whitespace, Keyword)), + (r'(property)(\s+)(get|let|set)(\s+)([a-z_][a-z0-9_]*)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Whitespace, Name.Property)), + (r'rem\s.*[^\n]*', Comment.Single), + (words(_vbscript_builtins.KEYWORDS, suffix=r'\b'), Keyword), + (words(_vbscript_builtins.OPERATORS), Operator), + (words(_vbscript_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word), + (words(_vbscript_builtins.BUILTIN_CONSTANTS, suffix=r'\b'), Name.Constant), + (words(_vbscript_builtins.BUILTIN_FUNCTIONS, suffix=r'\b'), Name.Builtin), + (words(_vbscript_builtins.BUILTIN_VARIABLES, suffix=r'\b'), Name.Builtin), + (r'[a-z_][a-z0-9_]*', Name), + (r'\b_\n', Operator), + (words(r'(),.:'), Punctuation), + (r'.+(\n)?', Error) + ], + 'dim_more': [ (r'(\s*)(,)(\s*)([a-z_][a-z0-9]*)', bygroups(Whitespace, Punctuation, Whitespace, Name.Variable)), - default('#pop'), - ], - 'string': [ - (r'[^"\n]+', String.Double), - (r'\"\"', String.Double), - (r'"', String.Double, '#pop'), - (r'\n', Error, '#pop'), # Unterminated string - ], - } - - -class BBCBasicLexer(RegexLexer): - """ - BBC Basic was supplied on the BBC Micro, and later Acorn RISC OS. - It is also used by BBC Basic For Windows. - - .. versionadded:: 2.4 - """ - base_keywords = ['OTHERWISE', 'AND', 'DIV', 'EOR', 'MOD', 'OR', 'ERROR', - 'LINE', 'OFF', 'STEP', 'SPC', 'TAB', 'ELSE', 'THEN', - 'OPENIN', 'PTR', 'PAGE', 'TIME', 'LOMEM', 'HIMEM', 'ABS', - 'ACS', 'ADVAL', 'ASC', 'ASN', 'ATN', 'BGET', 'COS', 'COUNT', - 'DEG', 'ERL', 'ERR', 'EVAL', 'EXP', 'EXT', 'FALSE', 'FN', - 'GET', 'INKEY', 'INSTR', 'INT', 'LEN', 'LN', 'LOG', 'NOT', - 'OPENUP', 'OPENOUT', 'PI', 'POINT', 'POS', 'RAD', 'RND', - 'SGN', 'SIN', 'SQR', 'TAN', 'TO', 'TRUE', 'USR', 'VAL', - 'VPOS', 'CHR$', 'GET$', 'INKEY$', 'LEFT$', 'MID$', - 'RIGHT$', 'STR$', 'STRING$', 'EOF', 'PTR', 'PAGE', 'TIME', - 'LOMEM', 'HIMEM', 'SOUND', 'BPUT', 'CALL', 'CHAIN', 'CLEAR', - 'CLOSE', 'CLG', 'CLS', 'DATA', 'DEF', 'DIM', 'DRAW', 'END', - 'ENDPROC', 'ENVELOPE', 'FOR', 'GOSUB', 'GOTO', 'GCOL', 'IF', - 'INPUT', 'LET', 'LOCAL', 'MODE', 'MOVE', 'NEXT', 'ON', - 'VDU', 'PLOT', 'PRINT', 'PROC', 'READ', 'REM', 'REPEAT', - 'REPORT', 'RESTORE', 'RETURN', 'RUN', 'STOP', 'COLOUR', - 'TRACE', 'UNTIL', 'WIDTH', 'OSCLI'] - - basic5_keywords = ['WHEN', 'OF', 'ENDCASE', 'ENDIF', 'ENDWHILE', 'CASE', - 'CIRCLE', 'FILL', 'ORIGIN', 'POINT', 'RECTANGLE', 'SWAP', - 'WHILE', 'WAIT', 'MOUSE', 'QUIT', 'SYS', 'INSTALL', - 'LIBRARY', 'TINT', 'ELLIPSE', 'BEATS', 'TEMPO', 'VOICES', - 'VOICE', 'STEREO', 'OVERLAY', 'APPEND', 'AUTO', 'CRUNCH', - 'DELETE', 'EDIT', 'HELP', 'LIST', 'LOAD', 'LVAR', 'NEW', - 'OLD', 'RENUMBER', 'SAVE', 'TEXTLOAD', 'TEXTSAVE', - 'TWIN', 'TWINO', 'INSTALL', 'SUM', 'BEAT'] - - - name = 'BBC Basic' - aliases = ['bbcbasic'] - filenames = ['*.bbc'] - - tokens = { - 'root': [ - (r"[0-9]+", Name.Label), - (r"(\*)([^\n]*)", - bygroups(Keyword.Pseudo, Comment.Special)), + default('#pop'), + ], + 'string': [ + (r'[^"\n]+', String.Double), + (r'\"\"', String.Double), + (r'"', String.Double, '#pop'), + (r'\n', Error, '#pop'), # Unterminated string + ], + } + + +class BBCBasicLexer(RegexLexer): + """ + BBC Basic was supplied on the BBC Micro, and later Acorn RISC OS. + It is also used by BBC Basic For Windows. + + .. versionadded:: 2.4 + """ + base_keywords = ['OTHERWISE', 'AND', 'DIV', 'EOR', 'MOD', 'OR', 'ERROR', + 'LINE', 'OFF', 'STEP', 'SPC', 'TAB', 'ELSE', 'THEN', + 'OPENIN', 'PTR', 'PAGE', 'TIME', 'LOMEM', 'HIMEM', 'ABS', + 'ACS', 'ADVAL', 'ASC', 'ASN', 'ATN', 'BGET', 'COS', 'COUNT', + 'DEG', 'ERL', 'ERR', 'EVAL', 'EXP', 'EXT', 'FALSE', 'FN', + 'GET', 'INKEY', 'INSTR', 'INT', 'LEN', 'LN', 'LOG', 'NOT', + 'OPENUP', 'OPENOUT', 'PI', 'POINT', 'POS', 'RAD', 'RND', + 'SGN', 'SIN', 'SQR', 'TAN', 'TO', 'TRUE', 'USR', 'VAL', + 'VPOS', 'CHR$', 'GET$', 'INKEY$', 'LEFT$', 'MID$', + 'RIGHT$', 'STR$', 'STRING$', 'EOF', 'PTR', 'PAGE', 'TIME', + 'LOMEM', 'HIMEM', 'SOUND', 'BPUT', 'CALL', 'CHAIN', 'CLEAR', + 'CLOSE', 'CLG', 'CLS', 'DATA', 'DEF', 'DIM', 'DRAW', 'END', + 'ENDPROC', 'ENVELOPE', 'FOR', 'GOSUB', 'GOTO', 'GCOL', 'IF', + 'INPUT', 'LET', 'LOCAL', 'MODE', 'MOVE', 'NEXT', 'ON', + 'VDU', 'PLOT', 'PRINT', 'PROC', 'READ', 'REM', 'REPEAT', + 'REPORT', 'RESTORE', 'RETURN', 'RUN', 'STOP', 'COLOUR', + 'TRACE', 'UNTIL', 'WIDTH', 'OSCLI'] + + basic5_keywords = ['WHEN', 'OF', 'ENDCASE', 'ENDIF', 'ENDWHILE', 'CASE', + 'CIRCLE', 'FILL', 'ORIGIN', 'POINT', 'RECTANGLE', 'SWAP', + 'WHILE', 'WAIT', 'MOUSE', 'QUIT', 'SYS', 'INSTALL', + 'LIBRARY', 'TINT', 'ELLIPSE', 'BEATS', 'TEMPO', 'VOICES', + 'VOICE', 'STEREO', 'OVERLAY', 'APPEND', 'AUTO', 'CRUNCH', + 'DELETE', 'EDIT', 'HELP', 'LIST', 'LOAD', 'LVAR', 'NEW', + 'OLD', 'RENUMBER', 'SAVE', 'TEXTLOAD', 'TEXTSAVE', + 'TWIN', 'TWINO', 'INSTALL', 'SUM', 'BEAT'] + + + name = 'BBC Basic' + aliases = ['bbcbasic'] + filenames = ['*.bbc'] + + tokens = { + 'root': [ + (r"[0-9]+", Name.Label), + (r"(\*)([^\n]*)", + bygroups(Keyword.Pseudo, Comment.Special)), default('code'), - ], - - 'code': [ - (r"(REM)([^\n]*)", - bygroups(Keyword.Declaration, Comment.Single)), - (r'\n', Whitespace, 'root'), - (r'\s+', Whitespace), - (r':', Comment.Preproc), - - # Some special cases to make functions come out nicer - (r'(DEF)(\s*)(FN|PROC)([A-Za-z_@][\w@]*)', - bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Name.Function)), - (r'(FN|PROC)([A-Za-z_@][\w@]*)', - bygroups(Keyword, Name.Function)), - - (r'(GOTO|GOSUB|THEN|RESTORE)(\s*)(\d+)', - bygroups(Keyword, Whitespace, Name.Label)), - - (r'(TRUE|FALSE)', Keyword.Constant), - (r'(PAGE|LOMEM|HIMEM|TIME|WIDTH|ERL|ERR|REPORT\$|POS|VPOS|VOICES)', Keyword.Pseudo), - - (words(base_keywords), Keyword), - (words(basic5_keywords), Keyword), - - ('"', String.Double, 'string'), - - ('%[01]{1,32}', Number.Bin), - ('&[0-9a-f]{1,8}', Number.Hex), - - (r'[+-]?[0-9]+\.[0-9]*(E[+-]?[0-9]+)?', Number.Float), - (r'[+-]?\.[0-9]+(E[+-]?[0-9]+)?', Number.Float), - (r'[+-]?[0-9]+E[+-]?[0-9]+', Number.Float), - (r'[+-]?\d+', Number.Integer), - - (r'([A-Za-z_@][\w@]*[%$]?)', Name.Variable), - (r'([+\-]=|[$!|?+\-*/%^=><();]|>=|<=|<>|<<|>>|>>>|,)', Operator), - ], - 'string': [ - (r'[^"\n]+', String.Double), - (r'"', String.Double, '#pop'), - (r'\n', Error, 'root'), # Unterminated string - ], - } - - def analyse_text(text): - if text.startswith('10REM >') or text.startswith('REM >'): - return 0.9 + ], + + 'code': [ + (r"(REM)([^\n]*)", + bygroups(Keyword.Declaration, Comment.Single)), + (r'\n', Whitespace, 'root'), + (r'\s+', Whitespace), + (r':', Comment.Preproc), + + # Some special cases to make functions come out nicer + (r'(DEF)(\s*)(FN|PROC)([A-Za-z_@][\w@]*)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Name.Function)), + (r'(FN|PROC)([A-Za-z_@][\w@]*)', + bygroups(Keyword, Name.Function)), + + (r'(GOTO|GOSUB|THEN|RESTORE)(\s*)(\d+)', + bygroups(Keyword, Whitespace, Name.Label)), + + (r'(TRUE|FALSE)', Keyword.Constant), + (r'(PAGE|LOMEM|HIMEM|TIME|WIDTH|ERL|ERR|REPORT\$|POS|VPOS|VOICES)', Keyword.Pseudo), + + (words(base_keywords), Keyword), + (words(basic5_keywords), Keyword), + + ('"', String.Double, 'string'), + + ('%[01]{1,32}', Number.Bin), + ('&[0-9a-f]{1,8}', Number.Hex), + + (r'[+-]?[0-9]+\.[0-9]*(E[+-]?[0-9]+)?', Number.Float), + (r'[+-]?\.[0-9]+(E[+-]?[0-9]+)?', Number.Float), + (r'[+-]?[0-9]+E[+-]?[0-9]+', Number.Float), + (r'[+-]?\d+', Number.Integer), + + (r'([A-Za-z_@][\w@]*[%$]?)', Name.Variable), + (r'([+\-]=|[$!|?+\-*/%^=><();]|>=|<=|<>|<<|>>|>>>|,)', Operator), + ], + 'string': [ + (r'[^"\n]+', String.Double), + (r'"', String.Double, '#pop'), + (r'\n', Error, 'root'), # Unterminated string + ], + } + + def analyse_text(text): + if text.startswith('10REM >') or text.startswith('REM >'): + return 0.9 diff --git a/contrib/python/Pygments/py3/pygments/lexers/bibtex.py b/contrib/python/Pygments/py3/pygments/lexers/bibtex.py index 89653ba76b..c169468901 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bibtex.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bibtex.py @@ -1,159 +1,159 @@ -""" - pygments.lexers.bibtex - ~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for BibTeX bibliography data and styles - +""" + pygments.lexers.bibtex + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for BibTeX bibliography data and styles + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, default, \ - words -from pygments.token import Name, Comment, String, Error, Number, Text, \ + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, default, \ + words +from pygments.token import Name, Comment, String, Error, Number, Text, \ Keyword, Punctuation, Whitespace - -__all__ = ['BibTeXLexer', 'BSTLexer'] - - -class BibTeXLexer(ExtendedRegexLexer): - """ - A lexer for BibTeX bibliography data format. - - .. versionadded:: 2.2 - """ - - name = 'BibTeX' + +__all__ = ['BibTeXLexer', 'BSTLexer'] + + +class BibTeXLexer(ExtendedRegexLexer): + """ + A lexer for BibTeX bibliography data format. + + .. versionadded:: 2.2 + """ + + name = 'BibTeX' aliases = ['bibtex', 'bib'] - filenames = ['*.bib'] - mimetypes = ["text/x-bibtex"] - flags = re.IGNORECASE - - ALLOWED_CHARS = r'@!$&*+\-./:;<>?\[\\\]^`|~' + filenames = ['*.bib'] + mimetypes = ["text/x-bibtex"] + flags = re.IGNORECASE + + ALLOWED_CHARS = r'@!$&*+\-./:;<>?\[\\\]^`|~' IDENTIFIER = '[{}][{}]*'.format('a-z_' + ALLOWED_CHARS, r'\w' + ALLOWED_CHARS) - - def open_brace_callback(self, match, ctx): - opening_brace = match.group() - ctx.opening_brace = opening_brace - yield match.start(), Punctuation, opening_brace - ctx.pos = match.end() - - def close_brace_callback(self, match, ctx): - closing_brace = match.group() - if ( - ctx.opening_brace == '{' and closing_brace != '}' or - ctx.opening_brace == '(' and closing_brace != ')' - ): - yield match.start(), Error, closing_brace - else: - yield match.start(), Punctuation, closing_brace - del ctx.opening_brace - ctx.pos = match.end() - - tokens = { - 'root': [ - include('whitespace'), + + def open_brace_callback(self, match, ctx): + opening_brace = match.group() + ctx.opening_brace = opening_brace + yield match.start(), Punctuation, opening_brace + ctx.pos = match.end() + + def close_brace_callback(self, match, ctx): + closing_brace = match.group() + if ( + ctx.opening_brace == '{' and closing_brace != '}' or + ctx.opening_brace == '(' and closing_brace != ')' + ): + yield match.start(), Error, closing_brace + else: + yield match.start(), Punctuation, closing_brace + del ctx.opening_brace + ctx.pos = match.end() + + tokens = { + 'root': [ + include('whitespace'), (r'@comment(?!ary)', Comment), - ('@preamble', Name.Class, ('closing-brace', 'value', 'opening-brace')), - ('@string', Name.Class, ('closing-brace', 'field', 'opening-brace')), - ('@' + IDENTIFIER, Name.Class, - ('closing-brace', 'command-body', 'opening-brace')), - ('.+', Comment), - ], - 'opening-brace': [ - include('whitespace'), - (r'[{(]', open_brace_callback, '#pop'), - ], - 'closing-brace': [ - include('whitespace'), - (r'[})]', close_brace_callback, '#pop'), - ], - 'command-body': [ - include('whitespace'), - (r'[^\s\,\}]+', Name.Label, ('#pop', 'fields')), - ], - 'fields': [ - include('whitespace'), - (',', Punctuation, 'field'), - default('#pop'), - ], - 'field': [ - include('whitespace'), - (IDENTIFIER, Name.Attribute, ('value', '=')), - default('#pop'), - ], - '=': [ - include('whitespace'), - ('=', Punctuation, '#pop'), - ], - 'value': [ - include('whitespace'), - (IDENTIFIER, Name.Variable), - ('"', String, 'quoted-string'), - (r'\{', String, 'braced-string'), - (r'[\d]+', Number), - ('#', Punctuation), - default('#pop'), - ], - 'quoted-string': [ - (r'\{', String, 'braced-string'), - ('"', String, '#pop'), - (r'[^\{\"]+', String), - ], - 'braced-string': [ - (r'\{', String, '#push'), - (r'\}', String, '#pop'), - (r'[^\{\}]+', String), - ], - 'whitespace': [ + ('@preamble', Name.Class, ('closing-brace', 'value', 'opening-brace')), + ('@string', Name.Class, ('closing-brace', 'field', 'opening-brace')), + ('@' + IDENTIFIER, Name.Class, + ('closing-brace', 'command-body', 'opening-brace')), + ('.+', Comment), + ], + 'opening-brace': [ + include('whitespace'), + (r'[{(]', open_brace_callback, '#pop'), + ], + 'closing-brace': [ + include('whitespace'), + (r'[})]', close_brace_callback, '#pop'), + ], + 'command-body': [ + include('whitespace'), + (r'[^\s\,\}]+', Name.Label, ('#pop', 'fields')), + ], + 'fields': [ + include('whitespace'), + (',', Punctuation, 'field'), + default('#pop'), + ], + 'field': [ + include('whitespace'), + (IDENTIFIER, Name.Attribute, ('value', '=')), + default('#pop'), + ], + '=': [ + include('whitespace'), + ('=', Punctuation, '#pop'), + ], + 'value': [ + include('whitespace'), + (IDENTIFIER, Name.Variable), + ('"', String, 'quoted-string'), + (r'\{', String, 'braced-string'), + (r'[\d]+', Number), + ('#', Punctuation), + default('#pop'), + ], + 'quoted-string': [ + (r'\{', String, 'braced-string'), + ('"', String, '#pop'), + (r'[^\{\"]+', String), + ], + 'braced-string': [ + (r'\{', String, '#push'), + (r'\}', String, '#pop'), + (r'[^\{\}]+', String), + ], + 'whitespace': [ (r'\s+', Whitespace), - ], - } - - -class BSTLexer(RegexLexer): - """ - A lexer for BibTeX bibliography styles. - - .. versionadded:: 2.2 - """ - - name = 'BST' - aliases = ['bst', 'bst-pybtex'] - filenames = ['*.bst'] - flags = re.IGNORECASE | re.MULTILINE - - tokens = { - 'root': [ - include('whitespace'), - (words(['read', 'sort']), Keyword), - (words(['execute', 'integers', 'iterate', 'reverse', 'strings']), - Keyword, ('group')), - (words(['function', 'macro']), Keyword, ('group', 'group')), - (words(['entry']), Keyword, ('group', 'group', 'group')), - ], - 'group': [ - include('whitespace'), - (r'\{', Punctuation, ('#pop', 'group-end', 'body')), - ], - 'group-end': [ - include('whitespace'), - (r'\}', Punctuation, '#pop'), - ], - 'body': [ - include('whitespace'), - (r"\'[^#\"\{\}\s]+", Name.Function), - (r'[^#\"\{\}\s]+\$', Name.Builtin), - (r'[^#\"\{\}\s]+', Name.Variable), - (r'"[^\"]*"', String), - (r'#-?\d+', Number), - (r'\{', Punctuation, ('group-end', 'body')), - default('#pop'), - ], - 'whitespace': [ + ], + } + + +class BSTLexer(RegexLexer): + """ + A lexer for BibTeX bibliography styles. + + .. versionadded:: 2.2 + """ + + name = 'BST' + aliases = ['bst', 'bst-pybtex'] + filenames = ['*.bst'] + flags = re.IGNORECASE | re.MULTILINE + + tokens = { + 'root': [ + include('whitespace'), + (words(['read', 'sort']), Keyword), + (words(['execute', 'integers', 'iterate', 'reverse', 'strings']), + Keyword, ('group')), + (words(['function', 'macro']), Keyword, ('group', 'group')), + (words(['entry']), Keyword, ('group', 'group', 'group')), + ], + 'group': [ + include('whitespace'), + (r'\{', Punctuation, ('#pop', 'group-end', 'body')), + ], + 'group-end': [ + include('whitespace'), + (r'\}', Punctuation, '#pop'), + ], + 'body': [ + include('whitespace'), + (r"\'[^#\"\{\}\s]+", Name.Function), + (r'[^#\"\{\}\s]+\$', Name.Builtin), + (r'[^#\"\{\}\s]+', Name.Variable), + (r'"[^\"]*"', String), + (r'#-?\d+', Number), + (r'\{', Punctuation, ('group-end', 'body')), + default('#pop'), + ], + 'whitespace': [ (r'\s+', Whitespace), ('%.*?$', Comment.Single), - ], - } + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/boa.py b/contrib/python/Pygments/py3/pygments/lexers/boa.py index 7e000e5933..8818eaded6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/boa.py +++ b/contrib/python/Pygments/py3/pygments/lexers/boa.py @@ -1,101 +1,101 @@ -""" - pygments.lexers.boa - ~~~~~~~~~~~~~~~~~~~ - - Lexers for the Boa language. - +""" + pygments.lexers.boa + ~~~~~~~~~~~~~~~~~~~ + + Lexers for the Boa language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, words -from pygments.token import String, Comment, Keyword, Name, Number, Text, \ + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, words +from pygments.token import String, Comment, Keyword, Name, Number, Text, \ Operator, Punctuation, Whitespace - -__all__ = ['BoaLexer'] - -line_re = re.compile('.*?\n') - - -class BoaLexer(RegexLexer): - """ - Lexer for the `Boa <http://boa.cs.iastate.edu/docs/>`_ language. - - .. versionadded:: 2.4 - """ - name = 'Boa' - aliases = ['boa'] - filenames = ['*.boa'] - - reserved = words( - ('input', 'output', 'of', 'weight', 'before', 'after', 'stop', - 'ifall', 'foreach', 'exists', 'function', 'break', 'switch', 'case', - 'visitor', 'default', 'return', 'visit', 'while', 'if', 'else'), - suffix=r'\b', prefix=r'\b') - keywords = words( - ('bottom', 'collection', 'maximum', 'mean', 'minimum', 'set', 'sum', - 'top', 'string', 'int', 'bool', 'float', 'time', 'false', 'true', - 'array', 'map', 'stack', 'enum', 'type'), suffix=r'\b', prefix=r'\b') - classes = words( - ('Project', 'ForgeKind', 'CodeRepository', 'Revision', 'RepositoryKind', - 'ChangedFile', 'FileKind', 'ASTRoot', 'Namespace', 'Declaration', 'Type', - 'Method', 'Variable', 'Statement', 'Expression', 'Modifier', - 'StatementKind', 'ExpressionKind', 'ModifierKind', 'Visibility', - 'TypeKind', 'Person', 'ChangeKind'), - suffix=r'\b', prefix=r'\b') - operators = ('->', ':=', ':', '=', '<<', '!', '++', '||', - '&&', '+', '-', '*', ">", "<") - string_sep = ('`', '\"') - built_in_functions = words( - ( - # Array functions - 'new', 'sort', - # Date & Time functions - 'yearof', 'dayofyear', 'hourof', 'minuteof', 'secondof', 'now', - 'addday', 'addmonth', 'addweek', 'addyear', 'dayofmonth', 'dayofweek', - 'dayofyear', 'formattime', 'trunctoday', 'trunctohour', 'trunctominute', - 'trunctomonth', 'trunctosecond', 'trunctoyear', - # Map functions - 'clear', 'haskey', 'keys', 'lookup', 'remove', 'values', - # Math functions - 'abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', - 'ceil', 'cos', 'cosh', 'exp', 'floor', 'highbit', 'isfinite', 'isinf', - 'isnan', 'isnormal', 'log', 'log10', 'max', 'min', 'nrand', 'pow', - 'rand', 'round', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', - # Other functions - 'def', 'hash', 'len', - # Set functions - 'add', 'contains', 'remove', - # String functions - 'format', 'lowercase', 'match', 'matchposns', 'matchstrs', 'regex', - 'split', 'splitall', 'splitn', 'strfind', 'strreplace', 'strrfind', - 'substring', 'trim', 'uppercase', - # Type Conversion functions - 'bool', 'float', 'int', 'string', 'time', - # Domain-Specific functions - 'getast', 'getsnapshot', 'hasfiletype', 'isfixingrevision', 'iskind', - 'isliteral', - ), - prefix=r'\b', - suffix=r'\(') - - tokens = { - 'root': [ - (r'#.*?$', Comment.Single), - (r'/\*.*?\*/', Comment.Multiline), - (reserved, Keyword.Reserved), - (built_in_functions, Name.Function), - (keywords, Keyword.Type), - (classes, Name.Classes), - (words(operators), Operator), - (r'[][(),;{}\\.]', Punctuation), + +__all__ = ['BoaLexer'] + +line_re = re.compile('.*?\n') + + +class BoaLexer(RegexLexer): + """ + Lexer for the `Boa <http://boa.cs.iastate.edu/docs/>`_ language. + + .. versionadded:: 2.4 + """ + name = 'Boa' + aliases = ['boa'] + filenames = ['*.boa'] + + reserved = words( + ('input', 'output', 'of', 'weight', 'before', 'after', 'stop', + 'ifall', 'foreach', 'exists', 'function', 'break', 'switch', 'case', + 'visitor', 'default', 'return', 'visit', 'while', 'if', 'else'), + suffix=r'\b', prefix=r'\b') + keywords = words( + ('bottom', 'collection', 'maximum', 'mean', 'minimum', 'set', 'sum', + 'top', 'string', 'int', 'bool', 'float', 'time', 'false', 'true', + 'array', 'map', 'stack', 'enum', 'type'), suffix=r'\b', prefix=r'\b') + classes = words( + ('Project', 'ForgeKind', 'CodeRepository', 'Revision', 'RepositoryKind', + 'ChangedFile', 'FileKind', 'ASTRoot', 'Namespace', 'Declaration', 'Type', + 'Method', 'Variable', 'Statement', 'Expression', 'Modifier', + 'StatementKind', 'ExpressionKind', 'ModifierKind', 'Visibility', + 'TypeKind', 'Person', 'ChangeKind'), + suffix=r'\b', prefix=r'\b') + operators = ('->', ':=', ':', '=', '<<', '!', '++', '||', + '&&', '+', '-', '*', ">", "<") + string_sep = ('`', '\"') + built_in_functions = words( + ( + # Array functions + 'new', 'sort', + # Date & Time functions + 'yearof', 'dayofyear', 'hourof', 'minuteof', 'secondof', 'now', + 'addday', 'addmonth', 'addweek', 'addyear', 'dayofmonth', 'dayofweek', + 'dayofyear', 'formattime', 'trunctoday', 'trunctohour', 'trunctominute', + 'trunctomonth', 'trunctosecond', 'trunctoyear', + # Map functions + 'clear', 'haskey', 'keys', 'lookup', 'remove', 'values', + # Math functions + 'abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', + 'ceil', 'cos', 'cosh', 'exp', 'floor', 'highbit', 'isfinite', 'isinf', + 'isnan', 'isnormal', 'log', 'log10', 'max', 'min', 'nrand', 'pow', + 'rand', 'round', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', + # Other functions + 'def', 'hash', 'len', + # Set functions + 'add', 'contains', 'remove', + # String functions + 'format', 'lowercase', 'match', 'matchposns', 'matchstrs', 'regex', + 'split', 'splitall', 'splitn', 'strfind', 'strreplace', 'strrfind', + 'substring', 'trim', 'uppercase', + # Type Conversion functions + 'bool', 'float', 'int', 'string', 'time', + # Domain-Specific functions + 'getast', 'getsnapshot', 'hasfiletype', 'isfixingrevision', 'iskind', + 'isliteral', + ), + prefix=r'\b', + suffix=r'\(') + + tokens = { + 'root': [ + (r'#.*?$', Comment.Single), + (r'/\*.*?\*/', Comment.Multiline), + (reserved, Keyword.Reserved), + (built_in_functions, Name.Function), + (keywords, Keyword.Type), + (classes, Name.Classes), + (words(operators), Operator), + (r'[][(),;{}\\.]', Punctuation), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"`(\\\\|\\[^\\]|[^`\\])*`", String.Backtick), (words(string_sep), String.Delimiter), - (r'[a-zA-Z_]+', Name.Variable), - (r'[0-9]+', Number.Integer), + (r'[a-zA-Z_]+', Name.Variable), + (r'[0-9]+', Number.Integer), (r'\s+', Whitespace), # Whitespace - ] - } + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/business.py b/contrib/python/Pygments/py3/pygments/lexers/business.py index ec1216aacb..47713198ed 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/business.py +++ b/contrib/python/Pygments/py3/pygments/lexers/business.py @@ -56,9 +56,9 @@ class CobolLexer(RegexLexer): ], 'core': [ # Figurative constants - (r'(^|(?<=[^\w\-]))(ALL\s+)?' + (r'(^|(?<=[^\w\-]))(ALL\s+)?' r'((ZEROES)|(HIGH-VALUE|LOW-VALUE|QUOTE|SPACE|ZERO)(S)?)' - r'\s*($|(?=[^\w\-]))', + r'\s*($|(?=[^\w\-]))', Name.Constant), # Reserved words STATEMENTS and other bolds @@ -78,8 +78,8 @@ class CobolLexer(RegexLexer): 'RETURN', 'REWRITE', 'SCREEN', 'SD', 'SEARCH', 'SECTION', 'SET', 'SORT', 'START', 'STOP', 'STRING', 'SUBTRACT', 'SUPPRESS', 'TERMINATE', 'THEN', 'UNLOCK', 'UNSTRING', 'USE', 'VALIDATE', - 'WORKING-STORAGE', 'WRITE'), prefix=r'(^|(?<=[^\w\-]))', - suffix=r'\s*($|(?=[^\w\-]))'), + 'WORKING-STORAGE', 'WRITE'), prefix=r'(^|(?<=[^\w\-]))', + suffix=r'\s*($|(?=[^\w\-]))'), Keyword.Reserved), # Reserved words @@ -88,33 +88,33 @@ class CobolLexer(RegexLexer): 'ALPHABET', 'ALPHABETIC', 'ALPHABETIC-LOWER', 'ALPHABETIC-UPPER', 'ALPHANUMERIC', 'ALPHANUMERIC-EDITED', 'ALSO', 'ALTER', 'ALTERNATE' 'ANY', 'ARE', 'AREA', 'AREAS', 'ARGUMENT-NUMBER', 'ARGUMENT-VALUE', 'AS', - 'ASCENDING', 'ASSIGN', 'AT', 'AUTO', 'AUTO-SKIP', 'AUTOMATIC', - 'AUTOTERMINATE', 'BACKGROUND-COLOR', 'BASED', 'BEEP', 'BEFORE', 'BELL', + 'ASCENDING', 'ASSIGN', 'AT', 'AUTO', 'AUTO-SKIP', 'AUTOMATIC', + 'AUTOTERMINATE', 'BACKGROUND-COLOR', 'BASED', 'BEEP', 'BEFORE', 'BELL', 'BLANK', 'BLINK', 'BLOCK', 'BOTTOM', 'BY', 'BYTE-LENGTH', 'CHAINING', - 'CHARACTER', 'CHARACTERS', 'CLASS', 'CODE', 'CODE-SET', 'COL', - 'COLLATING', 'COLS', 'COLUMN', 'COLUMNS', 'COMMA', 'COMMAND-LINE', - 'COMMIT', 'COMMON', 'CONSTANT', 'CONTAINS', 'CONTENT', 'CONTROL', + 'CHARACTER', 'CHARACTERS', 'CLASS', 'CODE', 'CODE-SET', 'COL', + 'COLLATING', 'COLS', 'COLUMN', 'COLUMNS', 'COMMA', 'COMMAND-LINE', + 'COMMIT', 'COMMON', 'CONSTANT', 'CONTAINS', 'CONTENT', 'CONTROL', 'CONTROLS', 'CONVERTING', 'COPY', 'CORR', 'CORRESPONDING', 'COUNT', 'CRT', - 'CURRENCY', 'CURSOR', 'CYCLE', 'DATE', 'DAY', 'DAY-OF-WEEK', 'DE', - 'DEBUGGING', 'DECIMAL-POINT', 'DECLARATIVES', 'DEFAULT', 'DELIMITED', + 'CURRENCY', 'CURSOR', 'CYCLE', 'DATE', 'DAY', 'DAY-OF-WEEK', 'DE', + 'DEBUGGING', 'DECIMAL-POINT', 'DECLARATIVES', 'DEFAULT', 'DELIMITED', 'DELIMITER', 'DEPENDING', 'DESCENDING', 'DETAIL', 'DISK', 'DOWN', 'DUPLICATES', 'DYNAMIC', 'EBCDIC', 'ENTRY', 'ENVIRONMENT-NAME', 'ENVIRONMENT-VALUE', 'EOL', 'EOP', 'EOS', 'ERASE', 'ERROR', 'ESCAPE', 'EXCEPTION', - 'EXCLUSIVE', 'EXTEND', 'EXTERNAL', 'FILE-ID', 'FILLER', 'FINAL', - 'FIRST', 'FIXED', 'FLOAT-LONG', 'FLOAT-SHORT', - 'FOOTING', 'FOR', 'FOREGROUND-COLOR', 'FORMAT', 'FROM', 'FULL', - 'FUNCTION', 'FUNCTION-ID', 'GIVING', 'GLOBAL', 'GROUP', + 'EXCLUSIVE', 'EXTEND', 'EXTERNAL', 'FILE-ID', 'FILLER', 'FINAL', + 'FIRST', 'FIXED', 'FLOAT-LONG', 'FLOAT-SHORT', + 'FOOTING', 'FOR', 'FOREGROUND-COLOR', 'FORMAT', 'FROM', 'FULL', + 'FUNCTION', 'FUNCTION-ID', 'GIVING', 'GLOBAL', 'GROUP', 'HEADING', 'HIGHLIGHT', 'I-O', 'ID', 'IGNORE', 'IGNORING', 'IN', 'INDEX', 'INDEXED', 'INDICATE', - 'INITIAL', 'INITIALIZED', 'INPUT', 'INTO', 'INTRINSIC', 'INVALID', - 'IS', 'JUST', 'JUSTIFIED', 'KEY', 'LABEL', + 'INITIAL', 'INITIALIZED', 'INPUT', 'INTO', 'INTRINSIC', 'INVALID', + 'IS', 'JUST', 'JUSTIFIED', 'KEY', 'LABEL', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIMIT', 'LIMITS', 'LINAGE', 'LINAGE-COUNTER', 'LINE', 'LINES', 'LOCALE', 'LOCK', - 'LOWLIGHT', 'MANUAL', 'MEMORY', 'MINUS', 'MODE', 'MULTIPLE', - 'NATIONAL', 'NATIONAL-EDITED', 'NATIVE', 'NEGATIVE', 'NEXT', 'NO', - 'NULL', 'NULLS', 'NUMBER', 'NUMBERS', 'NUMERIC', 'NUMERIC-EDITED', - 'OBJECT-COMPUTER', 'OCCURS', 'OF', 'OFF', 'OMITTED', 'ON', 'ONLY', + 'LOWLIGHT', 'MANUAL', 'MEMORY', 'MINUS', 'MODE', 'MULTIPLE', + 'NATIONAL', 'NATIONAL-EDITED', 'NATIVE', 'NEGATIVE', 'NEXT', 'NO', + 'NULL', 'NULLS', 'NUMBER', 'NUMBERS', 'NUMERIC', 'NUMERIC-EDITED', + 'OBJECT-COMPUTER', 'OCCURS', 'OF', 'OFF', 'OMITTED', 'ON', 'ONLY', 'OPTIONAL', 'ORDER', 'ORGANIZATION', 'OTHER', 'OUTPUT', 'OVERFLOW', 'OVERLINE', 'PACKED-DECIMAL', 'PADDING', 'PAGE', 'PARAGRAPH', 'PLUS', 'POINTER', 'POSITION', 'POSITIVE', 'PRESENT', 'PREVIOUS', @@ -136,42 +136,42 @@ class CobolLexer(RegexLexer): 'UNSIGNED-INT', 'UNSIGNED-LONG', 'UNSIGNED-SHORT', 'UNTIL', 'UP', 'UPDATE', 'UPON', 'USAGE', 'USING', 'VALUE', 'VALUES', 'VARYING', 'WAIT', 'WHEN', 'WITH', 'WORDS', 'YYYYDDD', 'YYYYMMDD'), - prefix=r'(^|(?<=[^\w\-]))', suffix=r'\s*($|(?=[^\w\-]))'), + prefix=r'(^|(?<=[^\w\-]))', suffix=r'\s*($|(?=[^\w\-]))'), Keyword.Pseudo), # inactive reserved words (words(( - 'ACTIVE-CLASS', 'ALIGNED', 'ANYCASE', 'ARITHMETIC', 'ATTRIBUTE', - 'B-AND', 'B-NOT', 'B-OR', 'B-XOR', 'BIT', 'BOOLEAN', 'CD', 'CENTER', - 'CF', 'CH', 'CHAIN', 'CLASS-ID', 'CLASSIFICATION', 'COMMUNICATION', - 'CONDITION', 'DATA-POINTER', 'DESTINATION', 'DISABLE', 'EC', 'EGI', - 'EMI', 'ENABLE', 'END-RECEIVE', 'ENTRY-CONVENTION', 'EO', 'ESI', - 'EXCEPTION-OBJECT', 'EXPANDS', 'FACTORY', 'FLOAT-BINARY-16', - 'FLOAT-BINARY-34', 'FLOAT-BINARY-7', 'FLOAT-DECIMAL-16', - 'FLOAT-DECIMAL-34', 'FLOAT-EXTENDED', 'FORMAT', 'FUNCTION-POINTER', - 'GET', 'GROUP-USAGE', 'IMPLEMENTS', 'INFINITY', 'INHERITS', - 'INTERFACE', 'INTERFACE-ID', 'INVOKE', 'LC_ALL', 'LC_COLLATE', + 'ACTIVE-CLASS', 'ALIGNED', 'ANYCASE', 'ARITHMETIC', 'ATTRIBUTE', + 'B-AND', 'B-NOT', 'B-OR', 'B-XOR', 'BIT', 'BOOLEAN', 'CD', 'CENTER', + 'CF', 'CH', 'CHAIN', 'CLASS-ID', 'CLASSIFICATION', 'COMMUNICATION', + 'CONDITION', 'DATA-POINTER', 'DESTINATION', 'DISABLE', 'EC', 'EGI', + 'EMI', 'ENABLE', 'END-RECEIVE', 'ENTRY-CONVENTION', 'EO', 'ESI', + 'EXCEPTION-OBJECT', 'EXPANDS', 'FACTORY', 'FLOAT-BINARY-16', + 'FLOAT-BINARY-34', 'FLOAT-BINARY-7', 'FLOAT-DECIMAL-16', + 'FLOAT-DECIMAL-34', 'FLOAT-EXTENDED', 'FORMAT', 'FUNCTION-POINTER', + 'GET', 'GROUP-USAGE', 'IMPLEMENTS', 'INFINITY', 'INHERITS', + 'INTERFACE', 'INTERFACE-ID', 'INVOKE', 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MESSAGES', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', - 'LINE-COUNTER', 'MESSAGE', 'METHOD', 'METHOD-ID', 'NESTED', 'NONE', - 'NORMAL', 'OBJECT', 'OBJECT-REFERENCE', 'OPTIONS', 'OVERRIDE', - 'PAGE-COUNTER', 'PF', 'PH', 'PROPERTY', 'PROTOTYPE', 'PURGE', - 'QUEUE', 'RAISE', 'RAISING', 'RECEIVE', 'RELATION', 'REPLACE', - 'REPRESENTS-NOT-A-NUMBER', 'RESET', 'RESUME', 'RETRY', 'RF', 'RH', - 'SECONDS', 'SEGMENT', 'SELF', 'SEND', 'SOURCES', 'STATEMENT', - 'STEP', 'STRONG', 'SUB-QUEUE-1', 'SUB-QUEUE-2', 'SUB-QUEUE-3', - 'SUPER', 'SYMBOL', 'SYSTEM-DEFAULT', 'TABLE', 'TERMINAL', 'TEXT', - 'TYPEDEF', 'UCS-4', 'UNIVERSAL', 'USER-DEFAULT', 'UTF-16', 'UTF-8', - 'VAL-STATUS', 'VALID', 'VALIDATE', 'VALIDATE-STATUS'), - prefix=r'(^|(?<=[^\w\-]))', suffix=r'\s*($|(?=[^\w\-]))'), + 'LINE-COUNTER', 'MESSAGE', 'METHOD', 'METHOD-ID', 'NESTED', 'NONE', + 'NORMAL', 'OBJECT', 'OBJECT-REFERENCE', 'OPTIONS', 'OVERRIDE', + 'PAGE-COUNTER', 'PF', 'PH', 'PROPERTY', 'PROTOTYPE', 'PURGE', + 'QUEUE', 'RAISE', 'RAISING', 'RECEIVE', 'RELATION', 'REPLACE', + 'REPRESENTS-NOT-A-NUMBER', 'RESET', 'RESUME', 'RETRY', 'RF', 'RH', + 'SECONDS', 'SEGMENT', 'SELF', 'SEND', 'SOURCES', 'STATEMENT', + 'STEP', 'STRONG', 'SUB-QUEUE-1', 'SUB-QUEUE-2', 'SUB-QUEUE-3', + 'SUPER', 'SYMBOL', 'SYSTEM-DEFAULT', 'TABLE', 'TERMINAL', 'TEXT', + 'TYPEDEF', 'UCS-4', 'UNIVERSAL', 'USER-DEFAULT', 'UTF-16', 'UTF-8', + 'VAL-STATUS', 'VALID', 'VALIDATE', 'VALIDATE-STATUS'), + prefix=r'(^|(?<=[^\w\-]))', suffix=r'\s*($|(?=[^\w\-]))'), Error), # Data Types - (r'(^|(?<=[^\w\-]))' + (r'(^|(?<=[^\w\-]))' r'(PIC\s+.+?(?=(\s|\.\s))|PICTURE\s+.+?(?=(\s|\.\s))|' r'(COMPUTATIONAL)(-[1-5X])?|(COMP)(-[1-5X])?|' r'BINARY-C-LONG|' r'BINARY-CHAR|BINARY-DOUBLE|BINARY-LONG|BINARY-SHORT|' - r'BINARY)\s*($|(?=[^\w\-]))', Keyword.Type), + r'BINARY)\s*($|(?=[^\w\-]))', Keyword.Type), # Operators (r'(\*\*|\*|\+|-|/|<=|>=|<|>|==|/=|=)', Operator), @@ -181,7 +181,7 @@ class CobolLexer(RegexLexer): (r'([(),;:&%.])', Punctuation), # Intrinsics - (r'(^|(?<=[^\w\-]))(ABS|ACOS|ANNUITY|ASIN|ATAN|BYTE-LENGTH|' + (r'(^|(?<=[^\w\-]))(ABS|ACOS|ANNUITY|ASIN|ATAN|BYTE-LENGTH|' r'CHAR|COMBINED-DATETIME|CONCATENATE|COS|CURRENT-DATE|' r'DATE-OF-INTEGER|DATE-TO-YYYYMMDD|DAY-OF-INTEGER|DAY-TO-YYYYDDD|' r'EXCEPTION-(?:FILE|LOCATION|STATEMENT|STATUS)|EXP10|EXP|E|' @@ -193,13 +193,13 @@ class CobolLexer(RegexLexer): r'STANDARD-DEVIATION|STORED-CHAR-LENGTH|SUBSTITUTE(?:-CASE)?|' r'SUM|TAN|TEST-DATE-YYYYMMDD|TEST-DAY-YYYYDDD|TRIM|' r'UPPER-CASE|VARIANCE|WHEN-COMPILED|YEAR-TO-YYYY)\s*' - r'($|(?=[^\w\-]))', Name.Function), + r'($|(?=[^\w\-]))', Name.Function), # Booleans - (r'(^|(?<=[^\w\-]))(true|false)\s*($|(?=[^\w\-]))', Name.Builtin), + (r'(^|(?<=[^\w\-]))(true|false)\s*($|(?=[^\w\-]))', Name.Builtin), # Comparing Operators - (r'(^|(?<=[^\w\-]))(equal|equals|ne|lt|le|gt|ge|' - r'greater|less|than|not|and|or)\s*($|(?=[^\w\-]))', Operator.Word), + (r'(^|(?<=[^\w\-]))(equal|equals|ne|lt|le|gt|ge|' + r'greater|less|than|not|and|or)\s*($|(?=[^\w\-]))', Operator.Word), ], # \"[^\"\n]*\"|\'[^\'\n]*\' @@ -255,7 +255,7 @@ class ABAPLexer(RegexLexer): (r'\s+', Whitespace), (r'^\*.*$', Comment.Single), (r'\".*?\n', Comment.Single), - (r'##\w+', Comment.Special), + (r'##\w+', Comment.Special), ], 'variable-names': [ (r'<\S+>', Name.Variable), @@ -264,8 +264,8 @@ class ABAPLexer(RegexLexer): 'root': [ include('common'), # function calls - (r'CALL\s+(?:BADI|CUSTOMER-FUNCTION|FUNCTION)', - Keyword), + (r'CALL\s+(?:BADI|CUSTOMER-FUNCTION|FUNCTION)', + Keyword), (r'(CALL\s+(?:DIALOG|SCREEN|SUBSCREEN|SELECTION-SCREEN|' r'TRANSACTION|TRANSFORMATION))\b', Keyword), @@ -285,12 +285,12 @@ class ABAPLexer(RegexLexer): # call methodnames returning style (r'(?<=(=|-)>)([\w\-~]+)(?=\()', Name.Function), - # text elements - (r'(TEXT)(-)(\d{3})', - bygroups(Keyword, Punctuation, Number.Integer)), - (r'(TEXT)(-)(\w{3})', - bygroups(Keyword, Punctuation, Name.Variable)), - + # text elements + (r'(TEXT)(-)(\d{3})', + bygroups(Keyword, Punctuation, Number.Integer)), + (r'(TEXT)(-)(\w{3})', + bygroups(Keyword, Punctuation, Name.Variable)), + # keywords with dashes in them. # these need to be first, because for instance the -ID part # of MESSAGE-ID wouldn't get highlighted if MESSAGE was @@ -307,13 +307,13 @@ class ABAPLexer(RegexLexer): r'OUTPUT-LENGTH|PRINT-CONTROL|' r'SELECT-OPTIONS|START-OF-SELECTION|SUBTRACT-CORRESPONDING|' r'SYNTAX-CHECK|SYSTEM-EXCEPTIONS|' - r'TYPE-POOL|TYPE-POOLS|NO-DISPLAY' + r'TYPE-POOL|TYPE-POOLS|NO-DISPLAY' r')\b', Keyword), # keyword kombinations - (r'(?<![-\>])(CREATE\s+(PUBLIC|PRIVATE|DATA|OBJECT)|' - r'(PUBLIC|PRIVATE|PROTECTED)\s+SECTION|' - r'(TYPE|LIKE)\s+((LINE\s+OF|REF\s+TO|' + (r'(?<![-\>])(CREATE\s+(PUBLIC|PRIVATE|DATA|OBJECT)|' + r'(PUBLIC|PRIVATE|PROTECTED)\s+SECTION|' + r'(TYPE|LIKE)\s+((LINE\s+OF|REF\s+TO|' r'(SORTED|STANDARD|HASHED)\s+TABLE\s+OF))?|' r'FROM\s+(DATABASE|MEMORY)|CALL\s+METHOD|' r'(GROUP|ORDER) BY|HAVING|SEPARATED BY|' @@ -349,16 +349,16 @@ class ABAPLexer(RegexLexer): r'(BEGIN|END)\s+OF|' r'DELETE(\s+ADJACENT\s+DUPLICATES\sFROM)?|' r'COMPARING(\s+ALL\s+FIELDS)?|' - r'(INSERT|APPEND)(\s+INITIAL\s+LINE\s+(IN)?TO|\s+LINES\s+OF)?|' + r'(INSERT|APPEND)(\s+INITIAL\s+LINE\s+(IN)?TO|\s+LINES\s+OF)?|' r'IN\s+((BYTE|CHARACTER)\s+MODE|PROGRAM)|' r'END-OF-(DEFINITION|PAGE|SELECTION)|' r'WITH\s+FRAME(\s+TITLE)|' - r'(REPLACE|FIND)\s+((FIRST|ALL)\s+OCCURRENCES?\s+OF\s+)?(SUBSTRING|REGEX)?|' - r'MATCH\s+(LENGTH|COUNT|LINE|OFFSET)|' - r'(RESPECTING|IGNORING)\s+CASE|' - r'IN\s+UPDATE\s+TASK|' - r'(SOURCE|RESULT)\s+(XML)?|' - r'REFERENCE\s+INTO|' + r'(REPLACE|FIND)\s+((FIRST|ALL)\s+OCCURRENCES?\s+OF\s+)?(SUBSTRING|REGEX)?|' + r'MATCH\s+(LENGTH|COUNT|LINE|OFFSET)|' + r'(RESPECTING|IGNORING)\s+CASE|' + r'IN\s+UPDATE\s+TASK|' + r'(SOURCE|RESULT)\s+(XML)?|' + r'REFERENCE\s+INTO|' # simple kombinations r'AND\s+(MARK|RETURN)|CLIENT\s+SPECIFIED|CORRESPONDING\s+FIELDS\s+OF|' @@ -367,41 +367,41 @@ class ABAPLexer(RegexLexer): r'MODIFY\s+SCREEN|NESTING\s+LEVEL|NO\s+INTERVALS|OF\s+STRUCTURE|' r'RADIOBUTTON\s+GROUP|RANGE\s+OF|REF\s+TO|SUPPRESS DIALOG|' r'TABLE\s+OF|UPPER\s+CASE|TRANSPORTING\s+NO\s+FIELDS|' - r'VALUE\s+CHECK|VISIBLE\s+LENGTH|HEADER\s+LINE|COMMON\s+PART)\b', Keyword), + r'VALUE\s+CHECK|VISIBLE\s+LENGTH|HEADER\s+LINE|COMMON\s+PART)\b', Keyword), # single word keywords. - (r'(^|(?<=(\s|\.)))(ABBREVIATED|ABSTRACT|ADD|ALIASES|ALIGN|ALPHA|' - r'ASSERT|AS|ASSIGN(ING)?|AT(\s+FIRST)?|' + (r'(^|(?<=(\s|\.)))(ABBREVIATED|ABSTRACT|ADD|ALIASES|ALIGN|ALPHA|' + r'ASSERT|AS|ASSIGN(ING)?|AT(\s+FIRST)?|' r'BACK|BLOCK|BREAK-POINT|' r'CASE|CATCH|CHANGING|CHECK|CLASS|CLEAR|COLLECT|COLOR|COMMIT|' r'CREATE|COMMUNICATION|COMPONENTS?|COMPUTE|CONCATENATE|CONDENSE|' - r'CONSTANTS|CONTEXTS|CONTINUE|CONTROLS|COUNTRY|CURRENCY|' - r'DATA|DATE|DECIMALS|DEFAULT|DEFINE|DEFINITION|DEFERRED|DEMAND|' - r'DETAIL|DIRECTORY|DIVIDE|DO|DUMMY|' - r'ELSE(IF)?|ENDAT|ENDCASE|ENDCATCH|ENDCLASS|ENDDO|ENDFORM|ENDFUNCTION|' - r'ENDIF|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDSELECT|ENDTRY|ENDWHILE|' - r'ENHANCEMENT|EVENTS|EXACT|EXCEPTIONS?|EXIT|EXPONENT|EXPORT|EXPORTING|EXTRACT|' - r'FETCH|FIELDS?|FOR|FORM|FORMAT|FREE|FROM|FUNCTION|' + r'CONSTANTS|CONTEXTS|CONTINUE|CONTROLS|COUNTRY|CURRENCY|' + r'DATA|DATE|DECIMALS|DEFAULT|DEFINE|DEFINITION|DEFERRED|DEMAND|' + r'DETAIL|DIRECTORY|DIVIDE|DO|DUMMY|' + r'ELSE(IF)?|ENDAT|ENDCASE|ENDCATCH|ENDCLASS|ENDDO|ENDFORM|ENDFUNCTION|' + r'ENDIF|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDSELECT|ENDTRY|ENDWHILE|' + r'ENHANCEMENT|EVENTS|EXACT|EXCEPTIONS?|EXIT|EXPONENT|EXPORT|EXPORTING|EXTRACT|' + r'FETCH|FIELDS?|FOR|FORM|FORMAT|FREE|FROM|FUNCTION|' r'HIDE|' r'ID|IF|IMPORT|IMPLEMENTATION|IMPORTING|IN|INCLUDE|INCLUDING|' r'INDEX|INFOTYPES|INITIALIZATION|INTERFACE|INTERFACES|INTO|' - r'LANGUAGE|LEAVE|LENGTH|LINES|LOAD|LOCAL|' + r'LANGUAGE|LEAVE|LENGTH|LINES|LOAD|LOCAL|' r'JOIN|' r'KEY|' - r'NEXT|' - r'MAXIMUM|MESSAGE|METHOD[S]?|MINIMUM|MODULE|MODIFIER|MODIFY|MOVE|MULTIPLY|' - r'NODES|NUMBER|' - r'OBLIGATORY|OBJECT|OF|OFF|ON|OTHERS|OVERLAY|' - r'PACK|PAD|PARAMETERS|PERCENTAGE|POSITION|PROGRAM|PROVIDE|PUBLIC|PUT|PF\d\d|' - r'RAISE|RAISING|RANGES?|READ|RECEIVE|REDEFINITION|REFRESH|REJECT|REPORT|RESERVE|' - r'RESUME|RETRY|RETURN|RETURNING|RIGHT|ROLLBACK|REPLACE|' - r'SCROLL|SEARCH|SELECT|SHIFT|SIGN|SINGLE|SIZE|SKIP|SORT|SPLIT|STATICS|STOP|' - r'STYLE|SUBMATCHES|SUBMIT|SUBTRACT|SUM(?!\()|SUMMARY|SUMMING|SUPPLY|' - r'TABLE|TABLES|TIMESTAMP|TIMES?|TIMEZONE|TITLE|\??TO|' - r'TOP-OF-PAGE|TRANSFER|TRANSLATE|TRY|TYPES|' + r'NEXT|' + r'MAXIMUM|MESSAGE|METHOD[S]?|MINIMUM|MODULE|MODIFIER|MODIFY|MOVE|MULTIPLY|' + r'NODES|NUMBER|' + r'OBLIGATORY|OBJECT|OF|OFF|ON|OTHERS|OVERLAY|' + r'PACK|PAD|PARAMETERS|PERCENTAGE|POSITION|PROGRAM|PROVIDE|PUBLIC|PUT|PF\d\d|' + r'RAISE|RAISING|RANGES?|READ|RECEIVE|REDEFINITION|REFRESH|REJECT|REPORT|RESERVE|' + r'RESUME|RETRY|RETURN|RETURNING|RIGHT|ROLLBACK|REPLACE|' + r'SCROLL|SEARCH|SELECT|SHIFT|SIGN|SINGLE|SIZE|SKIP|SORT|SPLIT|STATICS|STOP|' + r'STYLE|SUBMATCHES|SUBMIT|SUBTRACT|SUM(?!\()|SUMMARY|SUMMING|SUPPLY|' + r'TABLE|TABLES|TIMESTAMP|TIMES?|TIMEZONE|TITLE|\??TO|' + r'TOP-OF-PAGE|TRANSFER|TRANSLATE|TRY|TYPES|' r'ULINE|UNDER|UNPACK|UPDATE|USING|' - r'VALUE|VALUES|VIA|VARYING|VARY|' - r'WAIT|WHEN|WHERE|WIDTH|WHILE|WITH|WINDOW|WRITE|XSD|ZERO)\b', Keyword), + r'VALUE|VALUES|VIA|VARYING|VARY|' + r'WAIT|WHEN|WHERE|WIDTH|WHILE|WITH|WINDOW|WRITE|XSD|ZERO)\b', Keyword), # builtins (r'(abs|acos|asin|atan|' @@ -427,21 +427,21 @@ class ABAPLexer(RegexLexer): # operators which look like variable names before # parsing variable names. - (r'(?<=(\s|.))(AND|OR|EQ|NE|GT|LT|GE|LE|CO|CN|CA|NA|CS|NOT|NS|CP|NP|' + (r'(?<=(\s|.))(AND|OR|EQ|NE|GT|LT|GE|LE|CO|CN|CA|NA|CS|NOT|NS|CP|NP|' r'BYTE-CO|BYTE-CN|BYTE-CA|BYTE-NA|BYTE-CS|BYTE-NS|' - r'IS\s+(NOT\s+)?(INITIAL|ASSIGNED|REQUESTED|BOUND))\b', Operator.Word), + r'IS\s+(NOT\s+)?(INITIAL|ASSIGNED|REQUESTED|BOUND))\b', Operator.Word), include('variable-names'), - # standard operators after variable names, + # standard operators after variable names, # because < and > are part of field symbols. - (r'[?*<>=\-+&]', Operator), + (r'[?*<>=\-+&]', Operator), (r"'(''|[^'])*'", String.Single), (r"`([^`])*`", String.Single), - (r"([|}])([^{}|]*?)([|{])", - bygroups(Punctuation, String.Single, Punctuation)), - (r'[/;:()\[\],.]', Punctuation), - (r'(!)(\w+)', bygroups(Operator, Name)), + (r"([|}])([^{}|]*?)([|{])", + bygroups(Punctuation, String.Single, Punctuation)), + (r'[/;:()\[\],.]', Punctuation), + (r'(!)(\w+)', bygroups(Operator, Name)), ], } @@ -458,15 +458,15 @@ class OpenEdgeLexer(RegexLexer): filenames = ['*.p', '*.cls'] mimetypes = ['text/x-openedge', 'application/x-openedge'] - types = (r'(?i)(^|(?<=[^\w\-]))(CHARACTER|CHAR|CHARA|CHARAC|CHARACT|CHARACTE|' + types = (r'(?i)(^|(?<=[^\w\-]))(CHARACTER|CHAR|CHARA|CHARAC|CHARACT|CHARACTE|' r'COM-HANDLE|DATE|DATETIME|DATETIME-TZ|' r'DECIMAL|DEC|DECI|DECIM|DECIMA|HANDLE|' r'INT64|INTEGER|INT|INTE|INTEG|INTEGE|' - r'LOGICAL|LONGCHAR|MEMPTR|RAW|RECID|ROWID)\s*($|(?=[^\w\-]))') + r'LOGICAL|LONGCHAR|MEMPTR|RAW|RECID|ROWID)\s*($|(?=[^\w\-]))') keywords = words(OPENEDGEKEYWORDS, - prefix=r'(?i)(^|(?<=[^\w\-]))', - suffix=r'\s*($|(?=[^\w\-]))') + prefix=r'(?i)(^|(?<=[^\w\-]))', + suffix=r'\s*($|(?=[^\w\-]))') tokens = { 'root': [ diff --git a/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py b/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py index 3613294039..c9d1ed38ea 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py +++ b/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py @@ -45,7 +45,7 @@ class CFamilyLexer(RegexLexer): tokens = { 'whitespace': [ # preprocessor directives: without whitespace - (r'^#if\s+0', Comment.Preproc, 'if0'), + (r'^#if\s+0', Comment.Preproc, 'if0'), ('^#', Comment.Preproc, 'macro'), # or with whitespace ('^(' + _ws1 + r')(#if\s+0)', @@ -57,17 +57,17 @@ class CFamilyLexer(RegexLexer): (r'\n', Whitespace), (r'[^\S\n]+', Whitespace), (r'\\\n', Text), # line continuation - (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), - (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), - # Open until EOF, so no ending delimeter - (r'/(\\\n)?[*][\w\W]*', Comment.Multiline), + (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), + (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), + # Open until EOF, so no ending delimeter + (r'/(\\\n)?[*][\w\W]*', Comment.Multiline), ], 'statements': [ include('keywords'), include('types'), (r'([LuU]|u8)?(")', bygroups(String.Affix, String), 'string'), (r"([LuU]|u8)?(')(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])(')", - bygroups(String.Affix, String.Char, String.Char, String.Char)), + bygroups(String.Affix, String.Char, String.Char, String.Char)), # Hexadecimal floating-point literals (C11, C++17) (r'0[xX](' + _hexpart + r'\.' + _hexpart + r'|\.' + _hexpart + r'|' + _hexpart + r')[pP][+-]?' + _hexpart + r'[lL]?', Number.Float), @@ -91,8 +91,8 @@ class CFamilyLexer(RegexLexer): ], 'keywords': [ (r'(struct|union)(\s+)', bygroups(Keyword, Whitespace), 'classname'), - (words(('asm', 'auto', 'break', 'case', 'const', 'continue', - 'default', 'do', 'else', 'enum', 'extern', 'for', 'goto', + (words(('asm', 'auto', 'break', 'case', 'const', 'continue', + 'default', 'do', 'else', 'enum', 'extern', 'for', 'goto', 'if', 'register', 'restricted', 'return', 'sizeof', 'struct', 'static', 'switch', 'typedef', 'volatile', 'while', 'union', 'thread_local', 'alignas', 'alignof', 'static_assert', '_Pragma'), @@ -270,9 +270,9 @@ class CLexer(CFamilyLexer): } def analyse_text(text): - if re.search(r'^\s*#include [<"]', text, re.MULTILINE): + if re.search(r'^\s*#include [<"]', text, re.MULTILINE): return 0.1 - if re.search(r'^\s*#ifn?def ', text, re.MULTILINE): + if re.search(r'^\s*#ifn?def ', text, re.MULTILINE): return 0.1 @@ -309,10 +309,10 @@ class CppLexer(CFamilyLexer): tokens = { 'statements': [ - # C++11 raw strings + # C++11 raw strings (r'((?:[LuU]|u8)?R)(")([^\\()\s]{,16})(\()((?:.|\n)*?)(\)\3)(")', - bygroups(String.Affix, String, String.Delimiter, String.Delimiter, - String, String.Delimiter, String)), + bygroups(String.Affix, String, String.Delimiter, String.Delimiter, + String, String.Delimiter, String)), inherit, ], 'root': [ @@ -362,7 +362,7 @@ class CppLexer(CFamilyLexer): } def analyse_text(text): - if re.search('#include <[a-z_]+>', text): + if re.search('#include <[a-z_]+>', text): return 0.2 if re.search('using namespace ', text): return 0.4 diff --git a/contrib/python/Pygments/py3/pygments/lexers/c_like.py b/contrib/python/Pygments/py3/pygments/lexers/c_like.py index a22501bd86..ed3864832d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/c_like.py +++ b/contrib/python/Pygments/py3/pygments/lexers/c_like.py @@ -105,7 +105,7 @@ class ClayLexer(RegexLexer): tokens = { 'root': [ (r'\s+', Whitespace), - (r'//.*?$', Comment.Single), + (r'//.*?$', Comment.Single), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'\b(public|private|import|as|record|variant|instance' r'|define|overload|default|external|alias' @@ -240,7 +240,7 @@ class ValaLexer(RegexLexer): 'ulong', 'unichar', 'ushort'), suffix=r'\b'), Keyword.Type), (r'(true|false|null)\b', Name.Builtin), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), ], 'root': [ include('whitespace'), @@ -344,7 +344,7 @@ class SwigLexer(CppLexer): # SWIG directives (r'(%[a-z_][a-z0-9_]*)', Name.Function), # Special variables - (r'\$\**\&?\w+', Name), + (r'\$\**\&?\w+', Name), # Stringification / additional preprocessor directives (r'##*[a-zA-Z_]\w*', Comment.Preproc), inherit, @@ -412,7 +412,7 @@ class MqlLexer(CppLexer): ], } - + class ArduinoLexer(CppLexer): """ For `Arduino(tm) <https://arduino.cc/>`_ source. @@ -431,144 +431,144 @@ class ArduinoLexer(CppLexer): # Language sketch main structure functions structure = {'setup', 'loop'} - # Language operators + # Language operators operators = {'not', 'or', 'and', 'xor'} - # Language 'variables' + # Language 'variables' variables = { - 'DIGITAL_MESSAGE', 'FIRMATA_STRING', 'ANALOG_MESSAGE', 'REPORT_DIGITAL', - 'REPORT_ANALOG', 'INPUT_PULLUP', 'SET_PIN_MODE', 'INTERNAL2V56', 'SYSTEM_RESET', - 'LED_BUILTIN', 'INTERNAL1V1', 'SYSEX_START', 'INTERNAL', 'EXTERNAL', 'HIGH', - 'LOW', 'INPUT', 'OUTPUT', 'INPUT_PULLUP', 'LED_BUILTIN', 'true', 'false', - 'void', 'boolean', 'char', 'unsigned char', 'byte', 'int', 'unsigned int', - 'word', 'long', 'unsigned long', 'short', 'float', 'double', 'string', 'String', - 'array', 'static', 'volatile', 'const', 'boolean', 'byte', 'word', 'string', - 'String', 'array', 'int', 'float', 'private', 'char', 'virtual', 'operator', - 'sizeof', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int8_t', 'int16_t', - 'int32_t', 'int64_t', 'dynamic_cast', 'typedef', 'const_cast', 'const', - 'struct', 'static_cast', 'union', 'unsigned', 'long', 'volatile', 'static', - 'protected', 'bool', 'public', 'friend', 'auto', 'void', 'enum', 'extern', - 'class', 'short', 'reinterpret_cast', 'double', 'register', 'explicit', - 'signed', 'inline', 'delete', '_Bool', 'complex', '_Complex', '_Imaginary', - 'atomic_bool', 'atomic_char', 'atomic_schar', 'atomic_uchar', 'atomic_short', - 'atomic_ushort', 'atomic_int', 'atomic_uint', 'atomic_long', 'atomic_ulong', + 'DIGITAL_MESSAGE', 'FIRMATA_STRING', 'ANALOG_MESSAGE', 'REPORT_DIGITAL', + 'REPORT_ANALOG', 'INPUT_PULLUP', 'SET_PIN_MODE', 'INTERNAL2V56', 'SYSTEM_RESET', + 'LED_BUILTIN', 'INTERNAL1V1', 'SYSEX_START', 'INTERNAL', 'EXTERNAL', 'HIGH', + 'LOW', 'INPUT', 'OUTPUT', 'INPUT_PULLUP', 'LED_BUILTIN', 'true', 'false', + 'void', 'boolean', 'char', 'unsigned char', 'byte', 'int', 'unsigned int', + 'word', 'long', 'unsigned long', 'short', 'float', 'double', 'string', 'String', + 'array', 'static', 'volatile', 'const', 'boolean', 'byte', 'word', 'string', + 'String', 'array', 'int', 'float', 'private', 'char', 'virtual', 'operator', + 'sizeof', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int8_t', 'int16_t', + 'int32_t', 'int64_t', 'dynamic_cast', 'typedef', 'const_cast', 'const', + 'struct', 'static_cast', 'union', 'unsigned', 'long', 'volatile', 'static', + 'protected', 'bool', 'public', 'friend', 'auto', 'void', 'enum', 'extern', + 'class', 'short', 'reinterpret_cast', 'double', 'register', 'explicit', + 'signed', 'inline', 'delete', '_Bool', 'complex', '_Complex', '_Imaginary', + 'atomic_bool', 'atomic_char', 'atomic_schar', 'atomic_uchar', 'atomic_short', + 'atomic_ushort', 'atomic_int', 'atomic_uint', 'atomic_long', 'atomic_ulong', 'atomic_llong', 'atomic_ullong', 'PROGMEM'} - + # Language shipped functions and class ( ) functions = { - 'KeyboardController', 'MouseController', 'SoftwareSerial', 'EthernetServer', - 'EthernetClient', 'LiquidCrystal', 'RobotControl', 'GSMVoiceCall', - 'EthernetUDP', 'EsploraTFT', 'HttpClient', 'RobotMotor', 'WiFiClient', - 'GSMScanner', 'FileSystem', 'Scheduler', 'GSMServer', 'YunClient', 'YunServer', - 'IPAddress', 'GSMClient', 'GSMModem', 'Keyboard', 'Ethernet', 'Console', - 'GSMBand', 'Esplora', 'Stepper', 'Process', 'WiFiUDP', 'GSM_SMS', 'Mailbox', - 'USBHost', 'Firmata', 'PImage', 'Client', 'Server', 'GSMPIN', 'FileIO', - 'Bridge', 'Serial', 'EEPROM', 'Stream', 'Mouse', 'Audio', 'Servo', 'File', - 'Task', 'GPRS', 'WiFi', 'Wire', 'TFT', 'GSM', 'SPI', 'SD', - 'runShellCommandAsynchronously', 'analogWriteResolution', - 'retrieveCallingNumber', 'printFirmwareVersion', 'analogReadResolution', - 'sendDigitalPortPair', 'noListenOnLocalhost', 'readJoystickButton', - 'setFirmwareVersion', 'readJoystickSwitch', 'scrollDisplayRight', - 'getVoiceCallStatus', 'scrollDisplayLeft', 'writeMicroseconds', - 'delayMicroseconds', 'beginTransmission', 'getSignalStrength', - 'runAsynchronously', 'getAsynchronously', 'listenOnLocalhost', - 'getCurrentCarrier', 'readAccelerometer', 'messageAvailable', - 'sendDigitalPorts', 'lineFollowConfig', 'countryNameWrite', 'runShellCommand', - 'readStringUntil', 'rewindDirectory', 'readTemperature', 'setClockDivider', - 'readLightSensor', 'endTransmission', 'analogReference', 'detachInterrupt', - 'countryNameRead', 'attachInterrupt', 'encryptionType', 'readBytesUntil', - 'robotNameWrite', 'readMicrophone', 'robotNameRead', 'cityNameWrite', - 'userNameWrite', 'readJoystickY', 'readJoystickX', 'mouseReleased', - 'openNextFile', 'scanNetworks', 'noInterrupts', 'digitalWrite', 'beginSpeaker', - 'mousePressed', 'isActionDone', 'mouseDragged', 'displayLogos', 'noAutoscroll', - 'addParameter', 'remoteNumber', 'getModifiers', 'keyboardRead', 'userNameRead', - 'waitContinue', 'processInput', 'parseCommand', 'printVersion', 'readNetworks', - 'writeMessage', 'blinkVersion', 'cityNameRead', 'readMessage', 'setDataMode', - 'parsePacket', 'isListening', 'setBitOrder', 'beginPacket', 'isDirectory', - 'motorsWrite', 'drawCompass', 'digitalRead', 'clearScreen', 'serialEvent', - 'rightToLeft', 'setTextSize', 'leftToRight', 'requestFrom', 'keyReleased', - 'compassRead', 'analogWrite', 'interrupts', 'WiFiServer', 'disconnect', - 'playMelody', 'parseFloat', 'autoscroll', 'getPINUsed', 'setPINUsed', - 'setTimeout', 'sendAnalog', 'readSlider', 'analogRead', 'beginWrite', - 'createChar', 'motorsStop', 'keyPressed', 'tempoWrite', 'readButton', - 'subnetMask', 'debugPrint', 'macAddress', 'writeGreen', 'randomSeed', - 'attachGPRS', 'readString', 'sendString', 'remotePort', 'releaseAll', - 'mouseMoved', 'background', 'getXChange', 'getYChange', 'answerCall', - 'getResult', 'voiceCall', 'endPacket', 'constrain', 'getSocket', 'writeJSON', - 'getButton', 'available', 'connected', 'findUntil', 'readBytes', 'exitValue', - 'readGreen', 'writeBlue', 'startLoop', 'IPAddress', 'isPressed', 'sendSysex', - 'pauseMode', 'gatewayIP', 'setCursor', 'getOemKey', 'tuneWrite', 'noDisplay', - 'loadImage', 'switchPIN', 'onRequest', 'onReceive', 'changePIN', 'playFile', - 'noBuffer', 'parseInt', 'overflow', 'checkPIN', 'knobRead', 'beginTFT', - 'bitClear', 'updateIR', 'bitWrite', 'position', 'writeRGB', 'highByte', - 'writeRed', 'setSpeed', 'readBlue', 'noStroke', 'remoteIP', 'transfer', - 'shutdown', 'hangCall', 'beginSMS', 'endWrite', 'attached', 'maintain', - 'noCursor', 'checkReg', 'checkPUK', 'shiftOut', 'isValid', 'shiftIn', 'pulseIn', - 'connect', 'println', 'localIP', 'pinMode', 'getIMEI', 'display', 'noBlink', - 'process', 'getBand', 'running', 'beginSD', 'drawBMP', 'lowByte', 'setBand', - 'release', 'bitRead', 'prepare', 'pointTo', 'readRed', 'setMode', 'noFill', - 'remove', 'listen', 'stroke', 'detach', 'attach', 'noTone', 'exists', 'buffer', - 'height', 'bitSet', 'circle', 'config', 'cursor', 'random', 'IRread', 'setDNS', - 'endSMS', 'getKey', 'micros', 'millis', 'begin', 'print', 'write', 'ready', - 'flush', 'width', 'isPIN', 'blink', 'clear', 'press', 'mkdir', 'rmdir', 'close', - 'point', 'yield', 'image', 'BSSID', 'click', 'delay', 'read', 'text', 'move', - 'peek', 'beep', 'rect', 'line', 'open', 'seek', 'fill', 'size', 'turn', 'stop', - 'home', 'find', 'step', 'tone', 'sqrt', 'RSSI', 'SSID', 'end', 'bit', 'tan', - 'cos', 'sin', 'pow', 'map', 'abs', 'max', 'min', 'get', 'run', 'put', - 'isAlphaNumeric', 'isAlpha', 'isAscii', 'isWhitespace', 'isControl', 'isDigit', - 'isGraph', 'isLowerCase', 'isPrintable', 'isPunct', 'isSpace', 'isUpperCase', + 'KeyboardController', 'MouseController', 'SoftwareSerial', 'EthernetServer', + 'EthernetClient', 'LiquidCrystal', 'RobotControl', 'GSMVoiceCall', + 'EthernetUDP', 'EsploraTFT', 'HttpClient', 'RobotMotor', 'WiFiClient', + 'GSMScanner', 'FileSystem', 'Scheduler', 'GSMServer', 'YunClient', 'YunServer', + 'IPAddress', 'GSMClient', 'GSMModem', 'Keyboard', 'Ethernet', 'Console', + 'GSMBand', 'Esplora', 'Stepper', 'Process', 'WiFiUDP', 'GSM_SMS', 'Mailbox', + 'USBHost', 'Firmata', 'PImage', 'Client', 'Server', 'GSMPIN', 'FileIO', + 'Bridge', 'Serial', 'EEPROM', 'Stream', 'Mouse', 'Audio', 'Servo', 'File', + 'Task', 'GPRS', 'WiFi', 'Wire', 'TFT', 'GSM', 'SPI', 'SD', + 'runShellCommandAsynchronously', 'analogWriteResolution', + 'retrieveCallingNumber', 'printFirmwareVersion', 'analogReadResolution', + 'sendDigitalPortPair', 'noListenOnLocalhost', 'readJoystickButton', + 'setFirmwareVersion', 'readJoystickSwitch', 'scrollDisplayRight', + 'getVoiceCallStatus', 'scrollDisplayLeft', 'writeMicroseconds', + 'delayMicroseconds', 'beginTransmission', 'getSignalStrength', + 'runAsynchronously', 'getAsynchronously', 'listenOnLocalhost', + 'getCurrentCarrier', 'readAccelerometer', 'messageAvailable', + 'sendDigitalPorts', 'lineFollowConfig', 'countryNameWrite', 'runShellCommand', + 'readStringUntil', 'rewindDirectory', 'readTemperature', 'setClockDivider', + 'readLightSensor', 'endTransmission', 'analogReference', 'detachInterrupt', + 'countryNameRead', 'attachInterrupt', 'encryptionType', 'readBytesUntil', + 'robotNameWrite', 'readMicrophone', 'robotNameRead', 'cityNameWrite', + 'userNameWrite', 'readJoystickY', 'readJoystickX', 'mouseReleased', + 'openNextFile', 'scanNetworks', 'noInterrupts', 'digitalWrite', 'beginSpeaker', + 'mousePressed', 'isActionDone', 'mouseDragged', 'displayLogos', 'noAutoscroll', + 'addParameter', 'remoteNumber', 'getModifiers', 'keyboardRead', 'userNameRead', + 'waitContinue', 'processInput', 'parseCommand', 'printVersion', 'readNetworks', + 'writeMessage', 'blinkVersion', 'cityNameRead', 'readMessage', 'setDataMode', + 'parsePacket', 'isListening', 'setBitOrder', 'beginPacket', 'isDirectory', + 'motorsWrite', 'drawCompass', 'digitalRead', 'clearScreen', 'serialEvent', + 'rightToLeft', 'setTextSize', 'leftToRight', 'requestFrom', 'keyReleased', + 'compassRead', 'analogWrite', 'interrupts', 'WiFiServer', 'disconnect', + 'playMelody', 'parseFloat', 'autoscroll', 'getPINUsed', 'setPINUsed', + 'setTimeout', 'sendAnalog', 'readSlider', 'analogRead', 'beginWrite', + 'createChar', 'motorsStop', 'keyPressed', 'tempoWrite', 'readButton', + 'subnetMask', 'debugPrint', 'macAddress', 'writeGreen', 'randomSeed', + 'attachGPRS', 'readString', 'sendString', 'remotePort', 'releaseAll', + 'mouseMoved', 'background', 'getXChange', 'getYChange', 'answerCall', + 'getResult', 'voiceCall', 'endPacket', 'constrain', 'getSocket', 'writeJSON', + 'getButton', 'available', 'connected', 'findUntil', 'readBytes', 'exitValue', + 'readGreen', 'writeBlue', 'startLoop', 'IPAddress', 'isPressed', 'sendSysex', + 'pauseMode', 'gatewayIP', 'setCursor', 'getOemKey', 'tuneWrite', 'noDisplay', + 'loadImage', 'switchPIN', 'onRequest', 'onReceive', 'changePIN', 'playFile', + 'noBuffer', 'parseInt', 'overflow', 'checkPIN', 'knobRead', 'beginTFT', + 'bitClear', 'updateIR', 'bitWrite', 'position', 'writeRGB', 'highByte', + 'writeRed', 'setSpeed', 'readBlue', 'noStroke', 'remoteIP', 'transfer', + 'shutdown', 'hangCall', 'beginSMS', 'endWrite', 'attached', 'maintain', + 'noCursor', 'checkReg', 'checkPUK', 'shiftOut', 'isValid', 'shiftIn', 'pulseIn', + 'connect', 'println', 'localIP', 'pinMode', 'getIMEI', 'display', 'noBlink', + 'process', 'getBand', 'running', 'beginSD', 'drawBMP', 'lowByte', 'setBand', + 'release', 'bitRead', 'prepare', 'pointTo', 'readRed', 'setMode', 'noFill', + 'remove', 'listen', 'stroke', 'detach', 'attach', 'noTone', 'exists', 'buffer', + 'height', 'bitSet', 'circle', 'config', 'cursor', 'random', 'IRread', 'setDNS', + 'endSMS', 'getKey', 'micros', 'millis', 'begin', 'print', 'write', 'ready', + 'flush', 'width', 'isPIN', 'blink', 'clear', 'press', 'mkdir', 'rmdir', 'close', + 'point', 'yield', 'image', 'BSSID', 'click', 'delay', 'read', 'text', 'move', + 'peek', 'beep', 'rect', 'line', 'open', 'seek', 'fill', 'size', 'turn', 'stop', + 'home', 'find', 'step', 'tone', 'sqrt', 'RSSI', 'SSID', 'end', 'bit', 'tan', + 'cos', 'sin', 'pow', 'map', 'abs', 'max', 'min', 'get', 'run', 'put', + 'isAlphaNumeric', 'isAlpha', 'isAscii', 'isWhitespace', 'isControl', 'isDigit', + 'isGraph', 'isLowerCase', 'isPrintable', 'isPunct', 'isSpace', 'isUpperCase', 'isHexadecimalDigit'} - # do not highlight + # do not highlight suppress_highlight = { - 'namespace', 'template', 'mutable', 'using', 'asm', 'typeid', - 'typename', 'this', 'alignof', 'constexpr', 'decltype', 'noexcept', + 'namespace', 'template', 'mutable', 'using', 'asm', 'typeid', + 'typename', 'this', 'alignof', 'constexpr', 'decltype', 'noexcept', 'static_assert', 'thread_local', 'restrict'} - + def get_tokens_unprocessed(self, text): for index, token, value in CppLexer.get_tokens_unprocessed(self, text): - if value in self.structure: - yield index, Name.Builtin, value - elif value in self.operators: - yield index, Operator, value - elif value in self.variables: - yield index, Keyword.Reserved, value - elif value in self.suppress_highlight: - yield index, Name, value - elif value in self.functions: - yield index, Name.Function, value + if value in self.structure: + yield index, Name.Builtin, value + elif value in self.operators: + yield index, Operator, value + elif value in self.variables: + yield index, Keyword.Reserved, value + elif value in self.suppress_highlight: + yield index, Name, value + elif value in self.functions: + yield index, Name.Function, value else: yield index, token, value - - -class CharmciLexer(CppLexer): - """ - For `Charm++ <https://charm.cs.illinois.edu>`_ interface files (.ci). - - .. versionadded:: 2.4 - """ - - name = 'Charmci' - aliases = ['charmci'] - filenames = ['*.ci'] - - mimetypes = [] - - tokens = { + + +class CharmciLexer(CppLexer): + """ + For `Charm++ <https://charm.cs.illinois.edu>`_ interface files (.ci). + + .. versionadded:: 2.4 + """ + + name = 'Charmci' + aliases = ['charmci'] + filenames = ['*.ci'] + + mimetypes = [] + + tokens = { 'keywords': [ - (r'(module)(\s+)', bygroups(Keyword, Text), 'classname'), - (words(('mainmodule', 'mainchare', 'chare', 'array', 'group', - 'nodegroup', 'message', 'conditional')), Keyword), - (words(('entry', 'aggregate', 'threaded', 'sync', 'exclusive', - 'nokeep', 'notrace', 'immediate', 'expedited', 'inline', - 'local', 'python', 'accel', 'readwrite', 'writeonly', - 'accelblock', 'memcritical', 'packed', 'varsize', - 'initproc', 'initnode', 'initcall', 'stacksize', - 'createhere', 'createhome', 'reductiontarget', 'iget', - 'nocopy', 'mutable', 'migratable', 'readonly')), Keyword), - inherit, - ], - } + (r'(module)(\s+)', bygroups(Keyword, Text), 'classname'), + (words(('mainmodule', 'mainchare', 'chare', 'array', 'group', + 'nodegroup', 'message', 'conditional')), Keyword), + (words(('entry', 'aggregate', 'threaded', 'sync', 'exclusive', + 'nokeep', 'notrace', 'immediate', 'expedited', 'inline', + 'local', 'python', 'accel', 'readwrite', 'writeonly', + 'accelblock', 'memcritical', 'packed', 'varsize', + 'initproc', 'initnode', 'initcall', 'stacksize', + 'createhere', 'createhome', 'reductiontarget', 'iget', + 'nocopy', 'mutable', 'migratable', 'readonly')), Keyword), + inherit, + ], + } class OmgIdlLexer(CLexer): diff --git a/contrib/python/Pygments/py3/pygments/lexers/capnproto.py b/contrib/python/Pygments/py3/pygments/lexers/capnproto.py index 0c7403f2a1..0363eca470 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/capnproto.py +++ b/contrib/python/Pygments/py3/pygments/lexers/capnproto.py @@ -1,78 +1,78 @@ -""" - pygments.lexers.capnproto - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for the Cap'n Proto schema language. - +""" + pygments.lexers.capnproto + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Cap'n Proto schema language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, default + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, default from pygments.token import Text, Comment, Keyword, Name, Literal, Whitespace - -__all__ = ['CapnProtoLexer'] - - -class CapnProtoLexer(RegexLexer): - """ - For `Cap'n Proto <https://capnproto.org>`_ source. - - .. versionadded:: 2.2 - """ - name = 'Cap\'n Proto' - filenames = ['*.capnp'] - aliases = ['capnp'] - - flags = re.MULTILINE | re.UNICODE - - tokens = { - 'root': [ - (r'#.*?$', Comment.Single), - (r'@[0-9a-zA-Z]*', Name.Decorator), - (r'=', Literal, 'expression'), - (r':', Name.Class, 'type'), - (r'\$', Name.Attribute, 'annotation'), - (r'(struct|enum|interface|union|import|using|const|annotation|' - r'extends|in|of|on|as|with|from|fixed)\b', - Keyword), - (r'[\w.]+', Name), + +__all__ = ['CapnProtoLexer'] + + +class CapnProtoLexer(RegexLexer): + """ + For `Cap'n Proto <https://capnproto.org>`_ source. + + .. versionadded:: 2.2 + """ + name = 'Cap\'n Proto' + filenames = ['*.capnp'] + aliases = ['capnp'] + + flags = re.MULTILINE | re.UNICODE + + tokens = { + 'root': [ + (r'#.*?$', Comment.Single), + (r'@[0-9a-zA-Z]*', Name.Decorator), + (r'=', Literal, 'expression'), + (r':', Name.Class, 'type'), + (r'\$', Name.Attribute, 'annotation'), + (r'(struct|enum|interface|union|import|using|const|annotation|' + r'extends|in|of|on|as|with|from|fixed)\b', + Keyword), + (r'[\w.]+', Name), (r'[^#@=:$\w\s]+', Text), (r'\s+', Whitespace), - ], - 'type': [ - (r'[^][=;,(){}$]+', Name.Class), - (r'[\[(]', Name.Class, 'parentype'), - default('#pop'), - ], - 'parentype': [ - (r'[^][;()]+', Name.Class), - (r'[\[(]', Name.Class, '#push'), - (r'[])]', Name.Class, '#pop'), - default('#pop'), - ], - 'expression': [ - (r'[^][;,(){}$]+', Literal), - (r'[\[(]', Literal, 'parenexp'), - default('#pop'), - ], - 'parenexp': [ - (r'[^][;()]+', Literal), - (r'[\[(]', Literal, '#push'), - (r'[])]', Literal, '#pop'), - default('#pop'), - ], - 'annotation': [ - (r'[^][;,(){}=:]+', Name.Attribute), - (r'[\[(]', Name.Attribute, 'annexp'), - default('#pop'), - ], - 'annexp': [ - (r'[^][;()]+', Name.Attribute), - (r'[\[(]', Name.Attribute, '#push'), - (r'[])]', Name.Attribute, '#pop'), - default('#pop'), - ], - } + ], + 'type': [ + (r'[^][=;,(){}$]+', Name.Class), + (r'[\[(]', Name.Class, 'parentype'), + default('#pop'), + ], + 'parentype': [ + (r'[^][;()]+', Name.Class), + (r'[\[(]', Name.Class, '#push'), + (r'[])]', Name.Class, '#pop'), + default('#pop'), + ], + 'expression': [ + (r'[^][;,(){}$]+', Literal), + (r'[\[(]', Literal, 'parenexp'), + default('#pop'), + ], + 'parenexp': [ + (r'[^][;()]+', Literal), + (r'[\[(]', Literal, '#push'), + (r'[])]', Literal, '#pop'), + default('#pop'), + ], + 'annotation': [ + (r'[^][;,(){}=:]+', Name.Attribute), + (r'[\[(]', Name.Attribute, 'annexp'), + default('#pop'), + ], + 'annexp': [ + (r'[^][;()]+', Name.Attribute), + (r'[\[(]', Name.Attribute, '#push'), + (r'[])]', Name.Attribute, '#pop'), + default('#pop'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/chapel.py b/contrib/python/Pygments/py3/pygments/lexers/chapel.py index 2d3e3f3abb..ad25981d8c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/chapel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/chapel.py @@ -121,7 +121,7 @@ class ChapelLexer(RegexLexer): (r'([a-zA-Z_][.\w$]*|' # regular function name, including secondary r'\~[a-zA-Z_][.\w$]*|' # support for legacy destructors r'[+*/!~%<>=&^|\-:]{1,2})', # operators - Name.Function, '#pop'), + Name.Function, '#pop'), # allow `proc (atomic T).foo` (r'\(', Punctuation, "receivertype"), diff --git a/contrib/python/Pygments/py3/pygments/lexers/clean.py b/contrib/python/Pygments/py3/pygments/lexers/clean.py index 11b70c5358..579cf7c30d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/clean.py +++ b/contrib/python/Pygments/py3/pygments/lexers/clean.py @@ -1,178 +1,178 @@ -""" - pygments.lexers.clean - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for the Clean language. - +""" + pygments.lexers.clean + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Clean language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - + :license: BSD, see LICENSE for details. +""" + from pygments.lexer import ExtendedRegexLexer, words, default, include, bygroups -from pygments.token import Comment, Error, Keyword, Literal, Name, Number, \ - Operator, Punctuation, String, Whitespace - -__all__ = ['CleanLexer'] - - -class CleanLexer(ExtendedRegexLexer): - """ - Lexer for the general purpose, state-of-the-art, pure and lazy functional - programming language Clean (http://clean.cs.ru.nl/Clean). - - .. versionadded: 2.2 - """ - name = 'Clean' - aliases = ['clean'] - filenames = ['*.icl', '*.dcl'] - - keywords = ( - 'case', 'ccall', 'class', 'code', 'code inline', 'derive', 'export', - 'foreign', 'generic', 'if', 'in', 'infix', 'infixl', 'infixr', - 'instance', 'let', 'of', 'otherwise', 'special', 'stdcall', 'where', - 'with') - - modulewords = ('implementation', 'definition', 'system') - +from pygments.token import Comment, Error, Keyword, Literal, Name, Number, \ + Operator, Punctuation, String, Whitespace + +__all__ = ['CleanLexer'] + + +class CleanLexer(ExtendedRegexLexer): + """ + Lexer for the general purpose, state-of-the-art, pure and lazy functional + programming language Clean (http://clean.cs.ru.nl/Clean). + + .. versionadded: 2.2 + """ + name = 'Clean' + aliases = ['clean'] + filenames = ['*.icl', '*.dcl'] + + keywords = ( + 'case', 'ccall', 'class', 'code', 'code inline', 'derive', 'export', + 'foreign', 'generic', 'if', 'in', 'infix', 'infixl', 'infixr', + 'instance', 'let', 'of', 'otherwise', 'special', 'stdcall', 'where', + 'with') + + modulewords = ('implementation', 'definition', 'system') + lowerId = r'[a-z`][\w`]*' upperId = r'[A-Z`][\w`]*' funnyId = r'[~@#$%\^?!+\-*<>\\/|&=:]+' - scoreUpperId = r'_' + upperId - scoreLowerId = r'_' + lowerId - moduleId = r'[a-zA-Z_][a-zA-Z0-9_.`]+' - classId = '|'.join([lowerId, upperId, funnyId]) - - tokens = { - 'root': [ - include('comments'), - include('keywords'), - include('module'), - include('import'), - include('whitespace'), - include('literals'), - include('operators'), - include('delimiters'), - include('names'), - ], - 'whitespace': [ - (r'\s+', Whitespace), - ], - 'comments': [ - (r'//.*\n', Comment.Single), + scoreUpperId = r'_' + upperId + scoreLowerId = r'_' + lowerId + moduleId = r'[a-zA-Z_][a-zA-Z0-9_.`]+' + classId = '|'.join([lowerId, upperId, funnyId]) + + tokens = { + 'root': [ + include('comments'), + include('keywords'), + include('module'), + include('import'), + include('whitespace'), + include('literals'), + include('operators'), + include('delimiters'), + include('names'), + ], + 'whitespace': [ + (r'\s+', Whitespace), + ], + 'comments': [ + (r'//.*\n', Comment.Single), (r'/\*', Comment.Multiline, 'comments.in'), - (r'/\*\*', Comment.Special, 'comments.in'), - ], - 'comments.in': [ + (r'/\*\*', Comment.Special, 'comments.in'), + ], + 'comments.in': [ (r'\*\/', Comment.Multiline, '#pop'), (r'/\*', Comment.Multiline, '#push'), (r'[^*/]+', Comment.Multiline), (r'\*(?!/)', Comment.Multiline), (r'/', Comment.Multiline), - ], - 'keywords': [ - (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), - ], - 'module': [ - (words(modulewords, prefix=r'\b', suffix=r'\b'), Keyword.Namespace), - (r'\bmodule\b', Keyword.Namespace, 'module.name'), - ], - 'module.name': [ - include('whitespace'), - (moduleId, Name.Class, '#pop'), - ], - 'import': [ - (r'\b(import)\b(\s*)', bygroups(Keyword, Whitespace), 'import.module'), - (r'\b(from)\b(\s*)\b(' + moduleId + r')\b(\s*)\b(import)\b', - bygroups(Keyword, Whitespace, Name.Class, Whitespace, Keyword), - 'import.what'), - ], - 'import.module': [ - (r'\b(qualified)\b(\s*)', bygroups(Keyword, Whitespace)), - (r'(\s*)\b(as)\b', bygroups(Whitespace, Keyword), ('#pop', 'import.module.as')), - (moduleId, Name.Class), - (r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace)), + ], + 'keywords': [ + (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), + ], + 'module': [ + (words(modulewords, prefix=r'\b', suffix=r'\b'), Keyword.Namespace), + (r'\bmodule\b', Keyword.Namespace, 'module.name'), + ], + 'module.name': [ + include('whitespace'), + (moduleId, Name.Class, '#pop'), + ], + 'import': [ + (r'\b(import)\b(\s*)', bygroups(Keyword, Whitespace), 'import.module'), + (r'\b(from)\b(\s*)\b(' + moduleId + r')\b(\s*)\b(import)\b', + bygroups(Keyword, Whitespace, Name.Class, Whitespace, Keyword), + 'import.what'), + ], + 'import.module': [ + (r'\b(qualified)\b(\s*)', bygroups(Keyword, Whitespace)), + (r'(\s*)\b(as)\b', bygroups(Whitespace, Keyword), ('#pop', 'import.module.as')), + (moduleId, Name.Class), + (r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace)), (r'\s+', Whitespace), default('#pop'), - ], - 'import.module.as': [ - include('whitespace'), - (lowerId, Name.Class, '#pop'), - (upperId, Name.Class, '#pop'), - ], - 'import.what': [ - (r'\b(class)\b(\s+)(' + classId + r')', - bygroups(Keyword, Whitespace, Name.Class), 'import.what.class'), - (r'\b(instance)(\s+)(' + classId + r')(\s+)', - bygroups(Keyword, Whitespace, Name.Class, Whitespace), 'import.what.instance'), - (r'(::)(\s*)\b(' + upperId + r')\b', - bygroups(Punctuation, Whitespace, Name.Class), 'import.what.type'), - (r'\b(generic)\b(\s+)\b(' + lowerId + '|' + upperId + r')\b', - bygroups(Keyword, Whitespace, Name)), - include('names'), - (r'(,)(\s+)', bygroups(Punctuation, Whitespace)), - (r'$', Whitespace, '#pop'), - include('whitespace'), - ], - 'import.what.class': [ - (r',', Punctuation, '#pop'), - (r'\(', Punctuation, 'import.what.class.members'), - (r'$', Whitespace, '#pop:2'), - include('whitespace'), - ], - 'import.what.class.members': [ - (r',', Punctuation), - (r'\.\.', Punctuation), - (r'\)', Punctuation, '#pop'), - include('names'), - ], - 'import.what.instance': [ - (r'[,)]', Punctuation, '#pop'), - (r'\(', Punctuation, 'import.what.instance'), - (r'$', Whitespace, '#pop:2'), - include('whitespace'), - include('names'), - ], - 'import.what.type': [ - (r',', Punctuation, '#pop'), - (r'[({]', Punctuation, 'import.what.type.consesandfields'), - (r'$', Whitespace, '#pop:2'), - include('whitespace'), - ], - 'import.what.type.consesandfields': [ - (r',', Punctuation), - (r'\.\.', Punctuation), - (r'[)}]', Punctuation, '#pop'), - include('names'), - ], - 'literals': [ - (r'\'([^\'\\]|\\(x[\da-fA-F]+|\d+|.))\'', Literal.Char), - (r'[+~-]?0[0-7]+\b', Number.Oct), - (r'[+~-]?\d+\.\d+(E[+-]?\d+)?', Number.Float), - (r'[+~-]?\d+\b', Number.Integer), - (r'[+~-]?0x[\da-fA-F]+\b', Number.Hex), - (r'True|False', Literal), - (r'"', String.Double, 'literals.stringd'), - ], - 'literals.stringd': [ - (r'[^\\"\n]+', String.Double), - (r'"', String.Double, '#pop'), - (r'\\.', String.Double), - (r'[$\n]', Error, '#pop'), - ], - 'operators': [ + ], + 'import.module.as': [ + include('whitespace'), + (lowerId, Name.Class, '#pop'), + (upperId, Name.Class, '#pop'), + ], + 'import.what': [ + (r'\b(class)\b(\s+)(' + classId + r')', + bygroups(Keyword, Whitespace, Name.Class), 'import.what.class'), + (r'\b(instance)(\s+)(' + classId + r')(\s+)', + bygroups(Keyword, Whitespace, Name.Class, Whitespace), 'import.what.instance'), + (r'(::)(\s*)\b(' + upperId + r')\b', + bygroups(Punctuation, Whitespace, Name.Class), 'import.what.type'), + (r'\b(generic)\b(\s+)\b(' + lowerId + '|' + upperId + r')\b', + bygroups(Keyword, Whitespace, Name)), + include('names'), + (r'(,)(\s+)', bygroups(Punctuation, Whitespace)), + (r'$', Whitespace, '#pop'), + include('whitespace'), + ], + 'import.what.class': [ + (r',', Punctuation, '#pop'), + (r'\(', Punctuation, 'import.what.class.members'), + (r'$', Whitespace, '#pop:2'), + include('whitespace'), + ], + 'import.what.class.members': [ + (r',', Punctuation), + (r'\.\.', Punctuation), + (r'\)', Punctuation, '#pop'), + include('names'), + ], + 'import.what.instance': [ + (r'[,)]', Punctuation, '#pop'), + (r'\(', Punctuation, 'import.what.instance'), + (r'$', Whitespace, '#pop:2'), + include('whitespace'), + include('names'), + ], + 'import.what.type': [ + (r',', Punctuation, '#pop'), + (r'[({]', Punctuation, 'import.what.type.consesandfields'), + (r'$', Whitespace, '#pop:2'), + include('whitespace'), + ], + 'import.what.type.consesandfields': [ + (r',', Punctuation), + (r'\.\.', Punctuation), + (r'[)}]', Punctuation, '#pop'), + include('names'), + ], + 'literals': [ + (r'\'([^\'\\]|\\(x[\da-fA-F]+|\d+|.))\'', Literal.Char), + (r'[+~-]?0[0-7]+\b', Number.Oct), + (r'[+~-]?\d+\.\d+(E[+-]?\d+)?', Number.Float), + (r'[+~-]?\d+\b', Number.Integer), + (r'[+~-]?0x[\da-fA-F]+\b', Number.Hex), + (r'True|False', Literal), + (r'"', String.Double, 'literals.stringd'), + ], + 'literals.stringd': [ + (r'[^\\"\n]+', String.Double), + (r'"', String.Double, '#pop'), + (r'\\.', String.Double), + (r'[$\n]', Error, '#pop'), + ], + 'operators': [ (r'[-~@#$%\^?!+*<>\\/|&=:.]+', Operator), - (r'\b_+\b', Operator), - ], - 'delimiters': [ - (r'[,;(){}\[\]]', Punctuation), - (r'(\')([\w`.]+)(\')', - bygroups(Punctuation, Name.Class, Punctuation)), - ], - 'names': [ - (lowerId, Name), - (scoreLowerId, Name), - (funnyId, Name.Function), - (upperId, Name.Class), - (scoreUpperId, Name.Class), - ] - } + (r'\b_+\b', Operator), + ], + 'delimiters': [ + (r'[,;(){}\[\]]', Punctuation), + (r'(\')([\w`.]+)(\')', + bygroups(Punctuation, Name.Class, Punctuation)), + ], + 'names': [ + (lowerId, Name), + (scoreLowerId, Name), + (funnyId, Name.Function), + (upperId, Name.Class), + (scoreUpperId, Name.Class), + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/compiled.py b/contrib/python/Pygments/py3/pygments/lexers/compiled.py index 2404ffc766..13aa39ce2d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/compiled.py +++ b/contrib/python/Pygments/py3/pygments/lexers/compiled.py @@ -28,6 +28,6 @@ from pygments.lexers.dylan import DylanLexer, DylanLidLexer, DylanConsoleLexer from pygments.lexers.ooc import OocLexer from pygments.lexers.felix import FelixLexer from pygments.lexers.nimrod import NimrodLexer -from pygments.lexers.crystal import CrystalLexer +from pygments.lexers.crystal import CrystalLexer __all__ = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/configs.py b/contrib/python/Pygments/py3/pygments/lexers/configs.py index 871053d607..99fab14860 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/configs.py +++ b/contrib/python/Pygments/py3/pygments/lexers/configs.py @@ -15,7 +15,7 @@ from pygments.lexer import ExtendedRegexLexer, RegexLexer, default, words, \ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Whitespace, Literal, Error, Generic from pygments.lexers.shell import BashLexer -from pygments.lexers.data import JsonLexer +from pygments.lexers.data import JsonLexer __all__ = ['IniLexer', 'RegeditLexer', 'PropertiesLexer', 'KconfigLexer', 'Cfengine3Lexer', 'ApacheConfLexer', 'SquidConfLexer', @@ -48,9 +48,9 @@ class IniLexer(RegexLexer): (r'\[.*?\]$', Keyword), (r'(.*?)([ \t]*)(=)([ \t]*)([^\t\n]*)', bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String)), - # standalone option, supported by some INI parsers - (r'(.+?)$', Name.Attribute), - ], + # standalone option, supported by some INI parsers + (r'(.+?)$', Name.Attribute), + ], } def analyse_text(text): @@ -108,8 +108,8 @@ class PropertiesLexer(RegexLexer): """ Lexer for configuration files in Java's properties format. - Note: trailing whitespace counts as part of the value as per spec - + Note: trailing whitespace counts as part of the value as per spec + .. versionadded:: 1.4 """ @@ -121,9 +121,9 @@ class PropertiesLexer(RegexLexer): tokens = { 'root': [ (r'^(\w+)([ \t])(\w+\s*)$', bygroups(Name.Attribute, Whitespace, String)), - (r'^\w+(\\[ \t]\w*)*$', Name.Attribute), + (r'^\w+(\\[ \t]\w*)*$', Name.Attribute), (r'(^ *)([#!].*)', bygroups(Whitespace, Comment)), - # More controversial comments + # More controversial comments (r'(^ *)((?:;|//).*)', bygroups(Whitespace, Comment)), (r'(.*?)([ \t]*)([=:])([ \t]*)(.*(?:(?<=\\)\n.*)*)', bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String)), @@ -471,7 +471,7 @@ class NginxConfLexer(RegexLexer): """ name = 'Nginx configuration file' aliases = ['nginx'] - filenames = ['nginx.conf'] + filenames = ['nginx.conf'] mimetypes = ['text/x-nginx-conf'] tokens = { @@ -549,7 +549,7 @@ class DockerLexer(RegexLexer): mimetypes = ['text/x-dockerfile-config'] _keywords = (r'(?:MAINTAINER|EXPOSE|WORKDIR|USER|STOPSIGNAL)') - _bash_keywords = (r'(?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY)') + _bash_keywords = (r'(?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY)') _lb = r'(?:\s*\\?\s*)' # dockerfile line break regex flags = re.IGNORECASE | re.MULTILINE @@ -568,7 +568,7 @@ class DockerLexer(RegexLexer): (r'(%s|VOLUME)\b(\s+)(.*)' % (_keywords), bygroups(Keyword, Whitespace, String)), (r'(%s)(\s+)' % (_bash_keywords,), bygroups(Keyword, Whitespace)), (r'(.*\\\n)*.+', using(BashLexer)), - ] + ] } @@ -587,7 +587,7 @@ class TerraformLexer(ExtendedRegexLexer): classes = ('backend', 'data', 'module', 'output', 'provider', 'provisioner', 'resource', 'variable') classes_re = "({})".format(('|').join(classes)) - + types = ('string', 'number', 'bool', 'list', 'tuple', 'map', 'set', 'object', 'null') numeric_functions = ('abs', 'ceil', 'floor', 'log', 'max', @@ -759,8 +759,8 @@ class TermcapLexer(RegexLexer): .. versionadded:: 2.1 """ name = 'Termcap' - aliases = ['termcap'] - filenames = ['termcap', 'termcap.src'] + aliases = ['termcap'] + filenames = ['termcap', 'termcap.src'] mimetypes = [] # NOTE: @@ -771,14 +771,14 @@ class TermcapLexer(RegexLexer): tokens = { 'root': [ (r'^#.*', Comment), - (r'^[^\s#:|]+', Name.Tag, 'names'), + (r'^[^\s#:|]+', Name.Tag, 'names'), (r'\s+', Whitespace), ], 'names': [ (r'\n', Whitespace, '#pop'), (r':', Punctuation, 'defs'), (r'\|', Punctuation), - (r'[^:|]+', Name.Attribute), + (r'[^:|]+', Name.Attribute), ], 'defs': [ (r'(\\)(\n[ \t]*)', bygroups(Text, Whitespace)), @@ -806,8 +806,8 @@ class TerminfoLexer(RegexLexer): .. versionadded:: 2.1 """ name = 'Terminfo' - aliases = ['terminfo'] - filenames = ['terminfo', 'terminfo.src'] + aliases = ['terminfo'] + filenames = ['terminfo', 'terminfo.src'] mimetypes = [] # NOTE: @@ -818,14 +818,14 @@ class TerminfoLexer(RegexLexer): tokens = { 'root': [ (r'^#.*$', Comment), - (r'^[^\s#,|]+', Name.Tag, 'names'), + (r'^[^\s#,|]+', Name.Tag, 'names'), (r'\s+', Whitespace), ], 'names': [ (r'\n', Whitespace, '#pop'), (r'(,)([ \t]*)', bygroups(Punctuation, Whitespace), 'defs'), (r'\|', Punctuation), - (r'[^,|]+', Name.Attribute), + (r'[^,|]+', Name.Attribute), ], 'defs': [ (r'\n[ \t]+', Whitespace), @@ -854,8 +854,8 @@ class PkgConfigLexer(RegexLexer): """ name = 'PkgConfig' - aliases = ['pkgconfig'] - filenames = ['*.pc'] + aliases = ['pkgconfig'] + filenames = ['*.pc'] mimetypes = [] tokens = { @@ -923,8 +923,8 @@ class PacmanConfLexer(RegexLexer): """ name = 'PacmanConf' - aliases = ['pacmanconf'] - filenames = ['pacman.conf'] + aliases = ['pacmanconf'] + filenames = ['pacman.conf'] mimetypes = [] tokens = { @@ -952,108 +952,108 @@ class PacmanConfLexer(RegexLexer): '%u', # url ), suffix=r'\b'), Name.Variable), - + # fallback (r'\s+', Whitespace), (r'.', Text), ], } - - -class AugeasLexer(RegexLexer): - """ - Lexer for `Augeas <http://augeas.net>`_. - - .. versionadded:: 2.4 - """ - name = 'Augeas' - aliases = ['augeas'] - filenames = ['*.aug'] - - tokens = { - 'root': [ + + +class AugeasLexer(RegexLexer): + """ + Lexer for `Augeas <http://augeas.net>`_. + + .. versionadded:: 2.4 + """ + name = 'Augeas' + aliases = ['augeas'] + filenames = ['*.aug'] + + tokens = { + 'root': [ (r'(module)(\s*)([^\s=]+)', bygroups(Keyword.Namespace, Whitespace, Name.Namespace)), (r'(let)(\s*)([^\s=]+)', bygroups(Keyword.Declaration, Whitespace, Name.Variable)), (r'(del|store|value|counter|seq|key|label|autoload|incl|excl|transform|test|get|put)(\s+)', bygroups(Name.Builtin, Whitespace)), - (r'(\()([^:]+)(\:)(unit|string|regexp|lens|tree|filter)(\))', bygroups(Punctuation, Name.Variable, Punctuation, Keyword.Type, Punctuation)), - (r'\(\*', Comment.Multiline, 'comment'), - (r'[*+\-.;=?|]', Operator), - (r'[()\[\]{}]', Operator), - (r'"', String.Double, 'string'), - (r'\/', String.Regex, 'regex'), - (r'([A-Z]\w*)(\.)(\w+)', bygroups(Name.Namespace, Punctuation, Name.Variable)), - (r'.', Name.Variable), + (r'(\()([^:]+)(\:)(unit|string|regexp|lens|tree|filter)(\))', bygroups(Punctuation, Name.Variable, Punctuation, Keyword.Type, Punctuation)), + (r'\(\*', Comment.Multiline, 'comment'), + (r'[*+\-.;=?|]', Operator), + (r'[()\[\]{}]', Operator), + (r'"', String.Double, 'string'), + (r'\/', String.Regex, 'regex'), + (r'([A-Z]\w*)(\.)(\w+)', bygroups(Name.Namespace, Punctuation, Name.Variable)), + (r'.', Name.Variable), (r'\s+', Whitespace), - ], - 'string': [ - (r'\\.', String.Escape), - (r'[^"]', String.Double), - (r'"', String.Double, '#pop'), - ], - 'regex': [ - (r'\\.', String.Escape), - (r'[^/]', String.Regex), - (r'\/', String.Regex, '#pop'), - ], - 'comment': [ - (r'[^*)]', Comment.Multiline), - (r'\(\*', Comment.Multiline, '#push'), - (r'\*\)', Comment.Multiline, '#pop'), - (r'[)*]', Comment.Multiline) - ], - } - - -class TOMLLexer(RegexLexer): - """ - Lexer for `TOML <https://github.com/toml-lang/toml>`_, a simple language - for config files. - - .. versionadded:: 2.4 - """ - - name = 'TOML' - aliases = ['toml'] + ], + 'string': [ + (r'\\.', String.Escape), + (r'[^"]', String.Double), + (r'"', String.Double, '#pop'), + ], + 'regex': [ + (r'\\.', String.Escape), + (r'[^/]', String.Regex), + (r'\/', String.Regex, '#pop'), + ], + 'comment': [ + (r'[^*)]', Comment.Multiline), + (r'\(\*', Comment.Multiline, '#push'), + (r'\*\)', Comment.Multiline, '#pop'), + (r'[)*]', Comment.Multiline) + ], + } + + +class TOMLLexer(RegexLexer): + """ + Lexer for `TOML <https://github.com/toml-lang/toml>`_, a simple language + for config files. + + .. versionadded:: 2.4 + """ + + name = 'TOML' + aliases = ['toml'] filenames = ['*.toml', 'Pipfile', 'poetry.lock'] - - tokens = { - 'root': [ + + tokens = { + 'root': [ # Table (r'^(\s*)(\[.*?\])$', bygroups(Whitespace, Keyword)), - - # Basics, comments, strings + + # Basics, comments, strings (r'[ \t]+', Whitespace), (r'\n', Whitespace), - (r'#.*?$', Comment.Single), - # Basic string + (r'#.*?$', Comment.Single), + # Basic string (r'"(\\\\|\\[^\\]|[^"\\])*"', String), - # Literal string - (r'\'\'\'(.*)\'\'\'', String), - (r'\'[^\']*\'', String), - (r'(true|false)$', Keyword.Constant), - (r'[a-zA-Z_][\w\-]*', Name), - - # Datetime - # TODO this needs to be expanded, as TOML is rather flexible: - # https://github.com/toml-lang/toml#offset-date-time - (r'\d{4}-\d{2}-\d{2}(?:T| )\d{2}:\d{2}:\d{2}(?:Z|[-+]\d{2}:\d{2})', Number.Integer), - - # Numbers - (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float), - (r'\d+[eE][+-]?[0-9]+j?', Number.Float), - # Handle +-inf, +-infinity, +-nan - (r'[+-]?(?:(inf(?:inity)?)|nan)', Number.Float), - (r'[+-]?\d+', Number.Integer), - - # Punctuation - (r'[]{}:(),;[]', Punctuation), - (r'\.', Punctuation), - - # Operators - (r'=', Operator) - - ] - } + # Literal string + (r'\'\'\'(.*)\'\'\'', String), + (r'\'[^\']*\'', String), + (r'(true|false)$', Keyword.Constant), + (r'[a-zA-Z_][\w\-]*', Name), + + # Datetime + # TODO this needs to be expanded, as TOML is rather flexible: + # https://github.com/toml-lang/toml#offset-date-time + (r'\d{4}-\d{2}-\d{2}(?:T| )\d{2}:\d{2}:\d{2}(?:Z|[-+]\d{2}:\d{2})', Number.Integer), + + # Numbers + (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float), + (r'\d+[eE][+-]?[0-9]+j?', Number.Float), + # Handle +-inf, +-infinity, +-nan + (r'[+-]?(?:(inf(?:inity)?)|nan)', Number.Float), + (r'[+-]?\d+', Number.Integer), + + # Punctuation + (r'[]{}:(),;[]', Punctuation), + (r'\.', Punctuation), + + # Operators + (r'=', Operator) + + ] + } class NestedTextLexer(RegexLexer): """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/crystal.py b/contrib/python/Pygments/py3/pygments/lexers/crystal.py index 1f04e2e56a..d06ab0c060 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/crystal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/crystal.py @@ -1,366 +1,366 @@ -""" - pygments.lexers.crystal - ~~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for Crystal. - +""" + pygments.lexers.crystal + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Crystal. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import ExtendedRegexLexer, include, \ + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import ExtendedRegexLexer, include, \ bygroups, default, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Error, Whitespace - -__all__ = ['CrystalLexer'] - -line_re = re.compile('.*?\n') - - -CRYSTAL_OPERATORS = [ - '!=', '!~', '!', '%', '&&', '&', '**', '*', '+', '-', '/', '<=>', '<<', '<=', '<', - '===', '==', '=~', '=', '>=', '>>', '>', '[]=', '[]?', '[]', '^', '||', '|', '~' -] - - -class CrystalLexer(ExtendedRegexLexer): - """ - For `Crystal <http://crystal-lang.org>`_ source code. - - .. versionadded:: 2.2 - """ - - name = 'Crystal' - aliases = ['cr', 'crystal'] - filenames = ['*.cr'] - mimetypes = ['text/x-crystal'] - - flags = re.DOTALL | re.MULTILINE - - def heredoc_callback(self, match, ctx): - # okay, this is the hardest part of parsing Crystal... - # match: 1 = <<-?, 2 = quote? 3 = name 4 = quote? 5 = rest of line - - start = match.start(1) - yield start, Operator, match.group(1) # <<-? - yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` - yield match.start(3), String.Delimiter, match.group(3) # heredoc name - yield match.start(4), String.Heredoc, match.group(4) # quote again - - heredocstack = ctx.__dict__.setdefault('heredocstack', []) - outermost = not bool(heredocstack) - heredocstack.append((match.group(1) == '<<-', match.group(3))) - - ctx.pos = match.start(5) - ctx.end = match.end(5) + +__all__ = ['CrystalLexer'] + +line_re = re.compile('.*?\n') + + +CRYSTAL_OPERATORS = [ + '!=', '!~', '!', '%', '&&', '&', '**', '*', '+', '-', '/', '<=>', '<<', '<=', '<', + '===', '==', '=~', '=', '>=', '>>', '>', '[]=', '[]?', '[]', '^', '||', '|', '~' +] + + +class CrystalLexer(ExtendedRegexLexer): + """ + For `Crystal <http://crystal-lang.org>`_ source code. + + .. versionadded:: 2.2 + """ + + name = 'Crystal' + aliases = ['cr', 'crystal'] + filenames = ['*.cr'] + mimetypes = ['text/x-crystal'] + + flags = re.DOTALL | re.MULTILINE + + def heredoc_callback(self, match, ctx): + # okay, this is the hardest part of parsing Crystal... + # match: 1 = <<-?, 2 = quote? 3 = name 4 = quote? 5 = rest of line + + start = match.start(1) + yield start, Operator, match.group(1) # <<-? + yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` + yield match.start(3), String.Delimiter, match.group(3) # heredoc name + yield match.start(4), String.Heredoc, match.group(4) # quote again + + heredocstack = ctx.__dict__.setdefault('heredocstack', []) + outermost = not bool(heredocstack) + heredocstack.append((match.group(1) == '<<-', match.group(3))) + + ctx.pos = match.start(5) + ctx.end = match.end(5) # this may find other heredocs, so limit the recursion depth if len(heredocstack) < 100: yield from self.get_tokens_unprocessed(context=ctx) else: yield ctx.pos, String.Heredoc, match.group(5) - ctx.pos = match.end() - - if outermost: - # this is the outer heredoc again, now we can process them all - for tolerant, hdname in heredocstack: - lines = [] - for match in line_re.finditer(ctx.text, ctx.pos): - if tolerant: - check = match.group().strip() - else: - check = match.group().rstrip() - if check == hdname: - for amatch in lines: - yield amatch.start(), String.Heredoc, amatch.group() - yield match.start(), String.Delimiter, match.group() - ctx.pos = match.end() - break - else: - lines.append(match) - else: - # end of heredoc not found -- error! - for amatch in lines: - yield amatch.start(), Error, amatch.group() - ctx.end = len(ctx.text) - del heredocstack[:] - - def gen_crystalstrings_rules(): - states = {} - states['strings'] = [ + ctx.pos = match.end() + + if outermost: + # this is the outer heredoc again, now we can process them all + for tolerant, hdname in heredocstack: + lines = [] + for match in line_re.finditer(ctx.text, ctx.pos): + if tolerant: + check = match.group().strip() + else: + check = match.group().rstrip() + if check == hdname: + for amatch in lines: + yield amatch.start(), String.Heredoc, amatch.group() + yield match.start(), String.Delimiter, match.group() + ctx.pos = match.end() + break + else: + lines.append(match) + else: + # end of heredoc not found -- error! + for amatch in lines: + yield amatch.start(), Error, amatch.group() + ctx.end = len(ctx.text) + del heredocstack[:] + + def gen_crystalstrings_rules(): + states = {} + states['strings'] = [ (r'\:\w+[!?]?', String.Symbol), (words(CRYSTAL_OPERATORS, prefix=r'\:'), String.Symbol), (r":'(\\\\|\\[^\\]|[^'\\])*'", String.Symbol), - # This allows arbitrary text after '\ for simplicity - (r"'(\\\\|\\'|[^']|\\[^'\\]+)'", String.Char), - (r':"', String.Symbol, 'simple-sym'), - # Crystal doesn't have "symbol:"s but this simplifies function args - (r'([a-zA-Z_]\w*)(:)(?!:)', bygroups(String.Symbol, Punctuation)), - (r'"', String.Double, 'simple-string'), - (r'(?<!\.)`', String.Backtick, 'simple-backtick'), - ] - - # double-quoted string and symbol - for name, ttype, end in ('string', String.Double, '"'), \ - ('sym', String.Symbol, '"'), \ - ('backtick', String.Backtick, '`'): - states['simple-'+name] = [ - include('string-escaped' if name == 'sym' else 'string-intp-escaped'), - (r'[^\\%s#]+' % end, ttype), - (r'[\\#]', ttype), - (end, ttype, '#pop'), - ] - + # This allows arbitrary text after '\ for simplicity + (r"'(\\\\|\\'|[^']|\\[^'\\]+)'", String.Char), + (r':"', String.Symbol, 'simple-sym'), + # Crystal doesn't have "symbol:"s but this simplifies function args + (r'([a-zA-Z_]\w*)(:)(?!:)', bygroups(String.Symbol, Punctuation)), + (r'"', String.Double, 'simple-string'), + (r'(?<!\.)`', String.Backtick, 'simple-backtick'), + ] + + # double-quoted string and symbol + for name, ttype, end in ('string', String.Double, '"'), \ + ('sym', String.Symbol, '"'), \ + ('backtick', String.Backtick, '`'): + states['simple-'+name] = [ + include('string-escaped' if name == 'sym' else 'string-intp-escaped'), + (r'[^\\%s#]+' % end, ttype), + (r'[\\#]', ttype), + (end, ttype, '#pop'), + ] + # https://crystal-lang.org/docs/syntax_and_semantics/literals/string.html#percent-string-literals - for lbrace, rbrace, bracecc, name in \ - ('\\{', '\\}', '{}', 'cb'), \ - ('\\[', '\\]', '\\[\\]', 'sb'), \ - ('\\(', '\\)', '()', 'pa'), \ + for lbrace, rbrace, bracecc, name in \ + ('\\{', '\\}', '{}', 'cb'), \ + ('\\[', '\\]', '\\[\\]', 'sb'), \ + ('\\(', '\\)', '()', 'pa'), \ ('<', '>', '<>', 'ab'), \ ('\\|', '\\|', '\\|', 'pi'): - states[name+'-intp-string'] = [ + states[name+'-intp-string'] = [ (r'\\' + lbrace, String.Other), ] + (lbrace != rbrace) * [ - (lbrace, String.Other, '#push'), + (lbrace, String.Other, '#push'), ] + [ - (rbrace, String.Other, '#pop'), - include('string-intp-escaped'), - (r'[\\#' + bracecc + ']', String.Other), - (r'[^\\#' + bracecc + ']+', String.Other), - ] + (rbrace, String.Other, '#pop'), + include('string-intp-escaped'), + (r'[\\#' + bracecc + ']', String.Other), + (r'[^\\#' + bracecc + ']+', String.Other), + ] states['strings'].append((r'%Q?' + lbrace, String.Other, - name+'-intp-string')) - states[name+'-string'] = [ - (r'\\[\\' + bracecc + ']', String.Other), + name+'-intp-string')) + states[name+'-string'] = [ + (r'\\[\\' + bracecc + ']', String.Other), ] + (lbrace != rbrace) * [ - (lbrace, String.Other, '#push'), + (lbrace, String.Other, '#push'), ] + [ - (rbrace, String.Other, '#pop'), - (r'[\\#' + bracecc + ']', String.Other), - (r'[^\\#' + bracecc + ']+', String.Other), - ] + (rbrace, String.Other, '#pop'), + (r'[\\#' + bracecc + ']', String.Other), + (r'[^\\#' + bracecc + ']+', String.Other), + ] # https://crystal-lang.org/docs/syntax_and_semantics/literals/array.html#percent-array-literals states['strings'].append((r'%[qwi]' + lbrace, String.Other, - name+'-string')) - states[name+'-regex'] = [ - (r'\\[\\' + bracecc + ']', String.Regex), + name+'-string')) + states[name+'-regex'] = [ + (r'\\[\\' + bracecc + ']', String.Regex), ] + (lbrace != rbrace) * [ - (lbrace, String.Regex, '#push'), + (lbrace, String.Regex, '#push'), ] + [ - (rbrace + '[imsx]*', String.Regex, '#pop'), - include('string-intp'), - (r'[\\#' + bracecc + ']', String.Regex), - (r'[^\\#' + bracecc + ']+', String.Regex), - ] - states['strings'].append((r'%r' + lbrace, String.Regex, - name+'-regex')) - - return states - - tokens = { - 'root': [ - (r'#.*?$', Comment.Single), - # keywords - (words(''' + (rbrace + '[imsx]*', String.Regex, '#pop'), + include('string-intp'), + (r'[\\#' + bracecc + ']', String.Regex), + (r'[^\\#' + bracecc + ']+', String.Regex), + ] + states['strings'].append((r'%r' + lbrace, String.Regex, + name+'-regex')) + + return states + + tokens = { + 'root': [ + (r'#.*?$', Comment.Single), + # keywords + (words(''' abstract asm begin break case do else elsif end ensure extend if in include next of private protected require rescue return select self super then unless until when while with yield - '''.split(), suffix=r'\b'), Keyword), + '''.split(), suffix=r'\b'), Keyword), (words(''' previous_def forall out uninitialized __DIR__ __FILE__ __LINE__ __END_LINE__ '''.split(), prefix=r'(?<!\.)', suffix=r'\b'), Keyword.Pseudo), # https://crystal-lang.org/docs/syntax_and_semantics/is_a.html (r'\.(is_a\?|nil\?|responds_to\?|as\?|as\b)', Keyword.Pseudo), - (words(['true', 'false', 'nil'], suffix=r'\b'), Keyword.Constant), - # start of function, class and module names - (r'(module|lib)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', + (words(['true', 'false', 'nil'], suffix=r'\b'), Keyword.Constant), + # start of function, class and module names + (r'(module|lib)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', bygroups(Keyword, Whitespace, Name.Namespace)), - (r'(def|fun|macro)(\s+)((?:[a-zA-Z_]\w*::)*)', + (r'(def|fun|macro)(\s+)((?:[a-zA-Z_]\w*::)*)', bygroups(Keyword, Whitespace, Name.Namespace), 'funcname'), - (r'def(?=[*%&^`~+-/\[<>=])', Keyword, 'funcname'), + (r'def(?=[*%&^`~+-/\[<>=])', Keyword, 'funcname'), (r'(annotation|class|struct|union|type|alias|enum)(\s+)((?:[a-zA-Z_]\w*::)*)', bygroups(Keyword, Whitespace, Name.Namespace), 'classname'), # https://crystal-lang.org/api/toplevel.html (words(''' instance_sizeof offsetof pointerof sizeof typeof '''.split(), prefix=r'(?<!\.)', suffix=r'\b'), Keyword.Pseudo), - # macros + # macros (r'(?<!\.)(debugger\b|p!|pp!|record\b|spawn\b)', Name.Builtin.Pseudo), - # builtins - (words(''' + # builtins + (words(''' abort at_exit caller exit gets loop main p pp print printf puts raise rand read_line sleep spawn sprintf system - '''.split(), prefix=r'(?<!\.)', suffix=r'\b'), Name.Builtin), + '''.split(), prefix=r'(?<!\.)', suffix=r'\b'), Name.Builtin), # https://crystal-lang.org/api/Object.html#macro-summary (r'(?<!\.)(((class_)?((getter|property)\b[!?]?|setter\b))|' r'(def_(clone|equals|equals_and_hash|hash)|delegate|forward_missing_to)\b)', Name.Builtin.Pseudo), - # normal heredocs - (r'(?<!\w)(<<-?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)', - heredoc_callback), - # empty string heredocs - (r'(<<-?)("|\')()(\2)(.*?\n)', heredoc_callback), - (r'__END__', Comment.Preproc, 'end-part'), - # multiline regex (after keywords or assignments) - (r'(?:^|(?<=[=<>~!:])|' - r'(?<=(?:\s|;)when\s)|' - r'(?<=(?:\s|;)or\s)|' - r'(?<=(?:\s|;)and\s)|' - r'(?<=\.index\s)|' - r'(?<=\.scan\s)|' - r'(?<=\.sub\s)|' - r'(?<=\.sub!\s)|' - r'(?<=\.gsub\s)|' - r'(?<=\.gsub!\s)|' - r'(?<=\.match\s)|' - r'(?<=(?:\s|;)if\s)|' - r'(?<=(?:\s|;)elsif\s)|' - r'(?<=^when\s)|' - r'(?<=^index\s)|' - r'(?<=^scan\s)|' - r'(?<=^sub\s)|' - r'(?<=^gsub\s)|' - r'(?<=^sub!\s)|' - r'(?<=^gsub!\s)|' - r'(?<=^match\s)|' - r'(?<=^if\s)|' - r'(?<=^elsif\s)' + # normal heredocs + (r'(?<!\w)(<<-?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)', + heredoc_callback), + # empty string heredocs + (r'(<<-?)("|\')()(\2)(.*?\n)', heredoc_callback), + (r'__END__', Comment.Preproc, 'end-part'), + # multiline regex (after keywords or assignments) + (r'(?:^|(?<=[=<>~!:])|' + r'(?<=(?:\s|;)when\s)|' + r'(?<=(?:\s|;)or\s)|' + r'(?<=(?:\s|;)and\s)|' + r'(?<=\.index\s)|' + r'(?<=\.scan\s)|' + r'(?<=\.sub\s)|' + r'(?<=\.sub!\s)|' + r'(?<=\.gsub\s)|' + r'(?<=\.gsub!\s)|' + r'(?<=\.match\s)|' + r'(?<=(?:\s|;)if\s)|' + r'(?<=(?:\s|;)elsif\s)|' + r'(?<=^when\s)|' + r'(?<=^index\s)|' + r'(?<=^scan\s)|' + r'(?<=^sub\s)|' + r'(?<=^gsub\s)|' + r'(?<=^sub!\s)|' + r'(?<=^gsub!\s)|' + r'(?<=^match\s)|' + r'(?<=^if\s)|' + r'(?<=^elsif\s)' r')(\s*)(/)', bygroups(Whitespace, String.Regex), 'multiline-regex'), - # multiline regex (in method calls or subscripts) - (r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'), - # multiline regex (this time the funny no whitespace rule) + # multiline regex (in method calls or subscripts) + (r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'), + # multiline regex (this time the funny no whitespace rule) (r'(\s+)(/)(?![\s=])', bygroups(Whitespace, String.Regex), - 'multiline-regex'), - # lex numbers and ignore following regular expressions which - # are division operators in fact (grrrr. i hate that. any - # better ideas?) - # since pygments 0.7 we also eat a "?" operator after numbers - # so that the char operator does not work. Chars are not allowed - # there so that you can use the ternary operator. - # stupid example: - # x>=0?n[x]:"" - (r'(0o[0-7]+(?:_[0-7]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + 'multiline-regex'), + # lex numbers and ignore following regular expressions which + # are division operators in fact (grrrr. i hate that. any + # better ideas?) + # since pygments 0.7 we also eat a "?" operator after numbers + # so that the char operator does not work. Chars are not allowed + # there so that you can use the ternary operator. + # stupid example: + # x>=0?n[x]:"" + (r'(0o[0-7]+(?:_[0-7]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', bygroups(Number.Oct, Whitespace, Operator)), - (r'(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + (r'(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', bygroups(Number.Hex, Whitespace, Operator)), - (r'(0b[01]+(?:_[01]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + (r'(0b[01]+(?:_[01]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', bygroups(Number.Bin, Whitespace, Operator)), - # 3 separate expressions for floats because any of the 3 optional - # parts makes it a float - (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)(?:e[+-]?[0-9]+)?' - r'(?:_?f[0-9]+)?)(\s*)([/?])?', + # 3 separate expressions for floats because any of the 3 optional + # parts makes it a float + (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)(?:e[+-]?[0-9]+)?' + r'(?:_?f[0-9]+)?)(\s*)([/?])?', bygroups(Number.Float, Whitespace, Operator)), - (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)' - r'(?:_?f[0-9]+)?)(\s*)([/?])?', + (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)' + r'(?:_?f[0-9]+)?)(\s*)([/?])?', bygroups(Number.Float, Whitespace, Operator)), - (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)?' - r'(?:_?f[0-9]+))(\s*)([/?])?', + (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)?' + r'(?:_?f[0-9]+))(\s*)([/?])?', bygroups(Number.Float, Whitespace, Operator)), - (r'(0\b|[1-9][\d]*(?:_\d+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + (r'(0\b|[1-9][\d]*(?:_\d+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', bygroups(Number.Integer, Whitespace, Operator)), - # Names - (r'@@[a-zA-Z_]\w*', Name.Variable.Class), - (r'@[a-zA-Z_]\w*', Name.Variable.Instance), - (r'\$\w+', Name.Variable.Global), - (r'\$[!@&`\'+~=/\\,;.<>_*$?:"^-]', Name.Variable.Global), - (r'\$-[0adFiIlpvw]', Name.Variable.Global), - (r'::', Operator), - include('strings'), + # Names + (r'@@[a-zA-Z_]\w*', Name.Variable.Class), + (r'@[a-zA-Z_]\w*', Name.Variable.Instance), + (r'\$\w+', Name.Variable.Global), + (r'\$[!@&`\'+~=/\\,;.<>_*$?:"^-]', Name.Variable.Global), + (r'\$-[0adFiIlpvw]', Name.Variable.Global), + (r'::', Operator), + include('strings'), # https://crystal-lang.org/reference/syntax_and_semantics/literals/char.html - (r'\?(\\[MC]-)*' # modifiers + (r'\?(\\[MC]-)*' # modifiers r'(\\([\\abefnrtv#"\']|[0-7]{1,3}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u\{[a-fA-F0-9 ]+\})|\S)' - r'(?!\w)', - String.Char), + r'(?!\w)', + String.Char), (r'[A-Z][A-Z_]+\b(?!::|\.)', Name.Constant), - # macro expansion - (r'\{%', String.Interpol, 'in-macro-control'), - (r'\{\{', String.Interpol, 'in-macro-expr'), + # macro expansion + (r'\{%', String.Interpol, 'in-macro-control'), + (r'\{\{', String.Interpol, 'in-macro-expr'), # annotations (r'(@\[)(\s*)([A-Z]\w*(::[A-Z]\w*)*)', bygroups(Operator, Whitespace, Name.Decorator), 'in-annot'), - # this is needed because Crystal attributes can look - # like keywords (class) or like this: ` ?!? - (words(CRYSTAL_OPERATORS, prefix=r'(\.|::)'), - bygroups(Operator, Name.Operator)), - (r'(\.|::)([a-zA-Z_]\w*[!?]?|[*%&^`~+\-/\[<>=])', - bygroups(Operator, Name)), - # Names can end with [!?] unless it's "!=" - (r'[a-zA-Z_]\w*(?:[!?](?!=))?', Name), - (r'(\[|\]\??|\*\*|<=>?|>=|<<?|>>?|=~|===|' - r'!~|&&?|\|\||\.{1,3})', Operator), - (r'[-+/*%=<>&!^|~]=?', Operator), - (r'[(){};,/?:\\]', Punctuation), + # this is needed because Crystal attributes can look + # like keywords (class) or like this: ` ?!? + (words(CRYSTAL_OPERATORS, prefix=r'(\.|::)'), + bygroups(Operator, Name.Operator)), + (r'(\.|::)([a-zA-Z_]\w*[!?]?|[*%&^`~+\-/\[<>=])', + bygroups(Operator, Name)), + # Names can end with [!?] unless it's "!=" + (r'[a-zA-Z_]\w*(?:[!?](?!=))?', Name), + (r'(\[|\]\??|\*\*|<=>?|>=|<<?|>>?|=~|===|' + r'!~|&&?|\|\||\.{1,3})', Operator), + (r'[-+/*%=<>&!^|~]=?', Operator), + (r'[(){};,/?:\\]', Punctuation), (r'\s+', Whitespace) - ], - 'funcname': [ - (r'(?:([a-zA-Z_]\w*)(\.))?' - r'([a-zA-Z_]\w*[!?]?|\*\*?|[-+]@?|' - r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)', - bygroups(Name.Class, Operator, Name.Function), '#pop'), - default('#pop') - ], - 'classname': [ - (r'[A-Z_]\w*', Name.Class), - (r'(\()(\s*)([A-Z_]\w*)(\s*)(\))', + ], + 'funcname': [ + (r'(?:([a-zA-Z_]\w*)(\.))?' + r'([a-zA-Z_]\w*[!?]?|\*\*?|[-+]@?|' + r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)', + bygroups(Name.Class, Operator, Name.Function), '#pop'), + default('#pop') + ], + 'classname': [ + (r'[A-Z_]\w*', Name.Class), + (r'(\()(\s*)([A-Z_]\w*)(\s*)(\))', bygroups(Punctuation, Whitespace, Name.Class, Whitespace, Punctuation)), - default('#pop') - ], - 'in-intp': [ - (r'\{', String.Interpol, '#push'), - (r'\}', String.Interpol, '#pop'), - include('root'), - ], - 'string-intp': [ - (r'#\{', String.Interpol, 'in-intp'), - ], - 'string-escaped': [ + default('#pop') + ], + 'in-intp': [ + (r'\{', String.Interpol, '#push'), + (r'\}', String.Interpol, '#pop'), + include('root'), + ], + 'string-intp': [ + (r'#\{', String.Interpol, 'in-intp'), + ], + 'string-escaped': [ # https://crystal-lang.org/reference/syntax_and_semantics/literals/string.html (r'\\([\\abefnrtv#"\']|[0-7]{1,3}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u\{[a-fA-F0-9 ]+\})', String.Escape) - ], - 'string-intp-escaped': [ - include('string-intp'), - include('string-escaped'), - ], - 'interpolated-regex': [ - include('string-intp'), - (r'[\\#]', String.Regex), - (r'[^\\#]+', String.Regex), - ], - 'interpolated-string': [ - include('string-intp'), - (r'[\\#]', String.Other), - (r'[^\\#]+', String.Other), - ], - 'multiline-regex': [ - include('string-intp'), - (r'\\\\', String.Regex), - (r'\\/', String.Regex), - (r'[\\#]', String.Regex), - (r'[^\\/#]+', String.Regex), - (r'/[imsx]*', String.Regex, '#pop'), - ], - 'end-part': [ - (r'.+', Comment.Preproc, '#pop') - ], - 'in-macro-control': [ - (r'\{%', String.Interpol, '#push'), - (r'%\}', String.Interpol, '#pop'), + ], + 'string-intp-escaped': [ + include('string-intp'), + include('string-escaped'), + ], + 'interpolated-regex': [ + include('string-intp'), + (r'[\\#]', String.Regex), + (r'[^\\#]+', String.Regex), + ], + 'interpolated-string': [ + include('string-intp'), + (r'[\\#]', String.Other), + (r'[^\\#]+', String.Other), + ], + 'multiline-regex': [ + include('string-intp'), + (r'\\\\', String.Regex), + (r'\\/', String.Regex), + (r'[\\#]', String.Regex), + (r'[^\\/#]+', String.Regex), + (r'/[imsx]*', String.Regex, '#pop'), + ], + 'end-part': [ + (r'.+', Comment.Preproc, '#pop') + ], + 'in-macro-control': [ + (r'\{%', String.Interpol, '#push'), + (r'%\}', String.Interpol, '#pop'), (r'(for|verbatim)\b', Keyword), - include('root'), - ], - 'in-macro-expr': [ - (r'\{\{', String.Interpol, '#push'), - (r'\}\}', String.Interpol, '#pop'), - include('root'), - ], + include('root'), + ], + 'in-macro-expr': [ + (r'\{\{', String.Interpol, '#push'), + (r'\}\}', String.Interpol, '#pop'), + include('root'), + ], 'in-annot': [ - (r'\[', Operator, '#push'), - (r'\]', Operator, '#pop'), - include('root'), - ], - } - tokens.update(gen_crystalstrings_rules()) + (r'\[', Operator, '#push'), + (r'\]', Operator, '#pop'), + include('root'), + ], + } + tokens.update(gen_crystalstrings_rules()) diff --git a/contrib/python/Pygments/py3/pygments/lexers/csound.py b/contrib/python/Pygments/py3/pygments/lexers/csound.py index 80cf63d9c5..a871de8d72 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/csound.py +++ b/contrib/python/Pygments/py3/pygments/lexers/csound.py @@ -2,17 +2,17 @@ pygments.lexers.csound ~~~~~~~~~~~~~~~~~~~~~~ - Lexers for Csound languages. + Lexers for Csound languages. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ -import re +import re from pygments.lexer import RegexLexer, bygroups, default, include, using, words -from pygments.token import Comment, Error, Keyword, Name, Number, Operator, Punctuation, \ - String, Text, Whitespace +from pygments.token import Comment, Error, Keyword, Name, Number, Operator, Punctuation, \ + String, Text, Whitespace from pygments.lexers._csound_builtins import OPCODES, DEPRECATED_OPCODES, REMOVED_OPCODES from pygments.lexers.html import HtmlLexer from pygments.lexers.python import PythonLexer @@ -20,104 +20,104 @@ from pygments.lexers.scripting import LuaLexer __all__ = ['CsoundScoreLexer', 'CsoundOrchestraLexer', 'CsoundDocumentLexer'] -newline = (r'((?:(?:;|//).*)*)(\n)', bygroups(Comment.Single, Text)) +newline = (r'((?:(?:;|//).*)*)(\n)', bygroups(Comment.Single, Text)) class CsoundLexer(RegexLexer): tokens = { 'whitespace': [ (r'[ \t]+', Whitespace), - (r'/[*](?:.|\n)*?[*]/', Comment.Multiline), - (r'(?:;|//).*$', Comment.Single), + (r'/[*](?:.|\n)*?[*]/', Comment.Multiline), + (r'(?:;|//).*$', Comment.Single), (r'(\\)(\n)', bygroups(Text, Whitespace)) ], - 'preprocessor directives': [ - (r'#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+', Comment.Preproc), + 'preprocessor directives': [ + (r'#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+', Comment.Preproc), (r'#includestr', Comment.Preproc, 'includestr directive'), - (r'#include', Comment.Preproc, 'include directive'), - (r'#[ \t]*define', Comment.Preproc, 'define directive'), - (r'#(?:ifn?def|undef)\b', Comment.Preproc, 'macro directive') + (r'#include', Comment.Preproc, 'include directive'), + (r'#[ \t]*define', Comment.Preproc, 'define directive'), + (r'#(?:ifn?def|undef)\b', Comment.Preproc, 'macro directive') ], - 'include directive': [ + 'include directive': [ include('whitespace'), - (r'([^ \t]).*?\1', String, '#pop') + (r'([^ \t]).*?\1', String, '#pop') ], 'includestr directive': [ include('whitespace'), (r'"', String, ('#pop', 'quoted string')) ], - 'define directive': [ + 'define directive': [ (r'\n', Whitespace), - include('whitespace'), - (r'([A-Z_a-z]\w*)(\()', bygroups(Comment.Preproc, Punctuation), - ('#pop', 'macro parameter name list')), - (r'[A-Z_a-z]\w*', Comment.Preproc, ('#pop', 'before macro body')) + include('whitespace'), + (r'([A-Z_a-z]\w*)(\()', bygroups(Comment.Preproc, Punctuation), + ('#pop', 'macro parameter name list')), + (r'[A-Z_a-z]\w*', Comment.Preproc, ('#pop', 'before macro body')) ], - 'macro parameter name list': [ + 'macro parameter name list': [ include('whitespace'), - (r'[A-Z_a-z]\w*', Comment.Preproc), - (r"['#]", Punctuation), - (r'\)', Punctuation, ('#pop', 'before macro body')) + (r'[A-Z_a-z]\w*', Comment.Preproc), + (r"['#]", Punctuation), + (r'\)', Punctuation, ('#pop', 'before macro body')) ], - 'before macro body': [ + 'before macro body': [ (r'\n', Whitespace), include('whitespace'), - (r'#', Punctuation, ('#pop', 'macro body')) - ], - 'macro body': [ - (r'(?:\\(?!#)|[^#\\]|\n)+', Comment.Preproc), - (r'\\#', Comment.Preproc), - (r'(?<!\\)#', Punctuation, '#pop') - ], - - 'macro directive': [ + (r'#', Punctuation, ('#pop', 'macro body')) + ], + 'macro body': [ + (r'(?:\\(?!#)|[^#\\]|\n)+', Comment.Preproc), + (r'\\#', Comment.Preproc), + (r'(?<!\\)#', Punctuation, '#pop') + ], + + 'macro directive': [ include('whitespace'), - (r'[A-Z_a-z]\w*', Comment.Preproc, '#pop') - ], - - 'macro uses': [ - (r'(\$[A-Z_a-z]\w*\.?)(\()', bygroups(Comment.Preproc, Punctuation), - 'macro parameter value list'), - (r'\$[A-Z_a-z]\w*(?:\.|\b)', Comment.Preproc) - ], - 'macro parameter value list': [ - (r'(?:[^\'#"{()]|\{(?!\{))+', Comment.Preproc), - (r"['#]", Punctuation), - (r'"', String, 'macro parameter value quoted string'), - (r'\{\{', String, 'macro parameter value braced string'), - (r'\(', Comment.Preproc, 'macro parameter value parenthetical'), - (r'\)', Punctuation, '#pop') - ], - 'macro parameter value quoted string': [ - (r"\\[#'()]", Comment.Preproc), - (r"[#'()]", Error), - include('quoted string') - ], - 'macro parameter value braced string': [ - (r"\\[#'()]", Comment.Preproc), - (r"[#'()]", Error), - include('braced string') - ], - 'macro parameter value parenthetical': [ - (r'(?:[^\\()]|\\\))+', Comment.Preproc), - (r'\(', Comment.Preproc, '#push'), - (r'\)', Comment.Preproc, '#pop') - ], - - 'whitespace and macro uses': [ - include('whitespace'), - include('macro uses') - ], - - 'numbers': [ - (r'\d+[Ee][+-]?\d+|(\d+\.\d*|\d*\.\d+)([Ee][+-]?\d+)?', Number.Float), - (r'(0[Xx])([0-9A-Fa-f]+)', bygroups(Keyword.Type, Number.Hex)), - (r'\d+', Number.Integer) - ], - + (r'[A-Z_a-z]\w*', Comment.Preproc, '#pop') + ], + + 'macro uses': [ + (r'(\$[A-Z_a-z]\w*\.?)(\()', bygroups(Comment.Preproc, Punctuation), + 'macro parameter value list'), + (r'\$[A-Z_a-z]\w*(?:\.|\b)', Comment.Preproc) + ], + 'macro parameter value list': [ + (r'(?:[^\'#"{()]|\{(?!\{))+', Comment.Preproc), + (r"['#]", Punctuation), + (r'"', String, 'macro parameter value quoted string'), + (r'\{\{', String, 'macro parameter value braced string'), + (r'\(', Comment.Preproc, 'macro parameter value parenthetical'), + (r'\)', Punctuation, '#pop') + ], + 'macro parameter value quoted string': [ + (r"\\[#'()]", Comment.Preproc), + (r"[#'()]", Error), + include('quoted string') + ], + 'macro parameter value braced string': [ + (r"\\[#'()]", Comment.Preproc), + (r"[#'()]", Error), + include('braced string') + ], + 'macro parameter value parenthetical': [ + (r'(?:[^\\()]|\\\))+', Comment.Preproc), + (r'\(', Comment.Preproc, '#push'), + (r'\)', Comment.Preproc, '#pop') + ], + + 'whitespace and macro uses': [ + include('whitespace'), + include('macro uses') + ], + + 'numbers': [ + (r'\d+[Ee][+-]?\d+|(\d+\.\d*|\d*\.\d+)([Ee][+-]?\d+)?', Number.Float), + (r'(0[Xx])([0-9A-Fa-f]+)', bygroups(Keyword.Type, Number.Hex)), + (r'\d+', Number.Integer) + ], + 'quoted string': [ (r'"', String, '#pop'), (r'[^"$]+', String), @@ -125,8 +125,8 @@ class CsoundLexer(RegexLexer): (r'[$]', String) ], - 'braced string': [ - # Do nothing. This must be defined in subclasses. + 'braced string': [ + # Do nothing. This must be defined in subclasses. ] } @@ -143,56 +143,56 @@ class CsoundScoreLexer(CsoundLexer): filenames = ['*.sco'] tokens = { - 'root': [ + 'root': [ (r'\n', Whitespace), - include('whitespace and macro uses'), + include('whitespace and macro uses'), include('preprocessor directives'), - + (r'[aBbCdefiqstvxy]', Keyword), - # There is also a w statement that is generated internally and should not be - # used; see https://github.com/csound/csound/issues/750. - - (r'z', Keyword.Constant), - # z is a constant equal to 800,000,000,000. 800 billion seconds is about - # 25,367.8 years. See also + # There is also a w statement that is generated internally and should not be + # used; see https://github.com/csound/csound/issues/750. + + (r'z', Keyword.Constant), + # z is a constant equal to 800,000,000,000. 800 billion seconds is about + # 25,367.8 years. See also # https://csound.com/docs/manual/ScoreTop.html and - # https://github.com/csound/csound/search?q=stof+path%3AEngine+filename%3Asread.c. - - (r'([nNpP][pP])(\d+)', bygroups(Keyword, Number.Integer)), - - (r'[mn]', Keyword, 'mark statement'), - - include('numbers'), - (r'[!+\-*/^%&|<>#~.]', Operator), - (r'[()\[\]]', Punctuation), - (r'"', String, 'quoted string'), - (r'\{', Comment.Preproc, 'loop after left brace'), - ], - - 'mark statement': [ - include('whitespace and macro uses'), - (r'[A-Z_a-z]\w*', Name.Label), + # https://github.com/csound/csound/search?q=stof+path%3AEngine+filename%3Asread.c. + + (r'([nNpP][pP])(\d+)', bygroups(Keyword, Number.Integer)), + + (r'[mn]', Keyword, 'mark statement'), + + include('numbers'), + (r'[!+\-*/^%&|<>#~.]', Operator), + (r'[()\[\]]', Punctuation), + (r'"', String, 'quoted string'), + (r'\{', Comment.Preproc, 'loop after left brace'), + ], + + 'mark statement': [ + include('whitespace and macro uses'), + (r'[A-Z_a-z]\w*', Name.Label), (r'\n', Whitespace, '#pop') ], - 'loop after left brace': [ - include('whitespace and macro uses'), - (r'\d+', Number.Integer, ('#pop', 'loop after repeat count')), - ], - 'loop after repeat count': [ - include('whitespace and macro uses'), - (r'[A-Z_a-z]\w*', Comment.Preproc, ('#pop', 'loop')) - ], - 'loop': [ - (r'\}', Comment.Preproc, '#pop'), - include('root') - ], - + 'loop after left brace': [ + include('whitespace and macro uses'), + (r'\d+', Number.Integer, ('#pop', 'loop after repeat count')), + ], + 'loop after repeat count': [ + include('whitespace and macro uses'), + (r'[A-Z_a-z]\w*', Comment.Preproc, ('#pop', 'loop')) + ], + 'loop': [ + (r'\}', Comment.Preproc, '#pop'), + include('root') + ], + # Braced strings are not allowed in Csound scores, but this is needed because the # superclass includes it. - 'braced string': [ - (r'\}\}', String, '#pop'), - (r'[^}]|\}(?!\})', String) + 'braced string': [ + (r'\}\}', String, '#pop'), + (r'[^}]|\}(?!\})', String) ] } @@ -206,7 +206,7 @@ class CsoundOrchestraLexer(CsoundLexer): name = 'Csound Orchestra' aliases = ['csound', 'csound-orc'] - filenames = ['*.orc', '*.udo'] + filenames = ['*.orc', '*.udo'] user_defined_opcodes = set() @@ -218,7 +218,7 @@ class CsoundOrchestraLexer(CsoundLexer): def name_callback(lexer, match): type_annotation_token = Keyword.Type - name = match.group(1) + name = match.group(1) if name in OPCODES or name in DEPRECATED_OPCODES or name in REMOVED_OPCODES: yield match.start(), Name.Builtin, name elif name in lexer.user_defined_opcodes: @@ -235,100 +235,100 @@ class CsoundOrchestraLexer(CsoundLexer): if match.group(2): yield match.start(2), Punctuation, match.group(2) yield match.start(3), type_annotation_token, match.group(3) - + tokens = { - 'root': [ + 'root': [ (r'\n', Whitespace), - + (r'^([ \t]*)(\w+)(:)([ \t]+|$)', bygroups(Whitespace, Name.Label, Punctuation, Whitespace)), - - include('whitespace and macro uses'), - include('preprocessor directives'), - - (r'\binstr\b', Keyword.Declaration, 'instrument numbers and identifiers'), - (r'\bopcode\b', Keyword.Declaration, 'after opcode keyword'), - (r'\b(?:end(?:in|op))\b', Keyword.Declaration), - - include('partial statements') - ], - - 'partial statements': [ - (r'\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b', Name.Variable.Global), - - include('numbers'), - - (r'\+=|-=|\*=|/=|<<|>>|<=|>=|==|!=|&&|\|\||[~¬]|[=!+\-*/^%&|<>#?:]', Operator), - (r'[(),\[\]]', Punctuation), - - (r'"', String, 'quoted string'), - (r'\{\{', String, 'braced string'), - + + include('whitespace and macro uses'), + include('preprocessor directives'), + + (r'\binstr\b', Keyword.Declaration, 'instrument numbers and identifiers'), + (r'\bopcode\b', Keyword.Declaration, 'after opcode keyword'), + (r'\b(?:end(?:in|op))\b', Keyword.Declaration), + + include('partial statements') + ], + + 'partial statements': [ + (r'\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b', Name.Variable.Global), + + include('numbers'), + + (r'\+=|-=|\*=|/=|<<|>>|<=|>=|==|!=|&&|\|\||[~¬]|[=!+\-*/^%&|<>#?:]', Operator), + (r'[(),\[\]]', Punctuation), + + (r'"', String, 'quoted string'), + (r'\{\{', String, 'braced string'), + (words(( 'do', 'else', 'elseif', 'endif', 'enduntil', 'fi', 'if', 'ithen', 'kthen', 'od', 'then', 'until', 'while', ), prefix=r'\b', suffix=r'\b'), Keyword), - (words(('return', 'rireturn'), prefix=r'\b', suffix=r'\b'), Keyword.Pseudo), - - (r'\b[ik]?goto\b', Keyword, 'goto label'), - (r'\b(r(?:einit|igoto)|tigoto)(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), - 'goto label'), - (r'\b(c(?:g|in?|k|nk?)goto)(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), - ('goto label', 'goto argument')), - (r'\b(timout)(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), - ('goto label', 'goto argument', 'goto argument')), - (r'\b(loop_[gl][et])(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), - ('goto label', 'goto argument', 'goto argument', 'goto argument')), - - (r'\bprintk?s\b', Name.Builtin, 'prints opcode'), - (r'\b(?:readscore|scoreline(?:_i)?)\b', Name.Builtin, 'Csound score opcode'), - (r'\bpyl?run[it]?\b', Name.Builtin, 'Python opcode'), - (r'\blua_(?:exec|opdef)\b', Name.Builtin, 'Lua opcode'), - (r'\bp\d+\b', Name.Variable.Instance), - (r'\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b', name_callback) - ], - - 'instrument numbers and identifiers': [ - include('whitespace and macro uses'), - (r'\d+|[A-Z_a-z]\w*', Name.Function), - (r'[+,]', Punctuation), + (words(('return', 'rireturn'), prefix=r'\b', suffix=r'\b'), Keyword.Pseudo), + + (r'\b[ik]?goto\b', Keyword, 'goto label'), + (r'\b(r(?:einit|igoto)|tigoto)(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), + 'goto label'), + (r'\b(c(?:g|in?|k|nk?)goto)(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), + ('goto label', 'goto argument')), + (r'\b(timout)(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), + ('goto label', 'goto argument', 'goto argument')), + (r'\b(loop_[gl][et])(\(|\b)', bygroups(Keyword.Pseudo, Punctuation), + ('goto label', 'goto argument', 'goto argument', 'goto argument')), + + (r'\bprintk?s\b', Name.Builtin, 'prints opcode'), + (r'\b(?:readscore|scoreline(?:_i)?)\b', Name.Builtin, 'Csound score opcode'), + (r'\bpyl?run[it]?\b', Name.Builtin, 'Python opcode'), + (r'\blua_(?:exec|opdef)\b', Name.Builtin, 'Lua opcode'), + (r'\bp\d+\b', Name.Variable.Instance), + (r'\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b', name_callback) + ], + + 'instrument numbers and identifiers': [ + include('whitespace and macro uses'), + (r'\d+|[A-Z_a-z]\w*', Name.Function), + (r'[+,]', Punctuation), (r'\n', Whitespace, '#pop') ], - 'after opcode keyword': [ - include('whitespace and macro uses'), - (r'[A-Z_a-z]\w*', opcode_name_callback, ('#pop', 'opcode type signatures')), + 'after opcode keyword': [ + include('whitespace and macro uses'), + (r'[A-Z_a-z]\w*', opcode_name_callback, ('#pop', 'opcode type signatures')), (r'\n', Whitespace, '#pop') ], - 'opcode type signatures': [ - include('whitespace and macro uses'), + 'opcode type signatures': [ + include('whitespace and macro uses'), + + # https://github.com/csound/csound/search?q=XIDENT+path%3AEngine+filename%3Acsound_orc.lex + (r'0|[afijkKoOpPStV\[\]]+', Keyword.Type), - # https://github.com/csound/csound/search?q=XIDENT+path%3AEngine+filename%3Acsound_orc.lex - (r'0|[afijkKoOpPStV\[\]]+', Keyword.Type), - (r',', Punctuation), (r'\n', Whitespace, '#pop') ], - 'quoted string': [ - (r'"', String, '#pop'), - (r'[^\\"$%)]+', String), - include('macro uses'), - include('escape sequences'), - include('format specifiers'), - (r'[\\$%)]', String) - ], - 'braced string': [ - (r'\}\}', String, '#pop'), - (r'(?:[^\\%)}]|\}(?!\}))+', String), - include('escape sequences'), - include('format specifiers'), - (r'[\\%)]', String) - ], - 'escape sequences': [ - # https://github.com/csound/csound/search?q=unquote_string+path%3AEngine+filename%3Acsound_orc_compile.c - (r'\\(?:[\\abnrt"]|[0-7]{1,3})', String.Escape) - ], - # Format specifiers are highlighted in all strings, even though only + 'quoted string': [ + (r'"', String, '#pop'), + (r'[^\\"$%)]+', String), + include('macro uses'), + include('escape sequences'), + include('format specifiers'), + (r'[\\$%)]', String) + ], + 'braced string': [ + (r'\}\}', String, '#pop'), + (r'(?:[^\\%)}]|\}(?!\}))+', String), + include('escape sequences'), + include('format specifiers'), + (r'[\\%)]', String) + ], + 'escape sequences': [ + # https://github.com/csound/csound/search?q=unquote_string+path%3AEngine+filename%3Acsound_orc_compile.c + (r'\\(?:[\\abnrt"]|[0-7]{1,3})', String.Escape) + ], + # Format specifiers are highlighted in all strings, even though only # fprintks https://csound.com/docs/manual/fprintks.html # fprints https://csound.com/docs/manual/fprints.html # printf/printf_i https://csound.com/docs/manual/printf.html @@ -344,65 +344,65 @@ class CsoundOrchestraLexer(CsoundLexer): # specifiers. # - printf, printf_i, sprintf, and sprintfk don’t accept %a and %A specifiers, # but accept %s specifiers. - # See https://github.com/csound/csound/issues/747 for more information. - 'format specifiers': [ + # See https://github.com/csound/csound/issues/747 for more information. + 'format specifiers': [ (r'%[#0\- +]*\d*(?:\.\d+)?[AE-GXac-giosux]', String.Interpol), - (r'%%', String.Escape) + (r'%%', String.Escape) ], - 'goto argument': [ - include('whitespace and macro uses'), - (r',', Punctuation, '#pop'), - include('partial statements') - ], + 'goto argument': [ + include('whitespace and macro uses'), + (r',', Punctuation, '#pop'), + include('partial statements') + ], 'goto label': [ - include('whitespace and macro uses'), + include('whitespace and macro uses'), (r'\w+', Name.Label, '#pop'), default('#pop') ], - 'prints opcode': [ - include('whitespace and macro uses'), - (r'"', String, 'prints quoted string'), - default('#pop') + 'prints opcode': [ + include('whitespace and macro uses'), + (r'"', String, 'prints quoted string'), + default('#pop') ], - 'prints quoted string': [ - (r'\\\\[aAbBnNrRtT]', String.Escape), - (r'%[!nNrRtT]|[~^]{1,2}', String.Escape), - include('quoted string') + 'prints quoted string': [ + (r'\\\\[aAbBnNrRtT]', String.Escape), + (r'%[!nNrRtT]|[~^]{1,2}', String.Escape), + include('quoted string') ], - 'Csound score opcode': [ - include('whitespace and macro uses'), + 'Csound score opcode': [ + include('whitespace and macro uses'), (r'"', String, 'quoted string'), - (r'\{\{', String, 'Csound score'), + (r'\{\{', String, 'Csound score'), (r'\n', Whitespace, '#pop') ], - 'Csound score': [ - (r'\}\}', String, '#pop'), - (r'([^}]+)|\}(?!\})', using(CsoundScoreLexer)) + 'Csound score': [ + (r'\}\}', String, '#pop'), + (r'([^}]+)|\}(?!\})', using(CsoundScoreLexer)) ], - 'Python opcode': [ - include('whitespace and macro uses'), + 'Python opcode': [ + include('whitespace and macro uses'), (r'"', String, 'quoted string'), - (r'\{\{', String, 'Python'), + (r'\{\{', String, 'Python'), (r'\n', Whitespace, '#pop') ], - 'Python': [ - (r'\}\}', String, '#pop'), - (r'([^}]+)|\}(?!\})', using(PythonLexer)) + 'Python': [ + (r'\}\}', String, '#pop'), + (r'([^}]+)|\}(?!\})', using(PythonLexer)) ], - 'Lua opcode': [ - include('whitespace and macro uses'), + 'Lua opcode': [ + include('whitespace and macro uses'), (r'"', String, 'quoted string'), - (r'\{\{', String, 'Lua'), + (r'\{\{', String, 'Lua'), (r'\n', Whitespace, '#pop') ], - 'Lua': [ - (r'\}\}', String, '#pop'), - (r'([^}]+)|\}(?!\})', using(LuaLexer)) + 'Lua': [ + (r'\}\}', String, '#pop'), + (r'([^}]+)|\}(?!\})', using(LuaLexer)) ] } @@ -411,7 +411,7 @@ class CsoundDocumentLexer(RegexLexer): """ For `Csound <https://csound.com>`_ documents. - .. versionadded:: 2.1 + .. versionadded:: 2.1 """ name = 'Csound Document' @@ -428,17 +428,17 @@ class CsoundDocumentLexer(RegexLexer): tokens = { 'root': [ (r'/[*](.|\n)*?[*]/', Comment.Multiline), - (r'(?:;|//).*$', Comment.Single), - (r'[^/;<]+|/(?!/)', Text), - + (r'(?:;|//).*$', Comment.Single), + (r'[^/;<]+|/(?!/)', Text), + (r'<\s*CsInstruments', Name.Tag, ('orchestra', 'tag')), (r'<\s*CsScore', Name.Tag, ('score', 'tag')), - (r'<\s*[Hh][Tt][Mm][Ll]', Name.Tag, ('HTML', 'tag')), - + (r'<\s*[Hh][Tt][Mm][Ll]', Name.Tag, ('HTML', 'tag')), + (r'<\s*[\w:.-]+', Name.Tag, 'tag'), (r'<\s*/\s*[\w:.-]+\s*>', Name.Tag) ], - + 'orchestra': [ (r'<\s*/\s*CsInstruments\s*>', Name.Tag, '#pop'), (r'(.|\n)+?(?=<\s*/\s*CsInstruments\s*>)', using(CsoundOrchestraLexer)) @@ -448,10 +448,10 @@ class CsoundDocumentLexer(RegexLexer): (r'(.|\n)+?(?=<\s*/\s*CsScore\s*>)', using(CsoundScoreLexer)) ], 'HTML': [ - (r'<\s*/\s*[Hh][Tt][Mm][Ll]\s*>', Name.Tag, '#pop'), - (r'(.|\n)+?(?=<\s*/\s*[Hh][Tt][Mm][Ll]\s*>)', using(HtmlLexer)) + (r'<\s*/\s*[Hh][Tt][Mm][Ll]\s*>', Name.Tag, '#pop'), + (r'(.|\n)+?(?=<\s*/\s*[Hh][Tt][Mm][Ll]\s*>)', using(HtmlLexer)) ], - + 'tag': [ (r'\s+', Whitespace), (r'[\w.:-]+\s*=', Name.Attribute, 'attr'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/css.py b/contrib/python/Pygments/py3/pygments/lexers/css.py index 7c0ce07d6d..4b284cc8fa 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/css.py +++ b/contrib/python/Pygments/py3/pygments/lexers/css.py @@ -19,251 +19,251 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ __all__ = ['CssLexer', 'SassLexer', 'ScssLexer', 'LessCssLexer'] -# List of vendor prefixes obtained from: -# https://www.w3.org/TR/CSS21/syndata.html#vendor-keyword-history -_vendor_prefixes = ( - '-ms-', 'mso-', '-moz-', '-o-', '-xv-', '-atsc-', '-wap-', '-khtml-', - '-webkit-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-', -) - -# List of CSS properties obtained from: -# https://www.w3.org/Style/CSS/all-properties.en.html -# Note: handle --* separately -_css_properties = ( - 'align-content', 'align-items', 'align-self', 'alignment-baseline', 'all', - 'animation', 'animation-delay', 'animation-direction', - 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', - 'animation-name', 'animation-play-state', 'animation-timing-function', - 'appearance', 'azimuth', 'backface-visibility', 'background', - 'background-attachment', 'background-blend-mode', 'background-clip', - 'background-color', 'background-image', 'background-origin', - 'background-position', 'background-repeat', 'background-size', - 'baseline-shift', 'bookmark-label', 'bookmark-level', 'bookmark-state', - 'border', 'border-bottom', 'border-bottom-color', - 'border-bottom-left-radius', 'border-bottom-right-radius', - 'border-bottom-style', 'border-bottom-width', 'border-boundary', - 'border-collapse', 'border-color', 'border-image', 'border-image-outset', - 'border-image-repeat', 'border-image-slice', 'border-image-source', - 'border-image-width', 'border-left', 'border-left-color', - 'border-left-style', 'border-left-width', 'border-radius', 'border-right', - 'border-right-color', 'border-right-style', 'border-right-width', - 'border-spacing', 'border-style', 'border-top', 'border-top-color', - 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', - 'border-top-width', 'border-width', 'bottom', 'box-decoration-break', - 'box-shadow', 'box-sizing', 'box-snap', 'box-suppress', 'break-after', - 'break-before', 'break-inside', 'caption-side', 'caret', 'caret-animation', - 'caret-color', 'caret-shape', 'chains', 'clear', 'clip', 'clip-path', - 'clip-rule', 'color', 'color-interpolation-filters', 'column-count', - 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', - 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', - 'columns', 'content', 'counter-increment', 'counter-reset', 'counter-set', - 'crop', 'cue', 'cue-after', 'cue-before', 'cursor', 'direction', 'display', - 'dominant-baseline', 'elevation', 'empty-cells', 'filter', 'flex', - 'flex-basis', 'flex-direction', 'flex-flow', 'flex-grow', 'flex-shrink', - 'flex-wrap', 'float', 'float-defer', 'float-offset', 'float-reference', - 'flood-color', 'flood-opacity', 'flow', 'flow-from', 'flow-into', 'font', - 'font-family', 'font-feature-settings', 'font-kerning', - 'font-language-override', 'font-size', 'font-size-adjust', 'font-stretch', - 'font-style', 'font-synthesis', 'font-variant', 'font-variant-alternates', - 'font-variant-caps', 'font-variant-east-asian', 'font-variant-ligatures', - 'font-variant-numeric', 'font-variant-position', 'font-weight', - 'footnote-display', 'footnote-policy', 'glyph-orientation-vertical', - 'grid', 'grid-area', 'grid-auto-columns', 'grid-auto-flow', - 'grid-auto-rows', 'grid-column', 'grid-column-end', 'grid-column-gap', - 'grid-column-start', 'grid-gap', 'grid-row', 'grid-row-end', - 'grid-row-gap', 'grid-row-start', 'grid-template', 'grid-template-areas', - 'grid-template-columns', 'grid-template-rows', 'hanging-punctuation', - 'height', 'hyphenate-character', 'hyphenate-limit-chars', - 'hyphenate-limit-last', 'hyphenate-limit-lines', 'hyphenate-limit-zone', - 'hyphens', 'image-orientation', 'image-resolution', 'initial-letter', - 'initial-letter-align', 'initial-letter-wrap', 'isolation', - 'justify-content', 'justify-items', 'justify-self', 'left', - 'letter-spacing', 'lighting-color', 'line-break', 'line-grid', - 'line-height', 'line-snap', 'list-style', 'list-style-image', - 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', - 'margin-left', 'margin-right', 'margin-top', 'marker-side', - 'marquee-direction', 'marquee-loop', 'marquee-speed', 'marquee-style', - 'mask', 'mask-border', 'mask-border-mode', 'mask-border-outset', - 'mask-border-repeat', 'mask-border-slice', 'mask-border-source', - 'mask-border-width', 'mask-clip', 'mask-composite', 'mask-image', - 'mask-mode', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', - 'mask-type', 'max-height', 'max-lines', 'max-width', 'min-height', - 'min-width', 'mix-blend-mode', 'motion', 'motion-offset', 'motion-path', - 'motion-rotation', 'move-to', 'nav-down', 'nav-left', 'nav-right', - 'nav-up', 'object-fit', 'object-position', 'offset-after', 'offset-before', - 'offset-end', 'offset-start', 'opacity', 'order', 'orphans', 'outline', - 'outline-color', 'outline-offset', 'outline-style', 'outline-width', - 'overflow', 'overflow-style', 'overflow-wrap', 'overflow-x', 'overflow-y', - 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', - 'page', 'page-break-after', 'page-break-before', 'page-break-inside', - 'page-policy', 'pause', 'pause-after', 'pause-before', 'perspective', - 'perspective-origin', 'pitch', 'pitch-range', 'play-during', 'polar-angle', - 'polar-distance', 'position', 'presentation-level', 'quotes', - 'region-fragment', 'resize', 'rest', 'rest-after', 'rest-before', - 'richness', 'right', 'rotation', 'rotation-point', 'ruby-align', - 'ruby-merge', 'ruby-position', 'running', 'scroll-snap-coordinate', - 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y', - 'scroll-snap-type', 'shape-image-threshold', 'shape-inside', 'shape-margin', - 'shape-outside', 'size', 'speak', 'speak-as', 'speak-header', - 'speak-numeral', 'speak-punctuation', 'speech-rate', 'stress', 'string-set', - 'tab-size', 'table-layout', 'text-align', 'text-align-last', - 'text-combine-upright', 'text-decoration', 'text-decoration-color', - 'text-decoration-line', 'text-decoration-skip', 'text-decoration-style', - 'text-emphasis', 'text-emphasis-color', 'text-emphasis-position', - 'text-emphasis-style', 'text-indent', 'text-justify', 'text-orientation', - 'text-overflow', 'text-shadow', 'text-space-collapse', 'text-space-trim', - 'text-spacing', 'text-transform', 'text-underline-position', 'text-wrap', - 'top', 'transform', 'transform-origin', 'transform-style', 'transition', - 'transition-delay', 'transition-duration', 'transition-property', - 'transition-timing-function', 'unicode-bidi', 'user-select', - 'vertical-align', 'visibility', 'voice-balance', 'voice-duration', - 'voice-family', 'voice-pitch', 'voice-range', 'voice-rate', 'voice-stress', - 'voice-volume', 'volume', 'white-space', 'widows', 'width', 'will-change', - 'word-break', 'word-spacing', 'word-wrap', 'wrap-after', 'wrap-before', - 'wrap-flow', 'wrap-inside', 'wrap-through', 'writing-mode', 'z-index', -) - -# List of keyword values obtained from: -# http://cssvalues.com/ -_keyword_values = ( - 'absolute', 'alias', 'all', 'all-petite-caps', 'all-scroll', - 'all-small-caps', 'allow-end', 'alpha', 'alternate', 'alternate-reverse', - 'always', 'armenian', 'auto', 'avoid', 'avoid-column', 'avoid-page', - 'backwards', 'balance', 'baseline', 'below', 'blink', 'block', 'bold', - 'bolder', 'border-box', 'both', 'bottom', 'box-decoration', 'break-word', - 'capitalize', 'cell', 'center', 'circle', 'clip', 'clone', 'close-quote', - 'col-resize', 'collapse', 'color', 'color-burn', 'color-dodge', 'column', - 'column-reverse', 'compact', 'condensed', 'contain', 'container', - 'content-box', 'context-menu', 'copy', 'cover', 'crisp-edges', 'crosshair', - 'currentColor', 'cursive', 'darken', 'dashed', 'decimal', - 'decimal-leading-zero', 'default', 'descendants', 'difference', 'digits', - 'disc', 'distribute', 'dot', 'dotted', 'double', 'double-circle', 'e-resize', - 'each-line', 'ease', 'ease-in', 'ease-in-out', 'ease-out', 'edges', - 'ellipsis', 'end', 'ew-resize', 'exclusion', 'expanded', 'extra-condensed', - 'extra-expanded', 'fantasy', 'fill', 'fill-box', 'filled', 'first', 'fixed', - 'flat', 'flex', 'flex-end', 'flex-start', 'flip', 'force-end', 'forwards', - 'from-image', 'full-width', 'geometricPrecision', 'georgian', 'groove', - 'hanging', 'hard-light', 'help', 'hidden', 'hide', 'horizontal', 'hue', - 'icon', 'infinite', 'inherit', 'initial', 'ink', 'inline', 'inline-block', - 'inline-flex', 'inline-table', 'inset', 'inside', 'inter-word', 'invert', - 'isolate', 'italic', 'justify', 'large', 'larger', 'last', 'left', - 'lighten', 'lighter', 'line-through', 'linear', 'list-item', 'local', - 'loose', 'lower-alpha', 'lower-greek', 'lower-latin', 'lower-roman', - 'lowercase', 'ltr', 'luminance', 'luminosity', 'mandatory', 'manipulation', - 'manual', 'margin-box', 'match-parent', 'medium', 'mixed', 'monospace', - 'move', 'multiply', 'n-resize', 'ne-resize', 'nesw-resize', - 'no-close-quote', 'no-drop', 'no-open-quote', 'no-repeat', 'none', 'normal', - 'not-allowed', 'nowrap', 'ns-resize', 'nw-resize', 'nwse-resize', 'objects', - 'oblique', 'off', 'on', 'open', 'open-quote', 'optimizeLegibility', - 'optimizeSpeed', 'outset', 'outside', 'over', 'overlay', 'overline', - 'padding-box', 'page', 'pan-down', 'pan-left', 'pan-right', 'pan-up', - 'pan-x', 'pan-y', 'paused', 'petite-caps', 'pixelated', 'pointer', - 'preserve-3d', 'progress', 'proximity', 'relative', 'repeat', - 'repeat no-repeat', 'repeat-x', 'repeat-y', 'reverse', 'ridge', 'right', - 'round', 'row', 'row-resize', 'row-reverse', 'rtl', 'ruby', 'ruby-base', - 'ruby-base-container', 'ruby-text', 'ruby-text-container', 'run-in', - 'running', 's-resize', 'sans-serif', 'saturation', 'scale-down', 'screen', - 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', - 'serif', 'sesame', 'show', 'sideways', 'sideways-left', 'sideways-right', - 'slice', 'small', 'small-caps', 'smaller', 'smooth', 'snap', 'soft-light', - 'solid', 'space', 'space-around', 'space-between', 'spaces', 'square', - 'start', 'static', 'step-end', 'step-start', 'sticky', 'stretch', 'strict', - 'stroke-box', 'style', 'sw-resize', 'table', 'table-caption', 'table-cell', - 'table-column', 'table-column-group', 'table-footer-group', - 'table-header-group', 'table-row', 'table-row-group', 'text', 'thick', - 'thin', 'titling-caps', 'to', 'top', 'triangle', 'ultra-condensed', - 'ultra-expanded', 'under', 'underline', 'unicase', 'unset', 'upper-alpha', - 'upper-latin', 'upper-roman', 'uppercase', 'upright', 'use-glyph-orientation', - 'vertical', 'vertical-text', 'view-box', 'visible', 'w-resize', 'wait', - 'wavy', 'weight', 'weight style', 'wrap', 'wrap-reverse', 'x-large', - 'x-small', 'xx-large', 'xx-small', 'zoom-in', 'zoom-out', -) - -# List of extended color keywords obtained from: -# https://drafts.csswg.org/css-color/#named-colors -_color_keywords = ( - 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', - 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', - 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', - 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', - 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', - 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', - 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', - 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', - 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', - 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', - 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', - 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', - 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', - 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', - 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', - 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', - 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', - 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', - 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', - 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', - 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', - 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', - 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', - 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', - 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', - 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', - 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', - 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen', -) + ('transparent',) - -# List of other keyword values from other sources: -_other_keyword_values = ( - 'above', 'aural', 'behind', 'bidi-override', 'center-left', 'center-right', - 'cjk-ideographic', 'continuous', 'crop', 'cross', 'embed', 'far-left', - 'far-right', 'fast', 'faster', 'hebrew', 'high', 'higher', 'hiragana', - 'hiragana-iroha', 'katakana', 'katakana-iroha', 'landscape', 'left-side', - 'leftwards', 'level', 'loud', 'low', 'lower', 'message-box', 'middle', - 'mix', 'narrower', 'once', 'portrait', 'right-side', 'rightwards', 'silent', - 'slow', 'slower', 'small-caption', 'soft', 'spell-out', 'status-bar', - 'super', 'text-bottom', 'text-top', 'wider', 'x-fast', 'x-high', 'x-loud', - 'x-low', 'x-soft', 'yes', 'pre', 'pre-wrap', 'pre-line', -) - -# List of functional notation and function keyword values: -_functional_notation_keyword_values = ( - 'attr', 'blackness', 'blend', 'blenda', 'blur', 'brightness', 'calc', - 'circle', 'color-mod', 'contrast', 'counter', 'cubic-bezier', 'device-cmyk', - 'drop-shadow', 'ellipse', 'gray', 'grayscale', 'hsl', 'hsla', 'hue', - 'hue-rotate', 'hwb', 'image', 'inset', 'invert', 'lightness', - 'linear-gradient', 'matrix', 'matrix3d', 'opacity', 'perspective', - 'polygon', 'radial-gradient', 'rect', 'repeating-linear-gradient', - 'repeating-radial-gradient', 'rgb', 'rgba', 'rotate', 'rotate3d', 'rotateX', - 'rotateY', 'rotateZ', 'saturate', 'saturation', 'scale', 'scale3d', - 'scaleX', 'scaleY', 'scaleZ', 'sepia', 'shade', 'skewX', 'skewY', 'steps', - 'tint', 'toggle', 'translate', 'translate3d', 'translateX', 'translateY', - 'translateZ', 'whiteness', -) -# Note! Handle url(...) separately. - -# List of units obtained from: -# https://www.w3.org/TR/css3-values/ -_angle_units = ( - 'deg', 'grad', 'rad', 'turn', -) -_frequency_units = ( - 'Hz', 'kHz', -) -_length_units = ( - 'em', 'ex', 'ch', 'rem', - 'vh', 'vw', 'vmin', 'vmax', - 'px', 'mm', 'cm', 'in', 'pt', 'pc', 'q', -) -_resolution_units = ( - 'dpi', 'dpcm', 'dppx', -) -_time_units = ( - 's', 'ms', -) -_all_units = _angle_units + _frequency_units + _length_units + \ - _resolution_units + _time_units - - +# List of vendor prefixes obtained from: +# https://www.w3.org/TR/CSS21/syndata.html#vendor-keyword-history +_vendor_prefixes = ( + '-ms-', 'mso-', '-moz-', '-o-', '-xv-', '-atsc-', '-wap-', '-khtml-', + '-webkit-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-', +) + +# List of CSS properties obtained from: +# https://www.w3.org/Style/CSS/all-properties.en.html +# Note: handle --* separately +_css_properties = ( + 'align-content', 'align-items', 'align-self', 'alignment-baseline', 'all', + 'animation', 'animation-delay', 'animation-direction', + 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', + 'animation-name', 'animation-play-state', 'animation-timing-function', + 'appearance', 'azimuth', 'backface-visibility', 'background', + 'background-attachment', 'background-blend-mode', 'background-clip', + 'background-color', 'background-image', 'background-origin', + 'background-position', 'background-repeat', 'background-size', + 'baseline-shift', 'bookmark-label', 'bookmark-level', 'bookmark-state', + 'border', 'border-bottom', 'border-bottom-color', + 'border-bottom-left-radius', 'border-bottom-right-radius', + 'border-bottom-style', 'border-bottom-width', 'border-boundary', + 'border-collapse', 'border-color', 'border-image', 'border-image-outset', + 'border-image-repeat', 'border-image-slice', 'border-image-source', + 'border-image-width', 'border-left', 'border-left-color', + 'border-left-style', 'border-left-width', 'border-radius', 'border-right', + 'border-right-color', 'border-right-style', 'border-right-width', + 'border-spacing', 'border-style', 'border-top', 'border-top-color', + 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', + 'border-top-width', 'border-width', 'bottom', 'box-decoration-break', + 'box-shadow', 'box-sizing', 'box-snap', 'box-suppress', 'break-after', + 'break-before', 'break-inside', 'caption-side', 'caret', 'caret-animation', + 'caret-color', 'caret-shape', 'chains', 'clear', 'clip', 'clip-path', + 'clip-rule', 'color', 'color-interpolation-filters', 'column-count', + 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', + 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', + 'columns', 'content', 'counter-increment', 'counter-reset', 'counter-set', + 'crop', 'cue', 'cue-after', 'cue-before', 'cursor', 'direction', 'display', + 'dominant-baseline', 'elevation', 'empty-cells', 'filter', 'flex', + 'flex-basis', 'flex-direction', 'flex-flow', 'flex-grow', 'flex-shrink', + 'flex-wrap', 'float', 'float-defer', 'float-offset', 'float-reference', + 'flood-color', 'flood-opacity', 'flow', 'flow-from', 'flow-into', 'font', + 'font-family', 'font-feature-settings', 'font-kerning', + 'font-language-override', 'font-size', 'font-size-adjust', 'font-stretch', + 'font-style', 'font-synthesis', 'font-variant', 'font-variant-alternates', + 'font-variant-caps', 'font-variant-east-asian', 'font-variant-ligatures', + 'font-variant-numeric', 'font-variant-position', 'font-weight', + 'footnote-display', 'footnote-policy', 'glyph-orientation-vertical', + 'grid', 'grid-area', 'grid-auto-columns', 'grid-auto-flow', + 'grid-auto-rows', 'grid-column', 'grid-column-end', 'grid-column-gap', + 'grid-column-start', 'grid-gap', 'grid-row', 'grid-row-end', + 'grid-row-gap', 'grid-row-start', 'grid-template', 'grid-template-areas', + 'grid-template-columns', 'grid-template-rows', 'hanging-punctuation', + 'height', 'hyphenate-character', 'hyphenate-limit-chars', + 'hyphenate-limit-last', 'hyphenate-limit-lines', 'hyphenate-limit-zone', + 'hyphens', 'image-orientation', 'image-resolution', 'initial-letter', + 'initial-letter-align', 'initial-letter-wrap', 'isolation', + 'justify-content', 'justify-items', 'justify-self', 'left', + 'letter-spacing', 'lighting-color', 'line-break', 'line-grid', + 'line-height', 'line-snap', 'list-style', 'list-style-image', + 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', + 'margin-left', 'margin-right', 'margin-top', 'marker-side', + 'marquee-direction', 'marquee-loop', 'marquee-speed', 'marquee-style', + 'mask', 'mask-border', 'mask-border-mode', 'mask-border-outset', + 'mask-border-repeat', 'mask-border-slice', 'mask-border-source', + 'mask-border-width', 'mask-clip', 'mask-composite', 'mask-image', + 'mask-mode', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', + 'mask-type', 'max-height', 'max-lines', 'max-width', 'min-height', + 'min-width', 'mix-blend-mode', 'motion', 'motion-offset', 'motion-path', + 'motion-rotation', 'move-to', 'nav-down', 'nav-left', 'nav-right', + 'nav-up', 'object-fit', 'object-position', 'offset-after', 'offset-before', + 'offset-end', 'offset-start', 'opacity', 'order', 'orphans', 'outline', + 'outline-color', 'outline-offset', 'outline-style', 'outline-width', + 'overflow', 'overflow-style', 'overflow-wrap', 'overflow-x', 'overflow-y', + 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', + 'page', 'page-break-after', 'page-break-before', 'page-break-inside', + 'page-policy', 'pause', 'pause-after', 'pause-before', 'perspective', + 'perspective-origin', 'pitch', 'pitch-range', 'play-during', 'polar-angle', + 'polar-distance', 'position', 'presentation-level', 'quotes', + 'region-fragment', 'resize', 'rest', 'rest-after', 'rest-before', + 'richness', 'right', 'rotation', 'rotation-point', 'ruby-align', + 'ruby-merge', 'ruby-position', 'running', 'scroll-snap-coordinate', + 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y', + 'scroll-snap-type', 'shape-image-threshold', 'shape-inside', 'shape-margin', + 'shape-outside', 'size', 'speak', 'speak-as', 'speak-header', + 'speak-numeral', 'speak-punctuation', 'speech-rate', 'stress', 'string-set', + 'tab-size', 'table-layout', 'text-align', 'text-align-last', + 'text-combine-upright', 'text-decoration', 'text-decoration-color', + 'text-decoration-line', 'text-decoration-skip', 'text-decoration-style', + 'text-emphasis', 'text-emphasis-color', 'text-emphasis-position', + 'text-emphasis-style', 'text-indent', 'text-justify', 'text-orientation', + 'text-overflow', 'text-shadow', 'text-space-collapse', 'text-space-trim', + 'text-spacing', 'text-transform', 'text-underline-position', 'text-wrap', + 'top', 'transform', 'transform-origin', 'transform-style', 'transition', + 'transition-delay', 'transition-duration', 'transition-property', + 'transition-timing-function', 'unicode-bidi', 'user-select', + 'vertical-align', 'visibility', 'voice-balance', 'voice-duration', + 'voice-family', 'voice-pitch', 'voice-range', 'voice-rate', 'voice-stress', + 'voice-volume', 'volume', 'white-space', 'widows', 'width', 'will-change', + 'word-break', 'word-spacing', 'word-wrap', 'wrap-after', 'wrap-before', + 'wrap-flow', 'wrap-inside', 'wrap-through', 'writing-mode', 'z-index', +) + +# List of keyword values obtained from: +# http://cssvalues.com/ +_keyword_values = ( + 'absolute', 'alias', 'all', 'all-petite-caps', 'all-scroll', + 'all-small-caps', 'allow-end', 'alpha', 'alternate', 'alternate-reverse', + 'always', 'armenian', 'auto', 'avoid', 'avoid-column', 'avoid-page', + 'backwards', 'balance', 'baseline', 'below', 'blink', 'block', 'bold', + 'bolder', 'border-box', 'both', 'bottom', 'box-decoration', 'break-word', + 'capitalize', 'cell', 'center', 'circle', 'clip', 'clone', 'close-quote', + 'col-resize', 'collapse', 'color', 'color-burn', 'color-dodge', 'column', + 'column-reverse', 'compact', 'condensed', 'contain', 'container', + 'content-box', 'context-menu', 'copy', 'cover', 'crisp-edges', 'crosshair', + 'currentColor', 'cursive', 'darken', 'dashed', 'decimal', + 'decimal-leading-zero', 'default', 'descendants', 'difference', 'digits', + 'disc', 'distribute', 'dot', 'dotted', 'double', 'double-circle', 'e-resize', + 'each-line', 'ease', 'ease-in', 'ease-in-out', 'ease-out', 'edges', + 'ellipsis', 'end', 'ew-resize', 'exclusion', 'expanded', 'extra-condensed', + 'extra-expanded', 'fantasy', 'fill', 'fill-box', 'filled', 'first', 'fixed', + 'flat', 'flex', 'flex-end', 'flex-start', 'flip', 'force-end', 'forwards', + 'from-image', 'full-width', 'geometricPrecision', 'georgian', 'groove', + 'hanging', 'hard-light', 'help', 'hidden', 'hide', 'horizontal', 'hue', + 'icon', 'infinite', 'inherit', 'initial', 'ink', 'inline', 'inline-block', + 'inline-flex', 'inline-table', 'inset', 'inside', 'inter-word', 'invert', + 'isolate', 'italic', 'justify', 'large', 'larger', 'last', 'left', + 'lighten', 'lighter', 'line-through', 'linear', 'list-item', 'local', + 'loose', 'lower-alpha', 'lower-greek', 'lower-latin', 'lower-roman', + 'lowercase', 'ltr', 'luminance', 'luminosity', 'mandatory', 'manipulation', + 'manual', 'margin-box', 'match-parent', 'medium', 'mixed', 'monospace', + 'move', 'multiply', 'n-resize', 'ne-resize', 'nesw-resize', + 'no-close-quote', 'no-drop', 'no-open-quote', 'no-repeat', 'none', 'normal', + 'not-allowed', 'nowrap', 'ns-resize', 'nw-resize', 'nwse-resize', 'objects', + 'oblique', 'off', 'on', 'open', 'open-quote', 'optimizeLegibility', + 'optimizeSpeed', 'outset', 'outside', 'over', 'overlay', 'overline', + 'padding-box', 'page', 'pan-down', 'pan-left', 'pan-right', 'pan-up', + 'pan-x', 'pan-y', 'paused', 'petite-caps', 'pixelated', 'pointer', + 'preserve-3d', 'progress', 'proximity', 'relative', 'repeat', + 'repeat no-repeat', 'repeat-x', 'repeat-y', 'reverse', 'ridge', 'right', + 'round', 'row', 'row-resize', 'row-reverse', 'rtl', 'ruby', 'ruby-base', + 'ruby-base-container', 'ruby-text', 'ruby-text-container', 'run-in', + 'running', 's-resize', 'sans-serif', 'saturation', 'scale-down', 'screen', + 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', + 'serif', 'sesame', 'show', 'sideways', 'sideways-left', 'sideways-right', + 'slice', 'small', 'small-caps', 'smaller', 'smooth', 'snap', 'soft-light', + 'solid', 'space', 'space-around', 'space-between', 'spaces', 'square', + 'start', 'static', 'step-end', 'step-start', 'sticky', 'stretch', 'strict', + 'stroke-box', 'style', 'sw-resize', 'table', 'table-caption', 'table-cell', + 'table-column', 'table-column-group', 'table-footer-group', + 'table-header-group', 'table-row', 'table-row-group', 'text', 'thick', + 'thin', 'titling-caps', 'to', 'top', 'triangle', 'ultra-condensed', + 'ultra-expanded', 'under', 'underline', 'unicase', 'unset', 'upper-alpha', + 'upper-latin', 'upper-roman', 'uppercase', 'upright', 'use-glyph-orientation', + 'vertical', 'vertical-text', 'view-box', 'visible', 'w-resize', 'wait', + 'wavy', 'weight', 'weight style', 'wrap', 'wrap-reverse', 'x-large', + 'x-small', 'xx-large', 'xx-small', 'zoom-in', 'zoom-out', +) + +# List of extended color keywords obtained from: +# https://drafts.csswg.org/css-color/#named-colors +_color_keywords = ( + 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', + 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', + 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', + 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', + 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', + 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', + 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', + 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', + 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', + 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', + 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', + 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', + 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', + 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', + 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', + 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', + 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', + 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', + 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', + 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', + 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', + 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', + 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', + 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', + 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', + 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', + 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', + 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen', +) + ('transparent',) + +# List of other keyword values from other sources: +_other_keyword_values = ( + 'above', 'aural', 'behind', 'bidi-override', 'center-left', 'center-right', + 'cjk-ideographic', 'continuous', 'crop', 'cross', 'embed', 'far-left', + 'far-right', 'fast', 'faster', 'hebrew', 'high', 'higher', 'hiragana', + 'hiragana-iroha', 'katakana', 'katakana-iroha', 'landscape', 'left-side', + 'leftwards', 'level', 'loud', 'low', 'lower', 'message-box', 'middle', + 'mix', 'narrower', 'once', 'portrait', 'right-side', 'rightwards', 'silent', + 'slow', 'slower', 'small-caption', 'soft', 'spell-out', 'status-bar', + 'super', 'text-bottom', 'text-top', 'wider', 'x-fast', 'x-high', 'x-loud', + 'x-low', 'x-soft', 'yes', 'pre', 'pre-wrap', 'pre-line', +) + +# List of functional notation and function keyword values: +_functional_notation_keyword_values = ( + 'attr', 'blackness', 'blend', 'blenda', 'blur', 'brightness', 'calc', + 'circle', 'color-mod', 'contrast', 'counter', 'cubic-bezier', 'device-cmyk', + 'drop-shadow', 'ellipse', 'gray', 'grayscale', 'hsl', 'hsla', 'hue', + 'hue-rotate', 'hwb', 'image', 'inset', 'invert', 'lightness', + 'linear-gradient', 'matrix', 'matrix3d', 'opacity', 'perspective', + 'polygon', 'radial-gradient', 'rect', 'repeating-linear-gradient', + 'repeating-radial-gradient', 'rgb', 'rgba', 'rotate', 'rotate3d', 'rotateX', + 'rotateY', 'rotateZ', 'saturate', 'saturation', 'scale', 'scale3d', + 'scaleX', 'scaleY', 'scaleZ', 'sepia', 'shade', 'skewX', 'skewY', 'steps', + 'tint', 'toggle', 'translate', 'translate3d', 'translateX', 'translateY', + 'translateZ', 'whiteness', +) +# Note! Handle url(...) separately. + +# List of units obtained from: +# https://www.w3.org/TR/css3-values/ +_angle_units = ( + 'deg', 'grad', 'rad', 'turn', +) +_frequency_units = ( + 'Hz', 'kHz', +) +_length_units = ( + 'em', 'ex', 'ch', 'rem', + 'vh', 'vw', 'vmin', 'vmax', + 'px', 'mm', 'cm', 'in', 'pt', 'pc', 'q', +) +_resolution_units = ( + 'dpi', 'dpcm', 'dppx', +) +_time_units = ( + 's', 'ms', +) +_all_units = _angle_units + _frequency_units + _length_units + \ + _resolution_units + _time_units + + class CssLexer(RegexLexer): """ For CSS (Cascading Style Sheets). @@ -282,10 +282,10 @@ class CssLexer(RegexLexer): (r'\s+', Whitespace), (r'/\*(?:.|\n)*?\*/', Comment), (r'\{', Punctuation, 'content'), - (r'(\:{1,2})([\w-]+)', bygroups(Punctuation, Name.Decorator)), - (r'(\.)([\w-]+)', bygroups(Punctuation, Name.Class)), - (r'(\#)([\w-]+)', bygroups(Punctuation, Name.Namespace)), - (r'(@)([\w-]+)', bygroups(Punctuation, Keyword), 'atrule'), + (r'(\:{1,2})([\w-]+)', bygroups(Punctuation, Name.Decorator)), + (r'(\.)([\w-]+)', bygroups(Punctuation, Name.Class)), + (r'(\#)([\w-]+)', bygroups(Punctuation, Name.Namespace)), + (r'(@)([\w-]+)', bygroups(Punctuation, Keyword), 'atrule'), (r'[\w-]+', Name.Tag), (r'[~^*!%&$\[\]()<>|+=@:;,./?-]', Operator), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), @@ -303,87 +303,87 @@ class CssLexer(RegexLexer): 'content': [ (r'\s+', Whitespace), (r'\}', Punctuation, '#pop'), - (r';', Punctuation), + (r';', Punctuation), (r'^@.*?$', Comment.Preproc), - - (words(_vendor_prefixes,), Keyword.Pseudo), - (r'('+r'|'.join(_css_properties)+r')(\s*)(\:)', + + (words(_vendor_prefixes,), Keyword.Pseudo), + (r'('+r'|'.join(_css_properties)+r')(\s*)(\:)', bygroups(Keyword, Whitespace, Punctuation), 'value-start'), (r'([-]+[a-zA-Z_][\w-]*)(\s*)(\:)', bygroups(Name.Variable, Whitespace, Punctuation), 'value-start'), (r'([a-zA-Z_][\w-]*)(\s*)(\:)', bygroups(Name, Whitespace, Punctuation), - 'value-start'), - - (r'/\*(?:.|\n)*?\*/', Comment), - ], - 'value-start': [ + 'value-start'), + + (r'/\*(?:.|\n)*?\*/', Comment), + ], + 'value-start': [ (r'\s+', Whitespace), - (words(_vendor_prefixes,), Name.Builtin.Pseudo), - include('urls'), - (r'('+r'|'.join(_functional_notation_keyword_values)+r')(\()', - bygroups(Name.Builtin, Punctuation), 'function-start'), - (r'([a-zA-Z_][\w-]+)(\()', - bygroups(Name.Function, Punctuation), 'function-start'), - (words(_keyword_values, suffix=r'\b'), Keyword.Constant), - (words(_other_keyword_values, suffix=r'\b'), Keyword.Constant), - (words(_color_keywords, suffix=r'\b'), Keyword.Constant), - # for transition-property etc. - (words(_css_properties, suffix=r'\b'), Keyword), + (words(_vendor_prefixes,), Name.Builtin.Pseudo), + include('urls'), + (r'('+r'|'.join(_functional_notation_keyword_values)+r')(\()', + bygroups(Name.Builtin, Punctuation), 'function-start'), + (r'([a-zA-Z_][\w-]+)(\()', + bygroups(Name.Function, Punctuation), 'function-start'), + (words(_keyword_values, suffix=r'\b'), Keyword.Constant), + (words(_other_keyword_values, suffix=r'\b'), Keyword.Constant), + (words(_color_keywords, suffix=r'\b'), Keyword.Constant), + # for transition-property etc. + (words(_css_properties, suffix=r'\b'), Keyword), (r'\!important', Comment.Preproc), (r'/\*(?:.|\n)*?\*/', Comment), - - include('numeric-values'), - - (r'[~^*!%&<>|+=@:./?-]+', Operator), - (r'[\[\](),]+', Punctuation), + + include('numeric-values'), + + (r'[~^*!%&<>|+=@:./?-]+', Operator), + (r'[\[\](),]+', Punctuation), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), - (r'[a-zA-Z_][\w-]*', Name), - (r';', Punctuation, '#pop'), - (r'\}', Punctuation, '#pop:2'), - ], - 'function-start': [ + (r'[a-zA-Z_][\w-]*', Name), + (r';', Punctuation, '#pop'), + (r'\}', Punctuation, '#pop:2'), + ], + 'function-start': [ (r'\s+', Whitespace), (r'[-]+([\w+]+[-]*)+', Name.Variable), - include('urls'), - (words(_vendor_prefixes,), Keyword.Pseudo), - (words(_keyword_values, suffix=r'\b'), Keyword.Constant), - (words(_other_keyword_values, suffix=r'\b'), Keyword.Constant), - (words(_color_keywords, suffix=r'\b'), Keyword.Constant), - - # function-start may be entered recursively - (r'(' + r'|'.join(_functional_notation_keyword_values) + r')(\()', - bygroups(Name.Builtin, Punctuation), 'function-start'), - (r'([a-zA-Z_][\w-]+)(\()', - bygroups(Name.Function, Punctuation), 'function-start'), - - (r'/\*(?:.|\n)*?\*/', Comment), - include('numeric-values'), - (r'[*+/-]', Operator), + include('urls'), + (words(_vendor_prefixes,), Keyword.Pseudo), + (words(_keyword_values, suffix=r'\b'), Keyword.Constant), + (words(_other_keyword_values, suffix=r'\b'), Keyword.Constant), + (words(_color_keywords, suffix=r'\b'), Keyword.Constant), + + # function-start may be entered recursively + (r'(' + r'|'.join(_functional_notation_keyword_values) + r')(\()', + bygroups(Name.Builtin, Punctuation), 'function-start'), + (r'([a-zA-Z_][\w-]+)(\()', + bygroups(Name.Function, Punctuation), 'function-start'), + + (r'/\*(?:.|\n)*?\*/', Comment), + include('numeric-values'), + (r'[*+/-]', Operator), (r',', Punctuation), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), - (r'[a-zA-Z_-]\w*', Name), - (r'\)', Punctuation, '#pop'), - ], - 'urls': [ - (r'(url)(\()(".*?")(\))', bygroups(Name.Builtin, Punctuation, - String.Double, Punctuation)), - (r"(url)(\()('.*?')(\))", bygroups(Name.Builtin, Punctuation, - String.Single, Punctuation)), - (r'(url)(\()(.*?)(\))', bygroups(Name.Builtin, Punctuation, - String.Other, Punctuation)), - ], - 'numeric-values': [ - (r'\#[a-zA-Z0-9]{1,6}', Number.Hex), - (r'[+\-]?[0-9]*[.][0-9]+', Number.Float, 'numeric-end'), - (r'[+\-]?[0-9]+', Number.Integer, 'numeric-end'), - ], - 'numeric-end': [ - (words(_all_units, suffix=r'\b'), Keyword.Type), - (r'%', Keyword.Type), - default('#pop'), - ], + (r'[a-zA-Z_-]\w*', Name), + (r'\)', Punctuation, '#pop'), + ], + 'urls': [ + (r'(url)(\()(".*?")(\))', bygroups(Name.Builtin, Punctuation, + String.Double, Punctuation)), + (r"(url)(\()('.*?')(\))", bygroups(Name.Builtin, Punctuation, + String.Single, Punctuation)), + (r'(url)(\()(.*?)(\))', bygroups(Name.Builtin, Punctuation, + String.Other, Punctuation)), + ], + 'numeric-values': [ + (r'\#[a-zA-Z0-9]{1,6}', Number.Hex), + (r'[+\-]?[0-9]*[.][0-9]+', Number.Float, 'numeric-end'), + (r'[+\-]?[0-9]+', Number.Integer, 'numeric-end'), + ], + 'numeric-end': [ + (words(_all_units, suffix=r'\b'), Keyword.Type), + (r'%', Keyword.Type), + default('#pop'), + ], } @@ -393,7 +393,7 @@ common_sass_tokens = { (r'[!$][\w-]+', Name.Variable), (r'url\(', String.Other, 'string-url'), (r'[a-z_-][\w-]*(?=\()', Name.Function), - (words(_css_properties + ( + (words(_css_properties + ( 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left', 'center-right', 'center', 'circle', @@ -424,7 +424,7 @@ common_sass_tokens = { 'visible', 'w-resize', 'wait', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yes'), suffix=r'\b'), Name.Constant), - (words(_color_keywords, suffix=r'\b'), Name.Entity), + (words(_color_keywords, suffix=r'\b'), Name.Entity), (words(( 'black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua'), suffix=r'\b'), @@ -470,9 +470,9 @@ common_sass_tokens = { ], 'string-single': [ - (r"(\\.|#(?=[^\n{])|[^\n'#])+", String.Single), + (r"(\\.|#(?=[^\n{])|[^\n'#])+", String.Single), (r'#\{', String.Interpol, 'interpolation'), - (r"'", String.Single, '#pop'), + (r"'", String.Single, '#pop'), ], 'string-url': [ @@ -645,8 +645,8 @@ class ScssLexer(RegexLexer): (r'@[\w-]+', Keyword, 'selector'), (r'(\$[\w-]*\w)([ \t]*:)', bygroups(Name.Variable, Operator), 'value'), # TODO: broken, and prone to infinite loops. - # (r'(?=[^;{}][;}])', Name.Attribute, 'attr'), - # (r'(?=[^;{}:]+:[^a-z])', Name.Attribute, 'attr'), + # (r'(?=[^;{}][;}])', Name.Attribute, 'attr'), + # (r'(?=[^;{}:]+:[^a-z])', Name.Attribute, 'attr'), default('selector'), ], @@ -687,7 +687,7 @@ class LessCssLexer(CssLexer): inherit, ], 'content': [ - (r'\{', Punctuation, '#push'), + (r'\{', Punctuation, '#push'), (r'//.*\n', Comment.Single), inherit, ], diff --git a/contrib/python/Pygments/py3/pygments/lexers/data.py b/contrib/python/Pygments/py3/pygments/lexers/data.py index a60a1d006f..c702d42093 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/data.py +++ b/contrib/python/Pygments/py3/pygments/lexers/data.py @@ -13,7 +13,7 @@ from pygments.lexer import Lexer, ExtendedRegexLexer, LexerContext, \ from pygments.token import Text, Comment, Keyword, Name, String, Number, \ Punctuation, Literal, Error, Whitespace -__all__ = ['YamlLexer', 'JsonLexer', 'JsonBareObjectLexer', 'JsonLdLexer'] +__all__ = ['YamlLexer', 'JsonLexer', 'JsonBareObjectLexer', 'JsonLdLexer'] class YamlLexerContext(LexerContext): @@ -202,7 +202,7 @@ class YamlLexer(ExtendedRegexLexer): bygroups(Whitespace, Number), 'ignored-line'), ], - # the %TAG directive + # the %TAG directive 'tag-directive': [ # a tag handle and the corresponding prefix (r'([ ]+)(!|![\w-]*!)' @@ -215,7 +215,7 @@ class YamlLexer(ExtendedRegexLexer): 'indentation': [ # trailing whitespaces are ignored (r'[ ]*$', something(Whitespace), '#pop:2'), - # whitespaces preceding block collection indicators + # whitespaces preceding block collection indicators (r'[ ]+(?=[?:-](?:[ ]|$))', save_indent(Whitespace)), # block collection indicators (r'[?:-](?=[ ]|$)', set_indent(Punctuation.Indicator)), @@ -229,9 +229,9 @@ class YamlLexer(ExtendedRegexLexer): (r'[ ]*(?=#|$)', something(Whitespace), '#pop'), # whitespaces separating tokens (r'[ ]+', Whitespace), - # key with colon + # key with colon (r'''([^#,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''', - bygroups(Name.Tag, set_indent(Punctuation, implicit=True))), + bygroups(Name.Tag, set_indent(Punctuation, implicit=True))), # tags, anchors and aliases, include('descriptors'), # block collections and scalars @@ -247,10 +247,10 @@ class YamlLexer(ExtendedRegexLexer): # tags, anchors, aliases 'descriptors': [ # a full-form tag - (r'!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type), + (r'!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type), # a tag in the form '!', '!suffix' or '!handle!suffix' - (r'!(?:[\w-]+!)?' - r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]*', Keyword.Type), + (r'!(?:[\w-]+!)?' + r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]*', Keyword.Type), # an anchor (r'&[\w-]+', Name.Label), # an alias @@ -308,9 +308,9 @@ class YamlLexer(ExtendedRegexLexer): # a flow mapping indicated by '{' and '}' 'flow-mapping': [ - # key with colon - (r'''([^,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''', - bygroups(Name.Tag, Punctuation)), + # key with colon + (r'''([^,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''', + bygroups(Name.Tag, Punctuation)), # include flow collection rules include('flow-collection'), # the closing indicator @@ -536,7 +536,7 @@ class JsonLexer(Lexer): elif in_constant: if character in self.constants: continue - + yield start, Keyword.Constant, text[start:stop] in_constant = False # Fall through so the new character can be evaluated. @@ -635,23 +635,23 @@ class JsonLexer(Lexer): yield start, Punctuation, text[start:] -class JsonBareObjectLexer(JsonLexer): - """ - For JSON data structures (with missing object curly braces). - - .. versionadded:: 2.2 +class JsonBareObjectLexer(JsonLexer): + """ + For JSON data structures (with missing object curly braces). + + .. versionadded:: 2.2 .. deprecated:: 2.8.0 Behaves the same as `JsonLexer` now. - """ - - name = 'JSONBareObject' + """ + + name = 'JSONBareObject' aliases = [] - filenames = [] + filenames = [] mimetypes = [] - - + + class JsonLdLexer(JsonLexer): """ For `JSON-LD <https://json-ld.org/>`_ linked data. diff --git a/contrib/python/Pygments/py3/pygments/lexers/diff.py b/contrib/python/Pygments/py3/pygments/lexers/diff.py index c6cb9c71e4..a694bd68e6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/diff.py +++ b/contrib/python/Pygments/py3/pygments/lexers/diff.py @@ -8,13 +8,13 @@ :license: BSD, see LICENSE for details. """ -import re - +import re + from pygments.lexer import RegexLexer, include, bygroups from pygments.token import Text, Comment, Operator, Keyword, Name, Generic, \ Literal, Whitespace -__all__ = ['DiffLexer', 'DarcsPatchLexer', 'WDiffLexer'] +__all__ = ['DiffLexer', 'DarcsPatchLexer', 'WDiffLexer'] class DiffLexer(RegexLexer): @@ -105,60 +105,60 @@ class DarcsPatchLexer(RegexLexer): (r'[^\n\[]+', Generic.Deleted), ], } - - -class WDiffLexer(RegexLexer): - """ - A `wdiff <https://www.gnu.org/software/wdiff/>`_ lexer. - - Note that: - + + +class WDiffLexer(RegexLexer): + """ + A `wdiff <https://www.gnu.org/software/wdiff/>`_ lexer. + + Note that: + * It only works with normal output (without options like ``-l``). * If the target files contain "[-", "-]", "{+", or "+}", especially they are unbalanced, the lexer will get confused. - - .. versionadded:: 2.2 - """ - - name = 'WDiff' - aliases = ['wdiff'] - filenames = ['*.wdiff'] - mimetypes = [] - - flags = re.MULTILINE | re.DOTALL - - # We can only assume "[-" after "[-" before "-]" is `nested`, - # for instance wdiff to wdiff outputs. We have no way to - # distinct these marker is of wdiff output from original text. - - ins_op = r"\{\+" - ins_cl = r"\+\}" - del_op = r"\[\-" - del_cl = r"\-\]" - normal = r'[^{}[\]+-]+' # for performance - tokens = { - 'root': [ - (ins_op, Generic.Inserted, 'inserted'), - (del_op, Generic.Deleted, 'deleted'), - (normal, Text), - (r'.', Text), - ], - 'inserted': [ - (ins_op, Generic.Inserted, '#push'), - (del_op, Generic.Inserted, '#push'), - (del_cl, Generic.Inserted, '#pop'), - - (ins_cl, Generic.Inserted, '#pop'), - (normal, Generic.Inserted), - (r'.', Generic.Inserted), - ], - 'deleted': [ - (del_op, Generic.Deleted, '#push'), - (ins_op, Generic.Deleted, '#push'), - (ins_cl, Generic.Deleted, '#pop'), - - (del_cl, Generic.Deleted, '#pop'), - (normal, Generic.Deleted), - (r'.', Generic.Deleted), - ], - } + + .. versionadded:: 2.2 + """ + + name = 'WDiff' + aliases = ['wdiff'] + filenames = ['*.wdiff'] + mimetypes = [] + + flags = re.MULTILINE | re.DOTALL + + # We can only assume "[-" after "[-" before "-]" is `nested`, + # for instance wdiff to wdiff outputs. We have no way to + # distinct these marker is of wdiff output from original text. + + ins_op = r"\{\+" + ins_cl = r"\+\}" + del_op = r"\[\-" + del_cl = r"\-\]" + normal = r'[^{}[\]+-]+' # for performance + tokens = { + 'root': [ + (ins_op, Generic.Inserted, 'inserted'), + (del_op, Generic.Deleted, 'deleted'), + (normal, Text), + (r'.', Text), + ], + 'inserted': [ + (ins_op, Generic.Inserted, '#push'), + (del_op, Generic.Inserted, '#push'), + (del_cl, Generic.Inserted, '#pop'), + + (ins_cl, Generic.Inserted, '#pop'), + (normal, Generic.Inserted), + (r'.', Generic.Inserted), + ], + 'deleted': [ + (del_op, Generic.Deleted, '#push'), + (ins_op, Generic.Deleted, '#push'), + (ins_cl, Generic.Deleted, '#pop'), + + (del_cl, Generic.Deleted, '#pop'), + (normal, Generic.Deleted), + (r'.', Generic.Deleted), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py index 7fbceade5c..c04d2a0a92 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py @@ -10,7 +10,7 @@ import re from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, \ - using, this, default, words + using, this, default, words from pygments.token import Punctuation, Text, Comment, Operator, Keyword, \ Name, String, Number, Literal, Other, Whitespace from pygments.util import get_choice_opt @@ -57,7 +57,7 @@ class CSharpLexer(RegexLexer): # http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf levels = { - 'none': r'@?[_a-zA-Z]\w*', + 'none': r'@?[_a-zA-Z]\w*', 'basic': ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*'), @@ -98,17 +98,17 @@ class CSharpLexer(RegexLexer): Comment.Preproc, Whitespace)), (r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Whitespace, Keyword)), - (r'(abstract|as|async|await|base|break|by|case|catch|' + (r'(abstract|as|async|await|base|break|by|case|catch|' r'checked|const|continue|default|delegate|' r'do|else|enum|event|explicit|extern|false|finally|' r'fixed|for|foreach|goto|if|implicit|in|interface|' - r'internal|is|let|lock|new|null|on|operator|' + r'internal|is|let|lock|new|null|on|operator|' r'out|override|params|private|protected|public|readonly|' r'ref|return|sealed|sizeof|stackalloc|static|' r'switch|this|throw|true|try|typeof|' r'unchecked|unsafe|virtual|void|while|' r'get|set|new|partial|yield|add|remove|value|alias|ascending|' - r'descending|from|group|into|orderby|select|thenby|where|' + r'descending|from|group|into|orderby|select|thenby|where|' r'join|equals)\b', Keyword), (r'(global)(::)', bygroups(Keyword, Punctuation)), (r'(bool|byte|char|decimal|double|dynamic|float|int|long|object|' @@ -172,7 +172,7 @@ class NemerleLexer(RegexLexer): # http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf levels = { - 'none': r'@?[_a-zA-Z]\w*', + 'none': r'@?[_a-zA-Z]\w*', 'basic': ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*'), @@ -371,13 +371,13 @@ class BooLexer(RegexLexer): ('[*/]', Comment.Multiline) ], 'funcname': [ - (r'[a-zA-Z_]\w*', Name.Function, '#pop') + (r'[a-zA-Z_]\w*', Name.Function, '#pop') ], 'classname': [ - (r'[a-zA-Z_]\w*', Name.Class, '#pop') + (r'[a-zA-Z_]\w*', Name.Class, '#pop') ], 'namespace': [ - (r'[a-zA-Z_][\w.]*', Name.Namespace, '#pop') + (r'[a-zA-Z_][\w.]*', Name.Namespace, '#pop') ] } @@ -394,8 +394,8 @@ class VbNetLexer(RegexLexer): filenames = ['*.vb', '*.bas'] mimetypes = ['text/x-vbnet', 'text/x-vba'] # (?) - uni_name = '[_' + uni.combine('Ll', 'Lt', 'Lm', 'Nl') + ']' + \ - '[' + uni.combine('Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', + uni_name = '[_' + uni.combine('Ll', 'Lt', 'Lm', 'Nl') + ']' + \ + '[' + uni.combine('Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*' flags = re.MULTILINE | re.IGNORECASE @@ -414,26 +414,26 @@ class VbNetLexer(RegexLexer): (r'(Option)(\s+)(Strict|Explicit|Compare)(\s+)' r'(On|Off|Binary|Text)', bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Whitespace, Keyword.Declaration)), - (words(( - 'AddHandler', 'Alias', 'ByRef', 'ByVal', 'Call', 'Case', - 'Catch', 'CBool', 'CByte', 'CChar', 'CDate', 'CDec', 'CDbl', - 'CInt', 'CLng', 'CObj', 'Continue', 'CSByte', 'CShort', 'CSng', - 'CStr', 'CType', 'CUInt', 'CULng', 'CUShort', 'Declare', - 'Default', 'Delegate', 'DirectCast', 'Do', 'Each', 'Else', - 'ElseIf', 'EndIf', 'Erase', 'Error', 'Event', 'Exit', 'False', - 'Finally', 'For', 'Friend', 'Get', 'Global', 'GoSub', 'GoTo', - 'Handles', 'If', 'Implements', 'Inherits', 'Interface', 'Let', - 'Lib', 'Loop', 'Me', 'MustInherit', 'MustOverride', 'MyBase', - 'MyClass', 'Narrowing', 'New', 'Next', 'Not', 'Nothing', - 'NotInheritable', 'NotOverridable', 'Of', 'On', 'Operator', - 'Option', 'Optional', 'Overloads', 'Overridable', 'Overrides', - 'ParamArray', 'Partial', 'Private', 'Protected', 'Public', - 'RaiseEvent', 'ReadOnly', 'ReDim', 'RemoveHandler', 'Resume', - 'Return', 'Select', 'Set', 'Shadows', 'Shared', 'Single', - 'Static', 'Step', 'Stop', 'SyncLock', 'Then', 'Throw', 'To', - 'True', 'Try', 'TryCast', 'Wend', 'Using', 'When', 'While', - 'Widening', 'With', 'WithEvents', 'WriteOnly'), - prefix=r'(?<!\.)', suffix=r'\b'), Keyword), + (words(( + 'AddHandler', 'Alias', 'ByRef', 'ByVal', 'Call', 'Case', + 'Catch', 'CBool', 'CByte', 'CChar', 'CDate', 'CDec', 'CDbl', + 'CInt', 'CLng', 'CObj', 'Continue', 'CSByte', 'CShort', 'CSng', + 'CStr', 'CType', 'CUInt', 'CULng', 'CUShort', 'Declare', + 'Default', 'Delegate', 'DirectCast', 'Do', 'Each', 'Else', + 'ElseIf', 'EndIf', 'Erase', 'Error', 'Event', 'Exit', 'False', + 'Finally', 'For', 'Friend', 'Get', 'Global', 'GoSub', 'GoTo', + 'Handles', 'If', 'Implements', 'Inherits', 'Interface', 'Let', + 'Lib', 'Loop', 'Me', 'MustInherit', 'MustOverride', 'MyBase', + 'MyClass', 'Narrowing', 'New', 'Next', 'Not', 'Nothing', + 'NotInheritable', 'NotOverridable', 'Of', 'On', 'Operator', + 'Option', 'Optional', 'Overloads', 'Overridable', 'Overrides', + 'ParamArray', 'Partial', 'Private', 'Protected', 'Public', + 'RaiseEvent', 'ReadOnly', 'ReDim', 'RemoveHandler', 'Resume', + 'Return', 'Select', 'Set', 'Shadows', 'Shared', 'Single', + 'Static', 'Step', 'Stop', 'SyncLock', 'Then', 'Throw', 'To', + 'True', 'Try', 'TryCast', 'Wend', 'Using', 'When', 'While', + 'Widening', 'With', 'WithEvents', 'WriteOnly'), + prefix=r'(?<!\.)', suffix=r'\b'), Keyword), (r'(?<!\.)End\b', Keyword, 'end'), (r'(?<!\.)(Dim|Const)\b', Keyword, 'dim'), (r'(?<!\.)(Function|Sub|Property)(\s+)', @@ -559,13 +559,13 @@ class VbNetAspxLexer(DelegatingLexer): # Very close to functional.OcamlLexer class FSharpLexer(RegexLexer): """ - For the `F# language <https://fsharp.org/>`_ (version 3.0). + For the `F# language <https://fsharp.org/>`_ (version 3.0). .. versionadded:: 1.5 """ - name = 'F#' - aliases = ['fsharp', 'f#'] + name = 'F#' + aliases = ['fsharp', 'f#'] filenames = ['*.fs', '*.fsi'] mimetypes = ['text/x-fsharp'] @@ -589,10 +589,10 @@ class FSharpLexer(RegexLexer): 'virtual', 'volatile', ] keyopts = [ - '!=', '#', '&&', '&', r'\(', r'\)', r'\*', r'\+', ',', r'-\.', - '->', '-', r'\.\.', r'\.', '::', ':=', ':>', ':', ';;', ';', '<-', - r'<\]', '<', r'>\]', '>', r'\?\?', r'\?', r'\[<', r'\[\|', r'\[', r'\]', - '_', '`', r'\{', r'\|\]', r'\|', r'\}', '~', '<@@', '<@', '=', '@>', '@@>', + '!=', '#', '&&', '&', r'\(', r'\)', r'\*', r'\+', ',', r'-\.', + '->', '-', r'\.\.', r'\.', '::', ':=', ':>', ':', ';;', ';', '<-', + r'<\]', '<', r'>\]', '>', r'\?\?', r'\?', r'\[<', r'\[\|', r'\[', r'\]', + '_', '`', r'\{', r'\|\]', r'\|', r'\}', '~', '<@@', '<@', '=', '@>', '@@>', ] operators = r'[!$%&*+\./:<=>?@^|~-]' diff --git a/contrib/python/Pygments/py3/pygments/lexers/dsls.py b/contrib/python/Pygments/py3/pygments/lexers/dsls.py index 8ffe641512..b6847d0447 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dsls.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dsls.py @@ -10,14 +10,14 @@ import re -from pygments.lexer import ExtendedRegexLexer, RegexLexer, bygroups, words, \ - include, default, this, using, combined +from pygments.lexer import ExtendedRegexLexer, RegexLexer, bygroups, words, \ + include, default, this, using, combined from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Whitespace __all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer', 'MscgenLexer', 'VGLLexer', 'AlloyLexer', 'PanLexer', - 'CrmshLexer', 'ThriftLexer', 'FlatlineLexer', 'SnowballLexer'] + 'CrmshLexer', 'ThriftLexer', 'FlatlineLexer', 'SnowballLexer'] class ProtoBufLexer(RegexLexer): @@ -35,7 +35,7 @@ class ProtoBufLexer(RegexLexer): tokens = { 'root': [ (r'[ \t]+', Whitespace), - (r'[,;{}\[\]()<>]', Punctuation), + (r'[,;{}\[\]()<>]', Punctuation), (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single), (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline), (words(( @@ -65,7 +65,7 @@ class ProtoBufLexer(RegexLexer): (r'[+-=]', Operator), (r'([a-zA-Z_][\w.]*)([ \t]*)(=)', bygroups(Name.Attribute, Whitespace, Operator)), - (r'[a-zA-Z_][\w.]*', Name), + (r'[a-zA-Z_][\w.]*', Name), ], 'package': [ (r'[a-zA-Z_]\w*', Name.Namespace, '#pop'), @@ -110,8 +110,8 @@ class ThriftLexer(RegexLexer): include('keywords'), include('numbers'), (r'[&=]', Operator), - (r'[:;,{}()<>\[\]]', Punctuation), - (r'[a-zA-Z_](\.\w|\w)*', Name), + (r'[:;,{}()<>\[\]]', Punctuation), + (r'[a-zA-Z_](\.\w|\w)*', Name), ], 'whitespace': [ (r'\n', Whitespace), @@ -134,7 +134,7 @@ class ThriftLexer(RegexLexer): (r'[^\\\'\n]+', String.Single), ], 'namespace': [ - (r'[a-z*](\.\w|\w)*', Name.Namespace, '#pop'), + (r'[a-z*](\.\w|\w)*', Name.Namespace, '#pop'), default('#pop'), ], 'class': [ @@ -155,7 +155,7 @@ class ThriftLexer(RegexLexer): Keyword.Namespace), (words(( 'void', 'bool', 'byte', 'i16', 'i32', 'i64', 'double', - 'string', 'binary', 'map', 'list', 'set', 'slist', + 'string', 'binary', 'map', 'list', 'set', 'slist', 'senum'), suffix=r'\b'), Keyword.Type), (words(( @@ -382,7 +382,7 @@ class PuppetLexer(RegexLexer): ], 'names': [ - (r'[a-zA-Z_]\w*', Name.Attribute), + (r'[a-zA-Z_]\w*', Name.Attribute), (r'(\$\S+)(\[)(\S+)(\])', bygroups(Name.Variable, Punctuation, String, Punctuation)), (r'\$\S+', Name.Variable), @@ -773,192 +773,192 @@ class CrmshLexer(RegexLexer): (r'([\w#$-]+)(?:(:)(%s))?(?![\w#$-])' % rsc_role_action, bygroups(Name, Punctuation, Operator.Word)), # punctuation - (r'(\\(?=\n)|[\[\](){}/:@])', Punctuation), + (r'(\\(?=\n)|[\[\](){}/:@])', Punctuation), (r'\s+|\n', Whitespace), ], } - - -class FlatlineLexer(RegexLexer): - """ - Lexer for `Flatline <https://github.com/bigmlcom/flatline>`_ expressions. - - .. versionadded:: 2.2 - """ - name = 'Flatline' - aliases = ['flatline'] - filenames = [] - mimetypes = ['text/x-flatline'] - - special_forms = ('let',) - - builtins = ( - "!=", "*", "+", "-", "<", "<=", "=", ">", ">=", "abs", "acos", "all", - "all-but", "all-with-defaults", "all-with-numeric-default", "and", - "asin", "atan", "avg", "avg-window", "bin-center", "bin-count", "call", - "category-count", "ceil", "cond", "cond-window", "cons", "cos", "cosh", - "count", "diff-window", "div", "ensure-value", "ensure-weighted-value", - "epoch", "epoch-day", "epoch-fields", "epoch-hour", "epoch-millisecond", - "epoch-minute", "epoch-month", "epoch-second", "epoch-weekday", - "epoch-year", "exp", "f", "field", "field-prop", "fields", "filter", - "first", "floor", "head", "if", "in", "integer", "language", "length", - "levenshtein", "linear-regression", "list", "ln", "log", "log10", "map", - "matches", "matches?", "max", "maximum", "md5", "mean", "median", "min", - "minimum", "missing", "missing-count", "missing?", "missing_count", - "mod", "mode", "normalize", "not", "nth", "occurrences", "or", - "percentile", "percentile-label", "population", "population-fraction", - "pow", "preferred", "preferred?", "quantile-label", "rand", "rand-int", - "random-value", "re-quote", "real", "replace", "replace-first", "rest", - "round", "row-number", "segment-label", "sha1", "sha256", "sin", "sinh", - "sqrt", "square", "standard-deviation", "standard_deviation", "str", - "subs", "sum", "sum-squares", "sum-window", "sum_squares", "summary", - "summary-no", "summary-str", "tail", "tan", "tanh", "to-degrees", - "to-radians", "variance", "vectorize", "weighted-random-value", "window", - "winnow", "within-percentiles?", "z-score", - ) - - valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+' - - tokens = { - 'root': [ - # whitespaces - usually not relevant + + +class FlatlineLexer(RegexLexer): + """ + Lexer for `Flatline <https://github.com/bigmlcom/flatline>`_ expressions. + + .. versionadded:: 2.2 + """ + name = 'Flatline' + aliases = ['flatline'] + filenames = [] + mimetypes = ['text/x-flatline'] + + special_forms = ('let',) + + builtins = ( + "!=", "*", "+", "-", "<", "<=", "=", ">", ">=", "abs", "acos", "all", + "all-but", "all-with-defaults", "all-with-numeric-default", "and", + "asin", "atan", "avg", "avg-window", "bin-center", "bin-count", "call", + "category-count", "ceil", "cond", "cond-window", "cons", "cos", "cosh", + "count", "diff-window", "div", "ensure-value", "ensure-weighted-value", + "epoch", "epoch-day", "epoch-fields", "epoch-hour", "epoch-millisecond", + "epoch-minute", "epoch-month", "epoch-second", "epoch-weekday", + "epoch-year", "exp", "f", "field", "field-prop", "fields", "filter", + "first", "floor", "head", "if", "in", "integer", "language", "length", + "levenshtein", "linear-regression", "list", "ln", "log", "log10", "map", + "matches", "matches?", "max", "maximum", "md5", "mean", "median", "min", + "minimum", "missing", "missing-count", "missing?", "missing_count", + "mod", "mode", "normalize", "not", "nth", "occurrences", "or", + "percentile", "percentile-label", "population", "population-fraction", + "pow", "preferred", "preferred?", "quantile-label", "rand", "rand-int", + "random-value", "re-quote", "real", "replace", "replace-first", "rest", + "round", "row-number", "segment-label", "sha1", "sha256", "sin", "sinh", + "sqrt", "square", "standard-deviation", "standard_deviation", "str", + "subs", "sum", "sum-squares", "sum-window", "sum_squares", "summary", + "summary-no", "summary-str", "tail", "tan", "tanh", "to-degrees", + "to-radians", "variance", "vectorize", "weighted-random-value", "window", + "winnow", "within-percentiles?", "z-score", + ) + + valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+' + + tokens = { + 'root': [ + # whitespaces - usually not relevant (r'[,]+', Text), (r'\s+', Whitespace), - - # numbers - (r'-?\d+\.\d+', Number.Float), - (r'-?\d+', Number.Integer), - (r'0x-?[a-f\d]+', Number.Hex), - - # strings, symbols and characters + + # numbers + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + (r'0x-?[a-f\d]+', Number.Hex), + + # strings, symbols and characters (r'"(\\\\|\\[^\\]|[^"\\])*"', String), - (r"\\(.|[a-z]+)", String.Char), - - # expression template placeholder - (r'_', String.Symbol), - - # highlight the special forms - (words(special_forms, suffix=' '), Keyword), - - # highlight the builtins - (words(builtins, suffix=' '), Name.Builtin), - - # the remaining functions - (r'(?<=\()' + valid_name, Name.Function), - - # find the remaining variables - (valid_name, Name.Variable), - - # parentheses - (r'(\(|\))', Punctuation), - ], - } - - -class SnowballLexer(ExtendedRegexLexer): - """ - Lexer for `Snowball <http://snowballstem.org/>`_ source code. - - .. versionadded:: 2.2 - """ - - name = 'Snowball' - aliases = ['snowball'] - filenames = ['*.sbl'] - - _ws = r'\n\r\t ' - - def __init__(self, **options): - self._reset_stringescapes() - ExtendedRegexLexer.__init__(self, **options) - - def _reset_stringescapes(self): - self._start = "'" - self._end = "'" - - def _string(do_string_first): - def callback(lexer, match, ctx): - s = match.start() - text = match.group() - string = re.compile(r'([^%s]*)(.)' % re.escape(lexer._start)).match - escape = re.compile(r'([^%s]*)(.)' % re.escape(lexer._end)).match - pos = 0 - do_string = do_string_first - while pos < len(text): - if do_string: - match = string(text, pos) - yield s + match.start(1), String.Single, match.group(1) - if match.group(2) == "'": - yield s + match.start(2), String.Single, match.group(2) - ctx.stack.pop() - break - yield s + match.start(2), String.Escape, match.group(2) - pos = match.end() - match = escape(text, pos) - yield s + match.start(), String.Escape, match.group() - if match.group(2) != lexer._end: - ctx.stack[-1] = 'escape' - break - pos = match.end() - do_string = True - ctx.pos = s + match.end() - return callback - - def _stringescapes(lexer, match, ctx): - lexer._start = match.group(3) - lexer._end = match.group(5) + (r"\\(.|[a-z]+)", String.Char), + + # expression template placeholder + (r'_', String.Symbol), + + # highlight the special forms + (words(special_forms, suffix=' '), Keyword), + + # highlight the builtins + (words(builtins, suffix=' '), Name.Builtin), + + # the remaining functions + (r'(?<=\()' + valid_name, Name.Function), + + # find the remaining variables + (valid_name, Name.Variable), + + # parentheses + (r'(\(|\))', Punctuation), + ], + } + + +class SnowballLexer(ExtendedRegexLexer): + """ + Lexer for `Snowball <http://snowballstem.org/>`_ source code. + + .. versionadded:: 2.2 + """ + + name = 'Snowball' + aliases = ['snowball'] + filenames = ['*.sbl'] + + _ws = r'\n\r\t ' + + def __init__(self, **options): + self._reset_stringescapes() + ExtendedRegexLexer.__init__(self, **options) + + def _reset_stringescapes(self): + self._start = "'" + self._end = "'" + + def _string(do_string_first): + def callback(lexer, match, ctx): + s = match.start() + text = match.group() + string = re.compile(r'([^%s]*)(.)' % re.escape(lexer._start)).match + escape = re.compile(r'([^%s]*)(.)' % re.escape(lexer._end)).match + pos = 0 + do_string = do_string_first + while pos < len(text): + if do_string: + match = string(text, pos) + yield s + match.start(1), String.Single, match.group(1) + if match.group(2) == "'": + yield s + match.start(2), String.Single, match.group(2) + ctx.stack.pop() + break + yield s + match.start(2), String.Escape, match.group(2) + pos = match.end() + match = escape(text, pos) + yield s + match.start(), String.Escape, match.group() + if match.group(2) != lexer._end: + ctx.stack[-1] = 'escape' + break + pos = match.end() + do_string = True + ctx.pos = s + match.end() + return callback + + def _stringescapes(lexer, match, ctx): + lexer._start = match.group(3) + lexer._end = match.group(5) return bygroups(Keyword.Reserved, Whitespace, String.Escape, Whitespace, - String.Escape)(lexer, match, ctx) - - tokens = { - 'root': [ - (words(('len', 'lenof'), suffix=r'\b'), Operator.Word), - include('root1'), - ], - 'root1': [ + String.Escape)(lexer, match, ctx) + + tokens = { + 'root': [ + (words(('len', 'lenof'), suffix=r'\b'), Operator.Word), + include('root1'), + ], + 'root1': [ (r'[%s]+' % _ws, Whitespace), - (r'\d+', Number.Integer), - (r"'", String.Single, 'string'), - (r'[()]', Punctuation), - (r'/\*[\w\W]*?\*/', Comment.Multiline), - (r'//.*', Comment.Single), - (r'[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]]', Operator), - (words(('as', 'get', 'hex', 'among', 'define', 'decimal', - 'backwardmode'), suffix=r'\b'), - Keyword.Reserved), - (words(('strings', 'booleans', 'integers', 'routines', 'externals', - 'groupings'), suffix=r'\b'), - Keyword.Reserved, 'declaration'), - (words(('do', 'or', 'and', 'for', 'hop', 'non', 'not', 'set', 'try', - 'fail', 'goto', 'loop', 'next', 'test', 'true', - 'false', 'unset', 'atmark', 'attach', 'delete', 'gopast', - 'insert', 'repeat', 'sizeof', 'tomark', 'atleast', - 'atlimit', 'reverse', 'setmark', 'tolimit', 'setlimit', - 'backwards', 'substring'), suffix=r'\b'), - Operator.Word), - (words(('size', 'limit', 'cursor', 'maxint', 'minint'), - suffix=r'\b'), - Name.Builtin), - (r'(stringdef\b)([%s]*)([^%s]+)' % (_ws, _ws), + (r'\d+', Number.Integer), + (r"'", String.Single, 'string'), + (r'[()]', Punctuation), + (r'/\*[\w\W]*?\*/', Comment.Multiline), + (r'//.*', Comment.Single), + (r'[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]]', Operator), + (words(('as', 'get', 'hex', 'among', 'define', 'decimal', + 'backwardmode'), suffix=r'\b'), + Keyword.Reserved), + (words(('strings', 'booleans', 'integers', 'routines', 'externals', + 'groupings'), suffix=r'\b'), + Keyword.Reserved, 'declaration'), + (words(('do', 'or', 'and', 'for', 'hop', 'non', 'not', 'set', 'try', + 'fail', 'goto', 'loop', 'next', 'test', 'true', + 'false', 'unset', 'atmark', 'attach', 'delete', 'gopast', + 'insert', 'repeat', 'sizeof', 'tomark', 'atleast', + 'atlimit', 'reverse', 'setmark', 'tolimit', 'setlimit', + 'backwards', 'substring'), suffix=r'\b'), + Operator.Word), + (words(('size', 'limit', 'cursor', 'maxint', 'minint'), + suffix=r'\b'), + Name.Builtin), + (r'(stringdef\b)([%s]*)([^%s]+)' % (_ws, _ws), bygroups(Keyword.Reserved, Whitespace, String.Escape)), - (r'(stringescapes\b)([%s]*)(.)([%s]*)(.)' % (_ws, _ws), - _stringescapes), - (r'[A-Za-z]\w*', Name), - ], - 'declaration': [ - (r'\)', Punctuation, '#pop'), - (words(('len', 'lenof'), suffix=r'\b'), Name, - ('root1', 'declaration')), - include('root1'), - ], - 'string': [ - (r"[^']*'", _string(True)), - ], - 'escape': [ - (r"[^']*'", _string(False)), - ], - } - - def get_tokens_unprocessed(self, text=None, context=None): - self._reset_stringescapes() - return ExtendedRegexLexer.get_tokens_unprocessed(self, text, context) + (r'(stringescapes\b)([%s]*)(.)([%s]*)(.)' % (_ws, _ws), + _stringescapes), + (r'[A-Za-z]\w*', Name), + ], + 'declaration': [ + (r'\)', Punctuation, '#pop'), + (words(('len', 'lenof'), suffix=r'\b'), Name, + ('root1', 'declaration')), + include('root1'), + ], + 'string': [ + (r"[^']*'", _string(True)), + ], + 'escape': [ + (r"[^']*'", _string(False)), + ], + } + + def get_tokens_unprocessed(self, text=None, context=None): + self._reset_stringescapes() + return ExtendedRegexLexer.get_tokens_unprocessed(self, text, context) diff --git a/contrib/python/Pygments/py3/pygments/lexers/dylan.py b/contrib/python/Pygments/py3/pygments/lexers/dylan.py index 4871d0adf4..74f81191dc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dylan.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dylan.py @@ -178,10 +178,10 @@ class DylanLexer(RegexLexer): (valid_name + ':', Keyword), # class names - ('<' + valid_name + '>', Name.Class), + ('<' + valid_name + '>', Name.Class), # define variable forms. - (r'\*' + valid_name + r'\*', Name.Variable.Global), + (r'\*' + valid_name + r'\*', Name.Variable.Global), # define constant forms. (r'\$' + valid_name, Name.Constant), @@ -259,7 +259,7 @@ class DylanConsoleLexer(Lexer): mimetypes = ['text/x-dylan-console'] _line_re = re.compile('.*?\n') - _prompt_re = re.compile(r'\?| ') + _prompt_re = re.compile(r'\?| ') def get_tokens_unprocessed(self, text): dylexer = DylanLexer(**self.options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/elm.py b/contrib/python/Pygments/py3/pygments/lexers/elm.py index 6e07c27ab7..298dbf5986 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/elm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/elm.py @@ -27,7 +27,7 @@ class ElmLexer(RegexLexer): filenames = ['*.elm'] mimetypes = ['text/x-elm'] - validName = r'[a-z_][a-zA-Z0-9_\']*' + validName = r'[a-z_][a-zA-Z0-9_\']*' specialName = r'^main ' @@ -46,7 +46,7 @@ class ElmLexer(RegexLexer): 'root': [ # Comments - (r'\{-', Comment.Multiline, 'comment'), + (r'\{-', Comment.Multiline, 'comment'), (r'--.*', Comment.Single), # Whitespace @@ -88,20 +88,20 @@ class ElmLexer(RegexLexer): (validName, Name.Variable), # Parens - (r'[,()\[\]{}]', Punctuation), + (r'[,()\[\]{}]', Punctuation), ], 'comment': [ - (r'-(?!\})', Comment.Multiline), - (r'\{-', Comment.Multiline, 'comment'), + (r'-(?!\})', Comment.Multiline), + (r'\{-', Comment.Multiline, 'comment'), (r'[^-}]', Comment.Multiline), - (r'-\}', Comment.Multiline, '#pop'), + (r'-\}', Comment.Multiline, '#pop'), ], 'doublequote': [ - (r'\\u[0-9a-fA-F]{4}', String.Escape), - (r'\\[nrfvb\\"]', String.Escape), + (r'\\u[0-9a-fA-F]{4}', String.Escape), + (r'\\[nrfvb\\"]', String.Escape), (r'[^"]', String), (r'"', String, '#pop'), ], diff --git a/contrib/python/Pygments/py3/pygments/lexers/erlang.py b/contrib/python/Pygments/py3/pygments/lexers/erlang.py index bd54019ee8..2563ffc263 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/erlang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/erlang.py @@ -81,11 +81,11 @@ class ErlangLexer(RegexLexer): variable_re = r'(?:[A-Z_]\w*)' - esc_char_re = r'[bdefnrstv\'"\\]' - esc_octal_re = r'[0-7][0-7]?[0-7]?' - esc_hex_re = r'(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})' - esc_ctrl_re = r'\^[a-zA-Z]' - escape_re = r'(?:\\(?:'+esc_char_re+r'|'+esc_octal_re+r'|'+esc_hex_re+r'|'+esc_ctrl_re+r'))' + esc_char_re = r'[bdefnrstv\'"\\]' + esc_octal_re = r'[0-7][0-7]?[0-7]?' + esc_hex_re = r'(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})' + esc_ctrl_re = r'\^[a-zA-Z]' + escape_re = r'(?:\\(?:'+esc_char_re+r'|'+esc_octal_re+r'|'+esc_hex_re+r'|'+esc_ctrl_re+r'))' macro_re = r'(?:'+variable_re+r'|'+atom_re+r')' @@ -115,18 +115,18 @@ class ErlangLexer(RegexLexer): (r'\?'+macro_re, Name.Constant), (r'\$(?:'+escape_re+r'|\\[ %]|[^\\])', String.Char), (r'#'+atom_re+r'(:?\.'+atom_re+r')?', Name.Label), - - # Erlang script shebang - (r'\A#!.+\n', Comment.Hashbang), - - # EEP 43: Maps - # http://www.erlang.org/eeps/eep-0043.html - (r'#\{', Punctuation, 'map_key'), + + # Erlang script shebang + (r'\A#!.+\n', Comment.Hashbang), + + # EEP 43: Maps + # http://www.erlang.org/eeps/eep-0043.html + (r'#\{', Punctuation, 'map_key'), ], 'string': [ (escape_re, String.Escape), (r'"', String, '#pop'), - (r'~[0-9.*]*[~#+BPWXb-ginpswx]', String.Interpol), + (r'~[0-9.*]*[~#+BPWXb-ginpswx]', String.Interpol), (r'[^"\\~]+', String), (r'~', String), ], @@ -137,17 +137,17 @@ class ErlangLexer(RegexLexer): bygroups(Name.Entity, Whitespace, Punctuation, Name.Label), '#pop'), (atom_re, Name.Entity, '#pop'), ], - 'map_key': [ - include('root'), - (r'=>', Punctuation, 'map_val'), - (r':=', Punctuation, 'map_val'), - (r'\}', Punctuation, '#pop'), - ], - 'map_val': [ - include('root'), - (r',', Punctuation, '#pop'), - (r'(?=\})', Punctuation, '#pop'), - ], + 'map_key': [ + include('root'), + (r'=>', Punctuation, 'map_val'), + (r':=', Punctuation, 'map_val'), + (r'\}', Punctuation, '#pop'), + ], + 'map_val': [ + include('root'), + (r',', Punctuation, '#pop'), + (r'(?=\})', Punctuation, '#pop'), + ], } @@ -237,11 +237,11 @@ class ElixirLexer(RegexLexer): KEYWORD_OPERATOR = ('not', 'and', 'or', 'when', 'in') BUILTIN = ( 'case', 'cond', 'for', 'if', 'unless', 'try', 'receive', 'raise', - 'quote', 'unquote', 'unquote_splicing', 'throw', 'super', + 'quote', 'unquote', 'unquote_splicing', 'throw', 'super', ) BUILTIN_DECLARATION = ( 'def', 'defp', 'defmodule', 'defprotocol', 'defmacro', 'defmacrop', - 'defdelegate', 'defexception', 'defstruct', 'defimpl', 'defcallback', + 'defdelegate', 'defexception', 'defstruct', 'defimpl', 'defcallback', ) BUILTIN_NAMESPACE = ('import', 'require', 'use', 'alias') @@ -260,7 +260,7 @@ class ElixirLexer(RegexLexer): OPERATORS1 = ('<', '>', '+', '-', '*', '/', '!', '^', '&') PUNCTUATION = ( - '\\\\', '<<', '>>', '=>', '(', ')', ':', ';', ',', '[', ']', + '\\\\', '<<', '>>', '=>', '(', ')', ':', ';', ',', '[', ']', ) def get_tokens_unprocessed(self, text): @@ -342,7 +342,7 @@ class ElixirLexer(RegexLexer): op1_re = "|".join(re.escape(s) for s in OPERATORS1) ops_re = r'(?:%s|%s|%s)' % (op3_re, op2_re, op1_re) punctuation_re = "|".join(re.escape(s) for s in PUNCTUATION) - alnum = r'\w' + alnum = r'\w' name_re = r'(?:\.\.\.|[a-z_]%s*[!?]?)' % alnum modname_re = r'[A-Z]%(alnum)s*(?:\.[A-Z]%(alnum)s*)*' % {'alnum': alnum} complex_name_re = r'(?:%s|%s|%s)' % (name_re, modname_re, ops_re) diff --git a/contrib/python/Pygments/py3/pygments/lexers/esoteric.py b/contrib/python/Pygments/py3/pygments/lexers/esoteric.py index e7cdc91546..a884d4687b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/esoteric.py +++ b/contrib/python/Pygments/py3/pygments/lexers/esoteric.py @@ -12,8 +12,8 @@ from pygments.lexer import RegexLexer, include, words, bygroups from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Error, Whitespace -__all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'CAmkESLexer', - 'CapDLLexer', 'AheuiLexer'] +__all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'CAmkESLexer', + 'CapDLLexer', 'AheuiLexer'] class BrainfuckLexer(RegexLexer): @@ -115,7 +115,7 @@ class CAmkESLexer(RegexLexer): filenames = ['*.camkes', '*.idl4'] tokens = { - 'root': [ + 'root': [ # C pre-processor directive (r'^(\s*)(#.*)(\n)', bygroups(Whitespace, Comment.Preproc, Whitespace)), @@ -125,25 +125,25 @@ class CAmkESLexer(RegexLexer): (r'/\*(.|\n)*?\*/', Comment), (r'//.*$', Comment), - (r'[\[(){},.;\]]', Punctuation), - (r'[~!%^&*+=|?:<>/-]', Operator), + (r'[\[(){},.;\]]', Punctuation), + (r'[~!%^&*+=|?:<>/-]', Operator), (words(('assembly', 'attribute', 'component', 'composition', 'configuration', 'connection', 'connector', 'consumes', - 'control', 'dataport', 'Dataport', 'Dataports', 'emits', - 'event', 'Event', 'Events', 'export', 'from', 'group', - 'hardware', 'has', 'interface', 'Interface', 'maybe', - 'procedure', 'Procedure', 'Procedures', 'provides', - 'template', 'thread', 'threads', 'to', 'uses', 'with'), - suffix=r'\b'), Keyword), + 'control', 'dataport', 'Dataport', 'Dataports', 'emits', + 'event', 'Event', 'Events', 'export', 'from', 'group', + 'hardware', 'has', 'interface', 'Interface', 'maybe', + 'procedure', 'Procedure', 'Procedures', 'provides', + 'template', 'thread', 'threads', 'to', 'uses', 'with'), + suffix=r'\b'), Keyword), (words(('bool', 'boolean', 'Buf', 'char', 'character', 'double', 'float', 'in', 'inout', 'int', 'int16_6', 'int32_t', 'int64_t', 'int8_t', 'integer', 'mutex', 'out', 'real', - 'refin', 'semaphore', 'signed', 'string', 'struct', - 'uint16_t', 'uint32_t', 'uint64_t', 'uint8_t', 'uintptr_t', - 'unsigned', 'void'), - suffix=r'\b'), Keyword.Type), + 'refin', 'semaphore', 'signed', 'string', 'struct', + 'uint16_t', 'uint32_t', 'uint64_t', 'uint8_t', 'uintptr_t', + 'unsigned', 'void'), + suffix=r'\b'), Keyword.Type), # Recognised attributes (r'[a-zA-Z_]\w*_(priority|domain|buffer)', Keyword.Reserved), @@ -163,7 +163,7 @@ class CAmkESLexer(RegexLexer): (r'-?[\d]+', Number), (r'-?[\d]+\.[\d]+', Number.Float), (r'"[^"]*"', String), - (r'[Tt]rue|[Ff]alse', Name.Builtin), + (r'[Tt]rue|[Ff]alse', Name.Builtin), # Identifiers (r'[a-zA-Z_]\w*', Name), @@ -171,66 +171,66 @@ class CAmkESLexer(RegexLexer): } -class CapDLLexer(RegexLexer): - """ - Basic lexer for - `CapDL <https://ssrg.nicta.com.au/publications/nictaabstracts/Kuz_KLW_10.abstract.pml>`_. - - The source of the primary tool that reads such specifications is available - at https://github.com/seL4/capdl/tree/master/capDL-tool. Note that this - lexer only supports a subset of the grammar. For example, identifiers can - shadow type names, but these instances are currently incorrectly - highlighted as types. Supporting this would need a stateful lexer that is - considered unnecessarily complex for now. - - .. versionadded:: 2.2 - """ - name = 'CapDL' - aliases = ['capdl'] - filenames = ['*.cdl'] - - tokens = { - 'root': [ - # C pre-processor directive +class CapDLLexer(RegexLexer): + """ + Basic lexer for + `CapDL <https://ssrg.nicta.com.au/publications/nictaabstracts/Kuz_KLW_10.abstract.pml>`_. + + The source of the primary tool that reads such specifications is available + at https://github.com/seL4/capdl/tree/master/capDL-tool. Note that this + lexer only supports a subset of the grammar. For example, identifiers can + shadow type names, but these instances are currently incorrectly + highlighted as types. Supporting this would need a stateful lexer that is + considered unnecessarily complex for now. + + .. versionadded:: 2.2 + """ + name = 'CapDL' + aliases = ['capdl'] + filenames = ['*.cdl'] + + tokens = { + 'root': [ + # C pre-processor directive (r'^(\s*)(#.*)(\n)', bygroups(Whitespace, Comment.Preproc, Whitespace)), - - # Whitespace, comments + + # Whitespace, comments (r'\s+', Whitespace), - (r'/\*(.|\n)*?\*/', Comment), + (r'/\*(.|\n)*?\*/', Comment), (r'(//|--).*$', Comment), - - (r'[<>\[(){},:;=\]]', Punctuation), - (r'\.\.', Punctuation), - - (words(('arch', 'arm11', 'caps', 'child_of', 'ia32', 'irq', 'maps', - 'objects'), suffix=r'\b'), Keyword), - - (words(('aep', 'asid_pool', 'cnode', 'ep', 'frame', 'io_device', - 'io_ports', 'io_pt', 'notification', 'pd', 'pt', 'tcb', - 'ut', 'vcpu'), suffix=r'\b'), Keyword.Type), - - # Properties - (words(('asid', 'addr', 'badge', 'cached', 'dom', 'domainID', 'elf', - 'fault_ep', 'G', 'guard', 'guard_size', 'init', 'ip', - 'prio', 'sp', 'R', 'RG', 'RX', 'RW', 'RWG', 'RWX', 'W', - 'WG', 'WX', 'level', 'masked', 'master_reply', 'paddr', - 'ports', 'reply', 'uncached'), suffix=r'\b'), - Keyword.Reserved), - - # Literals - (r'0[xX][\da-fA-F]+', Number.Hex), - (r'\d+(\.\d+)?(k|M)?', Number), - (words(('bits',), suffix=r'\b'), Number), - (words(('cspace', 'vspace', 'reply_slot', 'caller_slot', - 'ipc_buffer_slot'), suffix=r'\b'), Number), - - # Identifiers - (r'[a-zA-Z_][-@\.\w]*', Name), - ], - } - - + + (r'[<>\[(){},:;=\]]', Punctuation), + (r'\.\.', Punctuation), + + (words(('arch', 'arm11', 'caps', 'child_of', 'ia32', 'irq', 'maps', + 'objects'), suffix=r'\b'), Keyword), + + (words(('aep', 'asid_pool', 'cnode', 'ep', 'frame', 'io_device', + 'io_ports', 'io_pt', 'notification', 'pd', 'pt', 'tcb', + 'ut', 'vcpu'), suffix=r'\b'), Keyword.Type), + + # Properties + (words(('asid', 'addr', 'badge', 'cached', 'dom', 'domainID', 'elf', + 'fault_ep', 'G', 'guard', 'guard_size', 'init', 'ip', + 'prio', 'sp', 'R', 'RG', 'RX', 'RW', 'RWG', 'RWX', 'W', + 'WG', 'WX', 'level', 'masked', 'master_reply', 'paddr', + 'ports', 'reply', 'uncached'), suffix=r'\b'), + Keyword.Reserved), + + # Literals + (r'0[xX][\da-fA-F]+', Number.Hex), + (r'\d+(\.\d+)?(k|M)?', Number), + (words(('bits',), suffix=r'\b'), Number), + (words(('cspace', 'vspace', 'reply_slot', 'caller_slot', + 'ipc_buffer_slot'), suffix=r'\b'), Number), + + # Identifiers + (r'[a-zA-Z_][-@\.\w]*', Name), + ], + } + + class RedcodeLexer(RegexLexer): """ A simple Redcode lexer based on ICWS'94. @@ -267,20 +267,20 @@ class RedcodeLexer(RegexLexer): } -class AheuiLexer(RegexLexer): +class AheuiLexer(RegexLexer): """ - Aheui_ Lexer. + Aheui_ Lexer. + + Aheui_ is esoteric language based on Korean alphabets. + + .. _Aheui: http://aheui.github.io/ - Aheui_ is esoteric language based on Korean alphabets. - - .. _Aheui: http://aheui.github.io/ - """ - name = 'Aheui' - aliases = ['aheui'] - filenames = ['*.aheui'] - + name = 'Aheui' + aliases = ['aheui'] + filenames = ['*.aheui'] + tokens = { 'root': [ ('[' @@ -300,6 +300,6 @@ class AheuiLexer(RegexLexer): '파-팧퍄-퍟퍼-펗펴-폏포-퐇표-풓퓨-픻' '하-핳햐-햫허-헣혀-혛호-홓효-훟휴-힇' ']', Operator), - ('.', Comment), + ('.', Comment), ], } diff --git a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py index 6bfddaec1a..6d282c96bb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py @@ -3,7 +3,7 @@ ~~~~~~~~~~~~~~~~~~~~~ Pygments lexers for Ezhil language. - + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -15,7 +15,7 @@ from pygments.token import String, Number, Punctuation, Operator, Whitespace __all__ = ['EzhilLexer'] - + class EzhilLexer(RegexLexer): """ Lexer for `Ezhil, a Tamil script-based programming language <http://ezhillang.org>`_ @@ -62,7 +62,7 @@ class EzhilLexer(RegexLexer): (r'(?u)\d+', Number.Integer), ] } - + def analyse_text(text): """This language uses Tamil-script. We'll assume that if there's a decent amount of Tamil-characters, it's this language. This assumption diff --git a/contrib/python/Pygments/py3/pygments/lexers/felix.py b/contrib/python/Pygments/py3/pygments/lexers/felix.py index b92f9eb885..55dee25e6d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/felix.py +++ b/contrib/python/Pygments/py3/pygments/lexers/felix.py @@ -239,7 +239,7 @@ class FelixLexer(RegexLexer): ], 'strings': [ (r'%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' - '[hlL]?[E-GXc-giorsux%]', String.Interpol), + '[hlL]?[E-GXc-giorsux%]', String.Interpol), (r'[^\\\'"%\n]+', String), # quotes, percents and backslashes must be parsed one at a time (r'[\'"\\]', String), diff --git a/contrib/python/Pygments/py3/pygments/lexers/floscript.py b/contrib/python/Pygments/py3/pygments/lexers/floscript.py index d022a6ae37..e9b7da2bfc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/floscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/floscript.py @@ -1,81 +1,81 @@ -""" - pygments.lexers.floscript - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for FloScript - +""" + pygments.lexers.floscript + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for FloScript + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - + :license: BSD, see LICENSE for details. +""" + from pygments.lexer import RegexLexer, include, bygroups -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Whitespace - -__all__ = ['FloScriptLexer'] - - -class FloScriptLexer(RegexLexer): - """ - For `FloScript <https://github.com/ioflo/ioflo>`_ configuration language source code. - - .. versionadded:: 2.4 - """ - - name = 'FloScript' - aliases = ['floscript', 'flo'] - filenames = ['*.flo'] - - def innerstring_rules(ttype): - return [ - # the old style '%s' % (...) string formatting - (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' - '[hlL]?[E-GXc-giorsux%]', String.Interpol), - # backslashes, quotes and formatting signs must be parsed one at a time - (r'[^\\\'"%\n]+', ttype), - (r'[\'"\\]', ttype), - # unhandled string formatting sign - (r'%', ttype), - # newlines are an error (use "nl" state) - ] - - tokens = { - 'root': [ + +__all__ = ['FloScriptLexer'] + + +class FloScriptLexer(RegexLexer): + """ + For `FloScript <https://github.com/ioflo/ioflo>`_ configuration language source code. + + .. versionadded:: 2.4 + """ + + name = 'FloScript' + aliases = ['floscript', 'flo'] + filenames = ['*.flo'] + + def innerstring_rules(ttype): + return [ + # the old style '%s' % (...) string formatting + (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' + '[hlL]?[E-GXc-giorsux%]', String.Interpol), + # backslashes, quotes and formatting signs must be parsed one at a time + (r'[^\\\'"%\n]+', ttype), + (r'[\'"\\]', ttype), + # unhandled string formatting sign + (r'%', ttype), + # newlines are an error (use "nl" state) + ] + + tokens = { + 'root': [ (r'\s+', Whitespace), - - (r'[]{}:(),;[]', Punctuation), + + (r'[]{}:(),;[]', Punctuation), (r'(\\)(\n)', bygroups(Text, Whitespace)), - (r'\\', Text), - (r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|' - r'and|not)\b', Operator.Word), - (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator), - (r'(load|init|server|logger|log|loggee|first|over|under|next|done|timeout|' - r'repeat|native|benter|enter|recur|exit|precur|renter|rexit|print|put|inc|' - r'copy|set|aux|rear|raze|go|let|do|bid|ready|start|stop|run|abort|use|flo|' - r'give|take)\b', Name.Builtin), - (r'(frame|framer|house)\b', Keyword), - ('"', String, 'string'), - - include('name'), - include('numbers'), + (r'\\', Text), + (r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|' + r'and|not)\b', Operator.Word), + (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator), + (r'(load|init|server|logger|log|loggee|first|over|under|next|done|timeout|' + r'repeat|native|benter|enter|recur|exit|precur|renter|rexit|print|put|inc|' + r'copy|set|aux|rear|raze|go|let|do|bid|ready|start|stop|run|abort|use|flo|' + r'give|take)\b', Name.Builtin), + (r'(frame|framer|house)\b', Keyword), + ('"', String, 'string'), + + include('name'), + include('numbers'), (r'#.+$', Comment.Single), - ], - 'string': [ - ('[^"]+', String), - ('"', String, '#pop'), - ], - 'numbers': [ - (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float), - (r'\d+[eE][+-]?[0-9]+j?', Number.Float), - (r'0[0-7]+j?', Number.Oct), - (r'0[bB][01]+', Number.Bin), - (r'0[xX][a-fA-F0-9]+', Number.Hex), - (r'\d+L', Number.Integer.Long), - (r'\d+j?', Number.Integer) - ], - - 'name': [ - (r'@[\w.]+', Name.Decorator), - (r'[a-zA-Z_]\w*', Name), - ], - } + ], + 'string': [ + ('[^"]+', String), + ('"', String, '#pop'), + ], + 'numbers': [ + (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float), + (r'\d+[eE][+-]?[0-9]+j?', Number.Float), + (r'0[0-7]+j?', Number.Oct), + (r'0[bB][01]+', Number.Bin), + (r'0[xX][a-fA-F0-9]+', Number.Hex), + (r'\d+L', Number.Integer.Long), + (r'\d+j?', Number.Integer) + ], + + 'name': [ + (r'@[\w.]+', Name.Decorator), + (r'[a-zA-Z_]\w*', Name), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/forth.py b/contrib/python/Pygments/py3/pygments/lexers/forth.py index 4895721eb8..1f67aa4ed5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/forth.py +++ b/contrib/python/Pygments/py3/pygments/lexers/forth.py @@ -1,137 +1,137 @@ -""" - pygments.lexers.forth - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for the Forth language. - +""" + pygments.lexers.forth + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Forth language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - + :license: BSD, see LICENSE for details. +""" + +import re + from pygments.lexer import RegexLexer, bygroups from pygments.token import Text, Comment, Keyword, Name, String, Number, \ Whitespace - - -__all__ = ['ForthLexer'] - - -class ForthLexer(RegexLexer): - """ - Lexer for Forth files. - - .. versionadded:: 2.2 - """ - name = 'Forth' - aliases = ['forth'] - filenames = ['*.frt', '*.fs'] - mimetypes = ['application/x-forth'] - - flags = re.IGNORECASE | re.MULTILINE - - tokens = { - 'root': [ + + +__all__ = ['ForthLexer'] + + +class ForthLexer(RegexLexer): + """ + Lexer for Forth files. + + .. versionadded:: 2.2 + """ + name = 'Forth' + aliases = ['forth'] + filenames = ['*.frt', '*.fs'] + mimetypes = ['application/x-forth'] + + flags = re.IGNORECASE | re.MULTILINE + + tokens = { + 'root': [ (r'\s+', Whitespace), - # All comment types + # All comment types (r'\\.*?$', Comment.Single), - (r'\([\s].*?\)', Comment.Single), - # defining words. The next word is a new command name - (r'(:|variable|constant|value|buffer:)(\s+)', + (r'\([\s].*?\)', Comment.Single), + # defining words. The next word is a new command name + (r'(:|variable|constant|value|buffer:)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'worddef'), - # strings are rather simple + # strings are rather simple (r'([.sc]")(\s+?)', bygroups(String, Whitespace), 'stringdef'), - # keywords from the various wordsets - # *** Wordset BLOCK - (r'(blk|block|buffer|evaluate|flush|load|save-buffers|update|' - # *** Wordset BLOCK-EXT - r'empty-buffers|list|refill|scr|thru|' - # *** Wordset CORE - r'\#s|\*\/mod|\+loop|\/mod|0<|0=|1\+|1-|2!|' - r'2\*|2\/|2@|2drop|2dup|2over|2swap|>body|' - r'>in|>number|>r|\?dup|abort|abort\"|abs|' - r'accept|align|aligned|allot|and|base|begin|' - r'bl|c!|c,|c@|cell\+|cells|char|char\+|' - r'chars|constant|count|cr|create|decimal|' - r'depth|do|does>|drop|dup|else|emit|environment\?|' - r'evaluate|execute|exit|fill|find|fm\/mod|' - r'here|hold|i|if|immediate|invert|j|key|' - r'leave|literal|loop|lshift|m\*|max|min|' - r'mod|move|negate|or|over|postpone|quit|' - r'r>|r@|recurse|repeat|rot|rshift|s\"|s>d|' - r'sign|sm\/rem|source|space|spaces|state|swap|' - r'then|type|u\.|u\<|um\*|um\/mod|unloop|until|' - r'variable|while|word|xor|\[char\]|\[\'\]|' - r'@|!|\#|<\#|\#>|:|;|\+|-|\*|\/|,|<|>|\|1\+|1-|\.|' + # keywords from the various wordsets + # *** Wordset BLOCK + (r'(blk|block|buffer|evaluate|flush|load|save-buffers|update|' + # *** Wordset BLOCK-EXT + r'empty-buffers|list|refill|scr|thru|' + # *** Wordset CORE + r'\#s|\*\/mod|\+loop|\/mod|0<|0=|1\+|1-|2!|' + r'2\*|2\/|2@|2drop|2dup|2over|2swap|>body|' + r'>in|>number|>r|\?dup|abort|abort\"|abs|' + r'accept|align|aligned|allot|and|base|begin|' + r'bl|c!|c,|c@|cell\+|cells|char|char\+|' + r'chars|constant|count|cr|create|decimal|' + r'depth|do|does>|drop|dup|else|emit|environment\?|' + r'evaluate|execute|exit|fill|find|fm\/mod|' + r'here|hold|i|if|immediate|invert|j|key|' + r'leave|literal|loop|lshift|m\*|max|min|' + r'mod|move|negate|or|over|postpone|quit|' + r'r>|r@|recurse|repeat|rot|rshift|s\"|s>d|' + r'sign|sm\/rem|source|space|spaces|state|swap|' + r'then|type|u\.|u\<|um\*|um\/mod|unloop|until|' + r'variable|while|word|xor|\[char\]|\[\'\]|' + r'@|!|\#|<\#|\#>|:|;|\+|-|\*|\/|,|<|>|\|1\+|1-|\.|' # *** Wordset CORE-EXT - r'\.r|0<>|' - r'0>|2>r|2r>|2r@|:noname|\?do|again|c\"|' - r'case|compile,|endcase|endof|erase|false|' - r'hex|marker|nip|of|pad|parse|pick|refill|' - r'restore-input|roll|save-input|source-id|to|' - r'true|tuck|u\.r|u>|unused|value|within|' - r'\[compile\]|' + r'\.r|0<>|' + r'0>|2>r|2r>|2r@|:noname|\?do|again|c\"|' + r'case|compile,|endcase|endof|erase|false|' + r'hex|marker|nip|of|pad|parse|pick|refill|' + r'restore-input|roll|save-input|source-id|to|' + r'true|tuck|u\.r|u>|unused|value|within|' + r'\[compile\]|' # *** Wordset CORE-EXT-obsolescent - r'\#tib|convert|expect|query|span|' - r'tib|' + r'\#tib|convert|expect|query|span|' + r'tib|' # *** Wordset DOUBLE - r'2constant|2literal|2variable|d\+|d-|' - r'd\.|d\.r|d0<|d0=|d2\*|d2\/|d<|d=|d>s|' - r'dabs|dmax|dmin|dnegate|m\*\/|m\+|' + r'2constant|2literal|2variable|d\+|d-|' + r'd\.|d\.r|d0<|d0=|d2\*|d2\/|d<|d=|d>s|' + r'dabs|dmax|dmin|dnegate|m\*\/|m\+|' # *** Wordset DOUBLE-EXT - r'2rot|du<|' + r'2rot|du<|' # *** Wordset EXCEPTION - r'catch|throw|' + r'catch|throw|' # *** Wordset EXCEPTION-EXT - r'abort|abort\"|' + r'abort|abort\"|' # *** Wordset FACILITY - r'at-xy|key\?|page|' + r'at-xy|key\?|page|' # *** Wordset FACILITY-EXT - r'ekey|ekey>char|ekey\?|emit\?|ms|time&date|' + r'ekey|ekey>char|ekey\?|emit\?|ms|time&date|' # *** Wordset FILE - r'BIN|CLOSE-FILE|CREATE-FILE|DELETE-FILE|FILE-POSITION|' - r'FILE-SIZE|INCLUDE-FILE|INCLUDED|OPEN-FILE|R\/O|' - r'R\/W|READ-FILE|READ-LINE|REPOSITION-FILE|RESIZE-FILE|' - r'S\"|SOURCE-ID|W/O|WRITE-FILE|WRITE-LINE|' + r'BIN|CLOSE-FILE|CREATE-FILE|DELETE-FILE|FILE-POSITION|' + r'FILE-SIZE|INCLUDE-FILE|INCLUDED|OPEN-FILE|R\/O|' + r'R\/W|READ-FILE|READ-LINE|REPOSITION-FILE|RESIZE-FILE|' + r'S\"|SOURCE-ID|W/O|WRITE-FILE|WRITE-LINE|' # *** Wordset FILE-EXT - r'FILE-STATUS|FLUSH-FILE|REFILL|RENAME-FILE|' + r'FILE-STATUS|FLUSH-FILE|REFILL|RENAME-FILE|' # *** Wordset FLOAT - r'>float|d>f|' - r'f!|f\*|f\+|f-|f\/|f0<|f0=|f<|f>d|f@|' - r'falign|faligned|fconstant|fdepth|fdrop|fdup|' - r'fliteral|float\+|floats|floor|fmax|fmin|' - r'fnegate|fover|frot|fround|fswap|fvariable|' - r'represent|' + r'>float|d>f|' + r'f!|f\*|f\+|f-|f\/|f0<|f0=|f<|f>d|f@|' + r'falign|faligned|fconstant|fdepth|fdrop|fdup|' + r'fliteral|float\+|floats|floor|fmax|fmin|' + r'fnegate|fover|frot|fround|fswap|fvariable|' + r'represent|' # *** Wordset FLOAT-EXT - r'df!|df@|dfalign|dfaligned|dfloat\+|' - r'dfloats|f\*\*|f\.|fabs|facos|facosh|falog|' - r'fasin|fasinh|fatan|fatan2|fatanh|fcos|fcosh|' - r'fe\.|fexp|fexpm1|fln|flnp1|flog|fs\.|fsin|' - r'fsincos|fsinh|fsqrt|ftan|ftanh|f~|precision|' - r'set-precision|sf!|sf@|sfalign|sfaligned|sfloat\+|' - r'sfloats|' + r'df!|df@|dfalign|dfaligned|dfloat\+|' + r'dfloats|f\*\*|f\.|fabs|facos|facosh|falog|' + r'fasin|fasinh|fatan|fatan2|fatanh|fcos|fcosh|' + r'fe\.|fexp|fexpm1|fln|flnp1|flog|fs\.|fsin|' + r'fsincos|fsinh|fsqrt|ftan|ftanh|f~|precision|' + r'set-precision|sf!|sf@|sfalign|sfaligned|sfloat\+|' + r'sfloats|' # *** Wordset LOCAL - r'\(local\)|to|' + r'\(local\)|to|' # *** Wordset LOCAL-EXT - r'locals\||' + r'locals\||' # *** Wordset MEMORY - r'allocate|free|resize|' + r'allocate|free|resize|' # *** Wordset SEARCH - r'definitions|find|forth-wordlist|get-current|' - r'get-order|search-wordlist|set-current|set-order|' - r'wordlist|' + r'definitions|find|forth-wordlist|get-current|' + r'get-order|search-wordlist|set-current|set-order|' + r'wordlist|' # *** Wordset SEARCH-EXT - r'also|forth|only|order|previous|' + r'also|forth|only|order|previous|' # *** Wordset STRING - r'-trailing|\/string|blank|cmove|cmove>|compare|' - r'search|sliteral|' + r'-trailing|\/string|blank|cmove|cmove>|compare|' + r'search|sliteral|' # *** Wordset TOOLS - r'.s|dump|see|words|' + r'.s|dump|see|words|' # *** Wordset TOOLS-EXT - r';code|' - r'ahead|assembler|bye|code|cs-pick|cs-roll|' - r'editor|state|\[else\]|\[if\]|\[then\]|' + r';code|' + r'ahead|assembler|bye|code|cs-pick|cs-roll|' + r'editor|state|\[else\]|\[if\]|\[then\]|' # *** Wordset TOOLS-EXT-obsolescent r'forget|' # Forth 2012 @@ -139,37 +139,37 @@ class ForthLexer(RegexLexer): r'parse-name|buffer:|traverse-wordlist|n>r|nr>|2value|fvalue|' r'name>interpret|name>compile|name>string|' r'cfield:|end-structure)(?!\S)', Keyword), - - # Numbers - (r'(\$[0-9A-F]+)', Number.Hex), - (r'(\#|%|&|\-|\+)?[0-9]+', Number.Integer), - (r'(\#|%|&|\-|\+)?[0-9.]+', Keyword.Type), - # amforth specific - (r'(@i|!i|@e|!e|pause|noop|turnkey|sleep|' - r'itype|icompare|sp@|sp!|rp@|rp!|up@|up!|' - r'>a|a>|a@|a!|a@+|a@-|>b|b>|b@|b!|b@+|b@-|' - r'find-name|1ms|' + + # Numbers + (r'(\$[0-9A-F]+)', Number.Hex), + (r'(\#|%|&|\-|\+)?[0-9]+', Number.Integer), + (r'(\#|%|&|\-|\+)?[0-9.]+', Keyword.Type), + # amforth specific + (r'(@i|!i|@e|!e|pause|noop|turnkey|sleep|' + r'itype|icompare|sp@|sp!|rp@|rp!|up@|up!|' + r'>a|a>|a@|a!|a@+|a@-|>b|b>|b@|b!|b@+|b@-|' + r'find-name|1ms|' r'sp0|rp0|\(evaluate\)|int-trap|int!)(?!\S)', - Name.Constant), - # a proposal - (r'(do-recognizer|r:fail|recognizer:|get-recognizers|' - r'set-recognizers|r:float|r>comp|r>int|r>post|' - r'r:name|r:word|r:dnum|r:num|recognizer|forth-recognizer|' + Name.Constant), + # a proposal + (r'(do-recognizer|r:fail|recognizer:|get-recognizers|' + r'set-recognizers|r:float|r>comp|r>int|r>post|' + r'r:name|r:word|r:dnum|r:num|recognizer|forth-recognizer|' r'rec:num|rec:float|rec:word)(?!\S)', Name.Decorator), - # defining words. The next word is a new command name - (r'(Evalue|Rvalue|Uvalue|Edefer|Rdefer|Udefer)(\s+)', - bygroups(Keyword.Namespace, Text), 'worddef'), - + # defining words. The next word is a new command name + (r'(Evalue|Rvalue|Uvalue|Edefer|Rdefer|Udefer)(\s+)', + bygroups(Keyword.Namespace, Text), 'worddef'), + (r'\S+', Name.Function), # Anything else is executed - - ], - 'worddef': [ - (r'\S+', Name.Class, '#pop'), - ], - 'stringdef': [ - (r'[^"]+', String, '#pop'), - ], - } + + ], + 'worddef': [ + (r'\S+', Name.Class, '#pop'), + ], + 'stringdef': [ + (r'[^"]+', String, '#pop'), + ], + } def analyse_text(text): """Forth uses : COMMAND ; quite a lot in a single line, so we're trying diff --git a/contrib/python/Pygments/py3/pygments/lexers/fortran.py b/contrib/python/Pygments/py3/pygments/lexers/fortran.py index f02c80ab90..b5d977eaf0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/fortran.py +++ b/contrib/python/Pygments/py3/pygments/lexers/fortran.py @@ -10,7 +10,7 @@ import re -from pygments.lexer import RegexLexer, bygroups, include, words, using, default +from pygments.lexer import RegexLexer, bygroups, include, words, using, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Generic @@ -201,12 +201,12 @@ class FortranFixedLexer(RegexLexer): 'cont-char': [ (' ', Text, 'code'), ('0', Comment, 'code'), - ('.', Generic.Strong, 'code'), + ('.', Generic.Strong, 'code'), ], 'code': [ (r'(.{66})(.*)(\n)', bygroups(_lex_fortran, Comment, Text.Whitespace), 'root'), (r'(.*)(\n)', bygroups(_lex_fortran, Text.Whitespace), 'root'), - default('root'), - ] + default('root'), + ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/freefem.py b/contrib/python/Pygments/py3/pygments/lexers/freefem.py index d95715f2b7..532f134fa8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/freefem.py +++ b/contrib/python/Pygments/py3/pygments/lexers/freefem.py @@ -1,897 +1,897 @@ -""" - pygments.lexers.freefem - ~~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for FreeFem++ language. - +""" + pygments.lexers.freefem + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for FreeFem++ language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, include, bygroups, inherit, words, \ - default -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation - -from pygments.lexers.c_cpp import CLexer, CppLexer -from pygments.lexers import _mql_builtins - -__all__ = ['FreeFemLexer'] - - -class FreeFemLexer(CppLexer): - """ - For `FreeFem++ <https://freefem.org/>`_ source. - - This is an extension of the CppLexer, as the FreeFem Language is a superset - of C++. - - .. versionadded:: 2.4 - """ - - name = 'Freefem' - aliases = ['freefem'] - filenames = ['*.edp'] - mimetypes = ['text/x-freefem'] - - # Language operators + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, bygroups, inherit, words, \ + default +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +from pygments.lexers.c_cpp import CLexer, CppLexer +from pygments.lexers import _mql_builtins + +__all__ = ['FreeFemLexer'] + + +class FreeFemLexer(CppLexer): + """ + For `FreeFem++ <https://freefem.org/>`_ source. + + This is an extension of the CppLexer, as the FreeFem Language is a superset + of C++. + + .. versionadded:: 2.4 + """ + + name = 'Freefem' + aliases = ['freefem'] + filenames = ['*.edp'] + mimetypes = ['text/x-freefem'] + + # Language operators operators = {'+', '-', '*', '.*', '/', './', '%', '^', '^-1', ':', '\''} - - # types + + # types types = {'bool', 'border', 'complex', 'dmatrix', 'fespace', 'func', 'gslspline', 'ifstream', 'int', 'macro', 'matrix', 'mesh', 'mesh3', 'mpiComm', 'mpiGroup', 'mpiRequest', 'NewMacro', 'EndMacro', 'ofstream', 'Pmmap', 'problem', 'Psemaphore', 'real', 'solve', 'string', 'varf'} - - # finite element spaces + + # finite element spaces fespaces = {'BDM1', 'BDM1Ortho', 'Edge03d', 'Edge13d', 'Edge23d', 'FEQF', 'HCT', 'P0', 'P03d', 'P0Edge', 'P1', 'P13d', 'P1b', 'P1b3d', 'P1bl', 'P1bl3d', 'P1dc', 'P1Edge', 'P1nc', 'P2', 'P23d', 'P2b', 'P2BR', 'P2dc', 'P2Edge', 'P2h', 'P2Morley', 'P2pnc', 'P3', 'P3dc', 'P3Edge', 'P4', 'P4dc', 'P4Edge', 'P5Edge', 'RT0', 'RT03d', 'RT0Ortho', 'RT1', 'RT1Ortho', 'RT2', 'RT2Ortho'} - - # preprocessor + + # preprocessor preprocessor = {'ENDIFMACRO', 'include', 'IFMACRO', 'load'} - - # Language keywords + + # Language keywords keywords = { - 'adj', - 'append', - 'area', - 'ARGV', - 'be', - 'binary', - 'BoundaryEdge', - 'bordermeasure', - 'CG', - 'Cholesky', - 'cin', - 'cout', - 'Crout', - 'default', - 'diag', - 'edgeOrientation', - 'endl', - 'false', - 'ffind', - 'FILE', - 'find', - 'fixed', - 'flush', - 'GMRES', - 'good', - 'hTriangle', - 'im', - 'imax', - 'imin', - 'InternalEdge', - 'l1', - 'l2', - 'label', - 'lenEdge', - 'length', - 'LINE', - 'linfty', - 'LU', - 'm', - 'max', - 'measure', - 'min', - 'mpiAnySource', - 'mpiBAND', - 'mpiBXOR', - 'mpiCommWorld', - 'mpiLAND', - 'mpiLOR', - 'mpiLXOR', - 'mpiMAX', - 'mpiMIN', - 'mpiPROD', - 'mpirank', - 'mpisize', - 'mpiSUM', - 'mpiUndefined', - 'n', - 'N', - 'nbe', - 'ndof', - 'ndofK', - 'noshowbase', - 'noshowpos', - 'notaregion', - 'nt', - 'nTonEdge', - 'nuEdge', - 'nuTriangle', - 'nv', - 'P', - 'pi', - 'precision', - 'qf1pE', - 'qf1pElump', - 'qf1pT', - 'qf1pTlump', - 'qfV1', - 'qfV1lump', - 'qf2pE', - 'qf2pT', - 'qf2pT4P1', - 'qfV2', - 'qf3pE', - 'qf4pE', - 'qf5pE', - 'qf5pT', - 'qfV5', - 'qf7pT', - 'qf9pT', - 'qfnbpE', - 'quantile', - 're', - 'region', - 'rfind', - 'scientific', - 'searchMethod', - 'setw', - 'showbase', - 'showpos', - 'sparsesolver', - 'sum', - 'tellp', - 'true', - 'UMFPACK', - 'unused', - 'whoinElement', - 'verbosity', - 'version', - 'volume', - 'x', - 'y', - 'z' + 'adj', + 'append', + 'area', + 'ARGV', + 'be', + 'binary', + 'BoundaryEdge', + 'bordermeasure', + 'CG', + 'Cholesky', + 'cin', + 'cout', + 'Crout', + 'default', + 'diag', + 'edgeOrientation', + 'endl', + 'false', + 'ffind', + 'FILE', + 'find', + 'fixed', + 'flush', + 'GMRES', + 'good', + 'hTriangle', + 'im', + 'imax', + 'imin', + 'InternalEdge', + 'l1', + 'l2', + 'label', + 'lenEdge', + 'length', + 'LINE', + 'linfty', + 'LU', + 'm', + 'max', + 'measure', + 'min', + 'mpiAnySource', + 'mpiBAND', + 'mpiBXOR', + 'mpiCommWorld', + 'mpiLAND', + 'mpiLOR', + 'mpiLXOR', + 'mpiMAX', + 'mpiMIN', + 'mpiPROD', + 'mpirank', + 'mpisize', + 'mpiSUM', + 'mpiUndefined', + 'n', + 'N', + 'nbe', + 'ndof', + 'ndofK', + 'noshowbase', + 'noshowpos', + 'notaregion', + 'nt', + 'nTonEdge', + 'nuEdge', + 'nuTriangle', + 'nv', + 'P', + 'pi', + 'precision', + 'qf1pE', + 'qf1pElump', + 'qf1pT', + 'qf1pTlump', + 'qfV1', + 'qfV1lump', + 'qf2pE', + 'qf2pT', + 'qf2pT4P1', + 'qfV2', + 'qf3pE', + 'qf4pE', + 'qf5pE', + 'qf5pT', + 'qfV5', + 'qf7pT', + 'qf9pT', + 'qfnbpE', + 'quantile', + 're', + 'region', + 'rfind', + 'scientific', + 'searchMethod', + 'setw', + 'showbase', + 'showpos', + 'sparsesolver', + 'sum', + 'tellp', + 'true', + 'UMFPACK', + 'unused', + 'whoinElement', + 'verbosity', + 'version', + 'volume', + 'x', + 'y', + 'z' } - - # Language shipped functions and class ( ) + + # Language shipped functions and class ( ) functions = { - 'abs', - 'acos', - 'acosh', - 'adaptmesh', - 'adj', - 'AffineCG', - 'AffineGMRES', - 'arg', - 'asin', - 'asinh', - 'assert', - 'atan', - 'atan2', - 'atanh', - 'atof', - 'atoi', - 'BFGS', - 'broadcast', - 'buildlayers', - 'buildmesh', - 'ceil', - 'chi', - 'complexEigenValue', - 'copysign', - 'change', - 'checkmovemesh', - 'clock', - 'cmaes', - 'conj', - 'convect', - 'cos', - 'cosh', - 'cube', - 'd', - 'dd', - 'dfft', - 'diffnp', - 'diffpos', - 'dimKrylov', - 'dist', - 'dumptable', - 'dx', - 'dxx', - 'dxy', - 'dxz', - 'dy', - 'dyx', - 'dyy', - 'dyz', - 'dz', - 'dzx', - 'dzy', - 'dzz', - 'EigenValue', - 'emptymesh', - 'erf', - 'erfc', - 'exec', - 'exit', - 'exp', - 'fdim', - 'floor', - 'fmax', - 'fmin', - 'fmod', - 'freeyams', - 'getARGV', - 'getline', - 'gmshload', - 'gmshload3', - 'gslcdfugaussianP', - 'gslcdfugaussianQ', - 'gslcdfugaussianPinv', - 'gslcdfugaussianQinv', - 'gslcdfgaussianP', - 'gslcdfgaussianQ', - 'gslcdfgaussianPinv', - 'gslcdfgaussianQinv', - 'gslcdfgammaP', - 'gslcdfgammaQ', - 'gslcdfgammaPinv', - 'gslcdfgammaQinv', - 'gslcdfcauchyP', - 'gslcdfcauchyQ', - 'gslcdfcauchyPinv', - 'gslcdfcauchyQinv', - 'gslcdflaplaceP', - 'gslcdflaplaceQ', - 'gslcdflaplacePinv', - 'gslcdflaplaceQinv', - 'gslcdfrayleighP', - 'gslcdfrayleighQ', - 'gslcdfrayleighPinv', - 'gslcdfrayleighQinv', - 'gslcdfchisqP', - 'gslcdfchisqQ', - 'gslcdfchisqPinv', - 'gslcdfchisqQinv', - 'gslcdfexponentialP', - 'gslcdfexponentialQ', - 'gslcdfexponentialPinv', - 'gslcdfexponentialQinv', - 'gslcdfexppowP', - 'gslcdfexppowQ', - 'gslcdftdistP', - 'gslcdftdistQ', - 'gslcdftdistPinv', - 'gslcdftdistQinv', - 'gslcdffdistP', - 'gslcdffdistQ', - 'gslcdffdistPinv', - 'gslcdffdistQinv', - 'gslcdfbetaP', - 'gslcdfbetaQ', - 'gslcdfbetaPinv', - 'gslcdfbetaQinv', - 'gslcdfflatP', - 'gslcdfflatQ', - 'gslcdfflatPinv', - 'gslcdfflatQinv', - 'gslcdflognormalP', - 'gslcdflognormalQ', - 'gslcdflognormalPinv', - 'gslcdflognormalQinv', - 'gslcdfgumbel1P', - 'gslcdfgumbel1Q', - 'gslcdfgumbel1Pinv', - 'gslcdfgumbel1Qinv', - 'gslcdfgumbel2P', - 'gslcdfgumbel2Q', - 'gslcdfgumbel2Pinv', - 'gslcdfgumbel2Qinv', - 'gslcdfweibullP', - 'gslcdfweibullQ', - 'gslcdfweibullPinv', - 'gslcdfweibullQinv', - 'gslcdfparetoP', - 'gslcdfparetoQ', - 'gslcdfparetoPinv', - 'gslcdfparetoQinv', - 'gslcdflogisticP', - 'gslcdflogisticQ', - 'gslcdflogisticPinv', - 'gslcdflogisticQinv', - 'gslcdfbinomialP', - 'gslcdfbinomialQ', - 'gslcdfpoissonP', - 'gslcdfpoissonQ', - 'gslcdfgeometricP', - 'gslcdfgeometricQ', - 'gslcdfnegativebinomialP', - 'gslcdfnegativebinomialQ', - 'gslcdfpascalP', - 'gslcdfpascalQ', - 'gslinterpakima', - 'gslinterpakimaperiodic', - 'gslinterpcsplineperiodic', - 'gslinterpcspline', - 'gslinterpsteffen', - 'gslinterplinear', - 'gslinterppolynomial', - 'gslranbernoullipdf', - 'gslranbeta', - 'gslranbetapdf', - 'gslranbinomialpdf', - 'gslranexponential', - 'gslranexponentialpdf', - 'gslranexppow', - 'gslranexppowpdf', - 'gslrancauchy', - 'gslrancauchypdf', - 'gslranchisq', - 'gslranchisqpdf', - 'gslranerlang', - 'gslranerlangpdf', - 'gslranfdist', - 'gslranfdistpdf', - 'gslranflat', - 'gslranflatpdf', - 'gslrangamma', - 'gslrangammaint', - 'gslrangammapdf', - 'gslrangammamt', - 'gslrangammaknuth', - 'gslrangaussian', - 'gslrangaussianratiomethod', - 'gslrangaussianziggurat', - 'gslrangaussianpdf', - 'gslranugaussian', - 'gslranugaussianratiomethod', - 'gslranugaussianpdf', - 'gslrangaussiantail', - 'gslrangaussiantailpdf', - 'gslranugaussiantail', - 'gslranugaussiantailpdf', - 'gslranlandau', - 'gslranlandaupdf', - 'gslrangeometricpdf', - 'gslrangumbel1', - 'gslrangumbel1pdf', - 'gslrangumbel2', - 'gslrangumbel2pdf', - 'gslranlogistic', - 'gslranlogisticpdf', - 'gslranlognormal', - 'gslranlognormalpdf', - 'gslranlogarithmicpdf', - 'gslrannegativebinomialpdf', - 'gslranpascalpdf', - 'gslranpareto', - 'gslranparetopdf', - 'gslranpoissonpdf', - 'gslranrayleigh', - 'gslranrayleighpdf', - 'gslranrayleightail', - 'gslranrayleightailpdf', - 'gslrantdist', - 'gslrantdistpdf', - 'gslranlaplace', - 'gslranlaplacepdf', - 'gslranlevy', - 'gslranweibull', - 'gslranweibullpdf', - 'gslsfairyAi', - 'gslsfairyBi', - 'gslsfairyAiscaled', - 'gslsfairyBiscaled', - 'gslsfairyAideriv', - 'gslsfairyBideriv', - 'gslsfairyAiderivscaled', - 'gslsfairyBiderivscaled', - 'gslsfairyzeroAi', - 'gslsfairyzeroBi', - 'gslsfairyzeroAideriv', - 'gslsfairyzeroBideriv', - 'gslsfbesselJ0', - 'gslsfbesselJ1', - 'gslsfbesselJn', - 'gslsfbesselY0', - 'gslsfbesselY1', - 'gslsfbesselYn', - 'gslsfbesselI0', - 'gslsfbesselI1', - 'gslsfbesselIn', - 'gslsfbesselI0scaled', - 'gslsfbesselI1scaled', - 'gslsfbesselInscaled', - 'gslsfbesselK0', - 'gslsfbesselK1', - 'gslsfbesselKn', - 'gslsfbesselK0scaled', - 'gslsfbesselK1scaled', - 'gslsfbesselKnscaled', - 'gslsfbesselj0', - 'gslsfbesselj1', - 'gslsfbesselj2', - 'gslsfbesseljl', - 'gslsfbessely0', - 'gslsfbessely1', - 'gslsfbessely2', - 'gslsfbesselyl', - 'gslsfbesseli0scaled', - 'gslsfbesseli1scaled', - 'gslsfbesseli2scaled', - 'gslsfbesselilscaled', - 'gslsfbesselk0scaled', - 'gslsfbesselk1scaled', - 'gslsfbesselk2scaled', - 'gslsfbesselklscaled', - 'gslsfbesselJnu', - 'gslsfbesselYnu', - 'gslsfbesselInuscaled', - 'gslsfbesselInu', - 'gslsfbesselKnuscaled', - 'gslsfbesselKnu', - 'gslsfbessellnKnu', - 'gslsfbesselzeroJ0', - 'gslsfbesselzeroJ1', - 'gslsfbesselzeroJnu', - 'gslsfclausen', - 'gslsfhydrogenicR1', - 'gslsfdawson', - 'gslsfdebye1', - 'gslsfdebye2', - 'gslsfdebye3', - 'gslsfdebye4', - 'gslsfdebye5', - 'gslsfdebye6', - 'gslsfdilog', - 'gslsfmultiply', - 'gslsfellintKcomp', - 'gslsfellintEcomp', - 'gslsfellintPcomp', - 'gslsfellintDcomp', - 'gslsfellintF', - 'gslsfellintE', - 'gslsfellintRC', - 'gslsferfc', - 'gslsflogerfc', - 'gslsferf', - 'gslsferfZ', - 'gslsferfQ', - 'gslsfhazard', - 'gslsfexp', - 'gslsfexpmult', - 'gslsfexpm1', - 'gslsfexprel', - 'gslsfexprel2', - 'gslsfexpreln', - 'gslsfexpintE1', - 'gslsfexpintE2', - 'gslsfexpintEn', - 'gslsfexpintE1scaled', - 'gslsfexpintE2scaled', - 'gslsfexpintEnscaled', - 'gslsfexpintEi', - 'gslsfexpintEiscaled', - 'gslsfShi', - 'gslsfChi', - 'gslsfexpint3', - 'gslsfSi', - 'gslsfCi', - 'gslsfatanint', - 'gslsffermidiracm1', - 'gslsffermidirac0', - 'gslsffermidirac1', - 'gslsffermidirac2', - 'gslsffermidiracint', - 'gslsffermidiracmhalf', - 'gslsffermidirachalf', - 'gslsffermidirac3half', - 'gslsffermidiracinc0', - 'gslsflngamma', - 'gslsfgamma', - 'gslsfgammastar', - 'gslsfgammainv', - 'gslsftaylorcoeff', - 'gslsffact', - 'gslsfdoublefact', - 'gslsflnfact', - 'gslsflndoublefact', - 'gslsflnchoose', - 'gslsfchoose', - 'gslsflnpoch', - 'gslsfpoch', - 'gslsfpochrel', - 'gslsfgammaincQ', - 'gslsfgammaincP', - 'gslsfgammainc', - 'gslsflnbeta', - 'gslsfbeta', - 'gslsfbetainc', - 'gslsfgegenpoly1', - 'gslsfgegenpoly2', - 'gslsfgegenpoly3', - 'gslsfgegenpolyn', - 'gslsfhyperg0F1', - 'gslsfhyperg1F1int', - 'gslsfhyperg1F1', - 'gslsfhypergUint', - 'gslsfhypergU', - 'gslsfhyperg2F0', - 'gslsflaguerre1', - 'gslsflaguerre2', - 'gslsflaguerre3', - 'gslsflaguerren', - 'gslsflambertW0', - 'gslsflambertWm1', - 'gslsflegendrePl', - 'gslsflegendreP1', - 'gslsflegendreP2', - 'gslsflegendreP3', - 'gslsflegendreQ0', - 'gslsflegendreQ1', - 'gslsflegendreQl', - 'gslsflegendrePlm', - 'gslsflegendresphPlm', - 'gslsflegendrearraysize', - 'gslsfconicalPhalf', - 'gslsfconicalPmhalf', - 'gslsfconicalP0', - 'gslsfconicalP1', - 'gslsfconicalPsphreg', - 'gslsfconicalPcylreg', - 'gslsflegendreH3d0', - 'gslsflegendreH3d1', - 'gslsflegendreH3d', - 'gslsflog', - 'gslsflogabs', - 'gslsflog1plusx', - 'gslsflog1plusxmx', - 'gslsfpowint', - 'gslsfpsiint', - 'gslsfpsi', - 'gslsfpsi1piy', - 'gslsfpsi1int', - 'gslsfpsi1', - 'gslsfpsin', - 'gslsfsynchrotron1', - 'gslsfsynchrotron2', - 'gslsftransport2', - 'gslsftransport3', - 'gslsftransport4', - 'gslsftransport5', - 'gslsfsin', - 'gslsfcos', - 'gslsfhypot', - 'gslsfsinc', - 'gslsflnsinh', - 'gslsflncosh', - 'gslsfanglerestrictsymm', - 'gslsfanglerestrictpos', - 'gslsfzetaint', - 'gslsfzeta', - 'gslsfzetam1', - 'gslsfzetam1int', - 'gslsfhzeta', - 'gslsfetaint', - 'gslsfeta', - 'imag', - 'int1d', - 'int2d', - 'int3d', - 'intalledges', - 'intallfaces', - 'interpolate', - 'invdiff', - 'invdiffnp', - 'invdiffpos', - 'Isend', - 'isInf', - 'isNaN', - 'isoline', - 'Irecv', - 'j0', - 'j1', - 'jn', - 'jump', - 'lgamma', - 'LinearCG', - 'LinearGMRES', - 'log', - 'log10', - 'lrint', - 'lround', - 'max', - 'mean', - 'medit', - 'min', - 'mmg3d', - 'movemesh', - 'movemesh23', - 'mpiAlltoall', - 'mpiAlltoallv', - 'mpiAllgather', - 'mpiAllgatherv', - 'mpiAllReduce', - 'mpiBarrier', - 'mpiGather', - 'mpiGatherv', - 'mpiRank', - 'mpiReduce', - 'mpiScatter', - 'mpiScatterv', - 'mpiSize', - 'mpiWait', - 'mpiWaitAny', - 'mpiWtick', - 'mpiWtime', - 'mshmet', - 'NaN', - 'NLCG', - 'on', - 'plot', - 'polar', - 'Post', - 'pow', - 'processor', - 'processorblock', - 'projection', - 'randinit', - 'randint31', - 'randint32', - 'random', - 'randreal1', - 'randreal2', - 'randreal3', - 'randres53', - 'Read', - 'readmesh', - 'readmesh3', - 'Recv', - 'rint', - 'round', - 'savemesh', - 'savesol', - 'savevtk', - 'seekg', - 'Sent', - 'set', - 'sign', - 'signbit', - 'sin', - 'sinh', - 'sort', - 'splitComm', - 'splitmesh', - 'sqrt', - 'square', - 'srandom', - 'srandomdev', - 'Stringification', - 'swap', - 'system', - 'tan', - 'tanh', - 'tellg', - 'tetg', - 'tetgconvexhull', - 'tetgreconstruction', - 'tetgtransfo', - 'tgamma', - 'triangulate', - 'trunc', - 'Wait', - 'Write', - 'y0', - 'y1', - 'yn' + 'abs', + 'acos', + 'acosh', + 'adaptmesh', + 'adj', + 'AffineCG', + 'AffineGMRES', + 'arg', + 'asin', + 'asinh', + 'assert', + 'atan', + 'atan2', + 'atanh', + 'atof', + 'atoi', + 'BFGS', + 'broadcast', + 'buildlayers', + 'buildmesh', + 'ceil', + 'chi', + 'complexEigenValue', + 'copysign', + 'change', + 'checkmovemesh', + 'clock', + 'cmaes', + 'conj', + 'convect', + 'cos', + 'cosh', + 'cube', + 'd', + 'dd', + 'dfft', + 'diffnp', + 'diffpos', + 'dimKrylov', + 'dist', + 'dumptable', + 'dx', + 'dxx', + 'dxy', + 'dxz', + 'dy', + 'dyx', + 'dyy', + 'dyz', + 'dz', + 'dzx', + 'dzy', + 'dzz', + 'EigenValue', + 'emptymesh', + 'erf', + 'erfc', + 'exec', + 'exit', + 'exp', + 'fdim', + 'floor', + 'fmax', + 'fmin', + 'fmod', + 'freeyams', + 'getARGV', + 'getline', + 'gmshload', + 'gmshload3', + 'gslcdfugaussianP', + 'gslcdfugaussianQ', + 'gslcdfugaussianPinv', + 'gslcdfugaussianQinv', + 'gslcdfgaussianP', + 'gslcdfgaussianQ', + 'gslcdfgaussianPinv', + 'gslcdfgaussianQinv', + 'gslcdfgammaP', + 'gslcdfgammaQ', + 'gslcdfgammaPinv', + 'gslcdfgammaQinv', + 'gslcdfcauchyP', + 'gslcdfcauchyQ', + 'gslcdfcauchyPinv', + 'gslcdfcauchyQinv', + 'gslcdflaplaceP', + 'gslcdflaplaceQ', + 'gslcdflaplacePinv', + 'gslcdflaplaceQinv', + 'gslcdfrayleighP', + 'gslcdfrayleighQ', + 'gslcdfrayleighPinv', + 'gslcdfrayleighQinv', + 'gslcdfchisqP', + 'gslcdfchisqQ', + 'gslcdfchisqPinv', + 'gslcdfchisqQinv', + 'gslcdfexponentialP', + 'gslcdfexponentialQ', + 'gslcdfexponentialPinv', + 'gslcdfexponentialQinv', + 'gslcdfexppowP', + 'gslcdfexppowQ', + 'gslcdftdistP', + 'gslcdftdistQ', + 'gslcdftdistPinv', + 'gslcdftdistQinv', + 'gslcdffdistP', + 'gslcdffdistQ', + 'gslcdffdistPinv', + 'gslcdffdistQinv', + 'gslcdfbetaP', + 'gslcdfbetaQ', + 'gslcdfbetaPinv', + 'gslcdfbetaQinv', + 'gslcdfflatP', + 'gslcdfflatQ', + 'gslcdfflatPinv', + 'gslcdfflatQinv', + 'gslcdflognormalP', + 'gslcdflognormalQ', + 'gslcdflognormalPinv', + 'gslcdflognormalQinv', + 'gslcdfgumbel1P', + 'gslcdfgumbel1Q', + 'gslcdfgumbel1Pinv', + 'gslcdfgumbel1Qinv', + 'gslcdfgumbel2P', + 'gslcdfgumbel2Q', + 'gslcdfgumbel2Pinv', + 'gslcdfgumbel2Qinv', + 'gslcdfweibullP', + 'gslcdfweibullQ', + 'gslcdfweibullPinv', + 'gslcdfweibullQinv', + 'gslcdfparetoP', + 'gslcdfparetoQ', + 'gslcdfparetoPinv', + 'gslcdfparetoQinv', + 'gslcdflogisticP', + 'gslcdflogisticQ', + 'gslcdflogisticPinv', + 'gslcdflogisticQinv', + 'gslcdfbinomialP', + 'gslcdfbinomialQ', + 'gslcdfpoissonP', + 'gslcdfpoissonQ', + 'gslcdfgeometricP', + 'gslcdfgeometricQ', + 'gslcdfnegativebinomialP', + 'gslcdfnegativebinomialQ', + 'gslcdfpascalP', + 'gslcdfpascalQ', + 'gslinterpakima', + 'gslinterpakimaperiodic', + 'gslinterpcsplineperiodic', + 'gslinterpcspline', + 'gslinterpsteffen', + 'gslinterplinear', + 'gslinterppolynomial', + 'gslranbernoullipdf', + 'gslranbeta', + 'gslranbetapdf', + 'gslranbinomialpdf', + 'gslranexponential', + 'gslranexponentialpdf', + 'gslranexppow', + 'gslranexppowpdf', + 'gslrancauchy', + 'gslrancauchypdf', + 'gslranchisq', + 'gslranchisqpdf', + 'gslranerlang', + 'gslranerlangpdf', + 'gslranfdist', + 'gslranfdistpdf', + 'gslranflat', + 'gslranflatpdf', + 'gslrangamma', + 'gslrangammaint', + 'gslrangammapdf', + 'gslrangammamt', + 'gslrangammaknuth', + 'gslrangaussian', + 'gslrangaussianratiomethod', + 'gslrangaussianziggurat', + 'gslrangaussianpdf', + 'gslranugaussian', + 'gslranugaussianratiomethod', + 'gslranugaussianpdf', + 'gslrangaussiantail', + 'gslrangaussiantailpdf', + 'gslranugaussiantail', + 'gslranugaussiantailpdf', + 'gslranlandau', + 'gslranlandaupdf', + 'gslrangeometricpdf', + 'gslrangumbel1', + 'gslrangumbel1pdf', + 'gslrangumbel2', + 'gslrangumbel2pdf', + 'gslranlogistic', + 'gslranlogisticpdf', + 'gslranlognormal', + 'gslranlognormalpdf', + 'gslranlogarithmicpdf', + 'gslrannegativebinomialpdf', + 'gslranpascalpdf', + 'gslranpareto', + 'gslranparetopdf', + 'gslranpoissonpdf', + 'gslranrayleigh', + 'gslranrayleighpdf', + 'gslranrayleightail', + 'gslranrayleightailpdf', + 'gslrantdist', + 'gslrantdistpdf', + 'gslranlaplace', + 'gslranlaplacepdf', + 'gslranlevy', + 'gslranweibull', + 'gslranweibullpdf', + 'gslsfairyAi', + 'gslsfairyBi', + 'gslsfairyAiscaled', + 'gslsfairyBiscaled', + 'gslsfairyAideriv', + 'gslsfairyBideriv', + 'gslsfairyAiderivscaled', + 'gslsfairyBiderivscaled', + 'gslsfairyzeroAi', + 'gslsfairyzeroBi', + 'gslsfairyzeroAideriv', + 'gslsfairyzeroBideriv', + 'gslsfbesselJ0', + 'gslsfbesselJ1', + 'gslsfbesselJn', + 'gslsfbesselY0', + 'gslsfbesselY1', + 'gslsfbesselYn', + 'gslsfbesselI0', + 'gslsfbesselI1', + 'gslsfbesselIn', + 'gslsfbesselI0scaled', + 'gslsfbesselI1scaled', + 'gslsfbesselInscaled', + 'gslsfbesselK0', + 'gslsfbesselK1', + 'gslsfbesselKn', + 'gslsfbesselK0scaled', + 'gslsfbesselK1scaled', + 'gslsfbesselKnscaled', + 'gslsfbesselj0', + 'gslsfbesselj1', + 'gslsfbesselj2', + 'gslsfbesseljl', + 'gslsfbessely0', + 'gslsfbessely1', + 'gslsfbessely2', + 'gslsfbesselyl', + 'gslsfbesseli0scaled', + 'gslsfbesseli1scaled', + 'gslsfbesseli2scaled', + 'gslsfbesselilscaled', + 'gslsfbesselk0scaled', + 'gslsfbesselk1scaled', + 'gslsfbesselk2scaled', + 'gslsfbesselklscaled', + 'gslsfbesselJnu', + 'gslsfbesselYnu', + 'gslsfbesselInuscaled', + 'gslsfbesselInu', + 'gslsfbesselKnuscaled', + 'gslsfbesselKnu', + 'gslsfbessellnKnu', + 'gslsfbesselzeroJ0', + 'gslsfbesselzeroJ1', + 'gslsfbesselzeroJnu', + 'gslsfclausen', + 'gslsfhydrogenicR1', + 'gslsfdawson', + 'gslsfdebye1', + 'gslsfdebye2', + 'gslsfdebye3', + 'gslsfdebye4', + 'gslsfdebye5', + 'gslsfdebye6', + 'gslsfdilog', + 'gslsfmultiply', + 'gslsfellintKcomp', + 'gslsfellintEcomp', + 'gslsfellintPcomp', + 'gslsfellintDcomp', + 'gslsfellintF', + 'gslsfellintE', + 'gslsfellintRC', + 'gslsferfc', + 'gslsflogerfc', + 'gslsferf', + 'gslsferfZ', + 'gslsferfQ', + 'gslsfhazard', + 'gslsfexp', + 'gslsfexpmult', + 'gslsfexpm1', + 'gslsfexprel', + 'gslsfexprel2', + 'gslsfexpreln', + 'gslsfexpintE1', + 'gslsfexpintE2', + 'gslsfexpintEn', + 'gslsfexpintE1scaled', + 'gslsfexpintE2scaled', + 'gslsfexpintEnscaled', + 'gslsfexpintEi', + 'gslsfexpintEiscaled', + 'gslsfShi', + 'gslsfChi', + 'gslsfexpint3', + 'gslsfSi', + 'gslsfCi', + 'gslsfatanint', + 'gslsffermidiracm1', + 'gslsffermidirac0', + 'gslsffermidirac1', + 'gslsffermidirac2', + 'gslsffermidiracint', + 'gslsffermidiracmhalf', + 'gslsffermidirachalf', + 'gslsffermidirac3half', + 'gslsffermidiracinc0', + 'gslsflngamma', + 'gslsfgamma', + 'gslsfgammastar', + 'gslsfgammainv', + 'gslsftaylorcoeff', + 'gslsffact', + 'gslsfdoublefact', + 'gslsflnfact', + 'gslsflndoublefact', + 'gslsflnchoose', + 'gslsfchoose', + 'gslsflnpoch', + 'gslsfpoch', + 'gslsfpochrel', + 'gslsfgammaincQ', + 'gslsfgammaincP', + 'gslsfgammainc', + 'gslsflnbeta', + 'gslsfbeta', + 'gslsfbetainc', + 'gslsfgegenpoly1', + 'gslsfgegenpoly2', + 'gslsfgegenpoly3', + 'gslsfgegenpolyn', + 'gslsfhyperg0F1', + 'gslsfhyperg1F1int', + 'gslsfhyperg1F1', + 'gslsfhypergUint', + 'gslsfhypergU', + 'gslsfhyperg2F0', + 'gslsflaguerre1', + 'gslsflaguerre2', + 'gslsflaguerre3', + 'gslsflaguerren', + 'gslsflambertW0', + 'gslsflambertWm1', + 'gslsflegendrePl', + 'gslsflegendreP1', + 'gslsflegendreP2', + 'gslsflegendreP3', + 'gslsflegendreQ0', + 'gslsflegendreQ1', + 'gslsflegendreQl', + 'gslsflegendrePlm', + 'gslsflegendresphPlm', + 'gslsflegendrearraysize', + 'gslsfconicalPhalf', + 'gslsfconicalPmhalf', + 'gslsfconicalP0', + 'gslsfconicalP1', + 'gslsfconicalPsphreg', + 'gslsfconicalPcylreg', + 'gslsflegendreH3d0', + 'gslsflegendreH3d1', + 'gslsflegendreH3d', + 'gslsflog', + 'gslsflogabs', + 'gslsflog1plusx', + 'gslsflog1plusxmx', + 'gslsfpowint', + 'gslsfpsiint', + 'gslsfpsi', + 'gslsfpsi1piy', + 'gslsfpsi1int', + 'gslsfpsi1', + 'gslsfpsin', + 'gslsfsynchrotron1', + 'gslsfsynchrotron2', + 'gslsftransport2', + 'gslsftransport3', + 'gslsftransport4', + 'gslsftransport5', + 'gslsfsin', + 'gslsfcos', + 'gslsfhypot', + 'gslsfsinc', + 'gslsflnsinh', + 'gslsflncosh', + 'gslsfanglerestrictsymm', + 'gslsfanglerestrictpos', + 'gslsfzetaint', + 'gslsfzeta', + 'gslsfzetam1', + 'gslsfzetam1int', + 'gslsfhzeta', + 'gslsfetaint', + 'gslsfeta', + 'imag', + 'int1d', + 'int2d', + 'int3d', + 'intalledges', + 'intallfaces', + 'interpolate', + 'invdiff', + 'invdiffnp', + 'invdiffpos', + 'Isend', + 'isInf', + 'isNaN', + 'isoline', + 'Irecv', + 'j0', + 'j1', + 'jn', + 'jump', + 'lgamma', + 'LinearCG', + 'LinearGMRES', + 'log', + 'log10', + 'lrint', + 'lround', + 'max', + 'mean', + 'medit', + 'min', + 'mmg3d', + 'movemesh', + 'movemesh23', + 'mpiAlltoall', + 'mpiAlltoallv', + 'mpiAllgather', + 'mpiAllgatherv', + 'mpiAllReduce', + 'mpiBarrier', + 'mpiGather', + 'mpiGatherv', + 'mpiRank', + 'mpiReduce', + 'mpiScatter', + 'mpiScatterv', + 'mpiSize', + 'mpiWait', + 'mpiWaitAny', + 'mpiWtick', + 'mpiWtime', + 'mshmet', + 'NaN', + 'NLCG', + 'on', + 'plot', + 'polar', + 'Post', + 'pow', + 'processor', + 'processorblock', + 'projection', + 'randinit', + 'randint31', + 'randint32', + 'random', + 'randreal1', + 'randreal2', + 'randreal3', + 'randres53', + 'Read', + 'readmesh', + 'readmesh3', + 'Recv', + 'rint', + 'round', + 'savemesh', + 'savesol', + 'savevtk', + 'seekg', + 'Sent', + 'set', + 'sign', + 'signbit', + 'sin', + 'sinh', + 'sort', + 'splitComm', + 'splitmesh', + 'sqrt', + 'square', + 'srandom', + 'srandomdev', + 'Stringification', + 'swap', + 'system', + 'tan', + 'tanh', + 'tellg', + 'tetg', + 'tetgconvexhull', + 'tetgreconstruction', + 'tetgtransfo', + 'tgamma', + 'triangulate', + 'trunc', + 'Wait', + 'Write', + 'y0', + 'y1', + 'yn' } - - # function parameters + + # function parameters parameters = { - 'A', - 'A1', - 'abserror', - 'absolute', - 'aniso', - 'aspectratio', - 'B', - 'B1', - 'bb', - 'beginend', - 'bin', - 'boundary', - 'bw', - 'close', - 'cmm', - 'coef', - 'composante', - 'cutoff', - 'datafilename', - 'dataname', - 'dim', - 'distmax', - 'displacement', - 'doptions', - 'dparams', - 'eps', - 'err', - 'errg', - 'facemerge', - 'facetcl', - 'factorize', - 'file', - 'fill', - 'fixedborder', - 'flabel', - 'flags', - 'floatmesh', - 'floatsol', - 'fregion', - 'gradation', - 'grey', - 'hmax', - 'hmin', - 'holelist', - 'hsv', - 'init', - 'inquire', - 'inside', - 'IsMetric', - 'iso', - 'ivalue', - 'keepbackvertices', - 'label', - 'labeldown', - 'labelmid', - 'labelup', - 'levelset', - 'loptions', - 'lparams', - 'maxit', - 'maxsubdiv', - 'meditff', - 'mem', - 'memory', - 'metric', - 'mode', - 'nbarrow', - 'nbiso', - 'nbiter', - 'nbjacoby', - 'nboffacetcl', - 'nbofholes', - 'nbofregions', - 'nbregul', - 'nbsmooth', - 'nbvx', - 'ncv', - 'nev', - 'nomeshgeneration', - 'normalization', - 'omega', - 'op', - 'optimize', - 'option', - 'options', - 'order', - 'orientation', - 'periodic', - 'power', - 'precon', - 'prev', - 'ps', - 'ptmerge', - 'qfe', - 'qforder', - 'qft', - 'qfV', - 'ratio', - 'rawvector', - 'reffacelow', - 'reffacemid', - 'reffaceup', - 'refnum', - 'reftet', - 'reftri', - 'region', - 'regionlist', - 'renumv', - 'rescaling', - 'ridgeangle', - 'save', - 'sigma', - 'sizeofvolume', - 'smoothing', - 'solver', - 'sparams', - 'split', - 'splitin2', - 'splitpbedge', - 'stop', - 'strategy', - 'swap', - 'switch', - 'sym', - 't', - 'tgv', - 'thetamax', - 'tol', - 'tolpivot', - 'tolpivotsym', - 'transfo', - 'U2Vc', - 'value', - 'varrow', - 'vector', - 'veps', - 'viso', - 'wait', - 'width', - 'withsurfacemesh', - 'WindowIndex', - 'which', - 'zbound' + 'A', + 'A1', + 'abserror', + 'absolute', + 'aniso', + 'aspectratio', + 'B', + 'B1', + 'bb', + 'beginend', + 'bin', + 'boundary', + 'bw', + 'close', + 'cmm', + 'coef', + 'composante', + 'cutoff', + 'datafilename', + 'dataname', + 'dim', + 'distmax', + 'displacement', + 'doptions', + 'dparams', + 'eps', + 'err', + 'errg', + 'facemerge', + 'facetcl', + 'factorize', + 'file', + 'fill', + 'fixedborder', + 'flabel', + 'flags', + 'floatmesh', + 'floatsol', + 'fregion', + 'gradation', + 'grey', + 'hmax', + 'hmin', + 'holelist', + 'hsv', + 'init', + 'inquire', + 'inside', + 'IsMetric', + 'iso', + 'ivalue', + 'keepbackvertices', + 'label', + 'labeldown', + 'labelmid', + 'labelup', + 'levelset', + 'loptions', + 'lparams', + 'maxit', + 'maxsubdiv', + 'meditff', + 'mem', + 'memory', + 'metric', + 'mode', + 'nbarrow', + 'nbiso', + 'nbiter', + 'nbjacoby', + 'nboffacetcl', + 'nbofholes', + 'nbofregions', + 'nbregul', + 'nbsmooth', + 'nbvx', + 'ncv', + 'nev', + 'nomeshgeneration', + 'normalization', + 'omega', + 'op', + 'optimize', + 'option', + 'options', + 'order', + 'orientation', + 'periodic', + 'power', + 'precon', + 'prev', + 'ps', + 'ptmerge', + 'qfe', + 'qforder', + 'qft', + 'qfV', + 'ratio', + 'rawvector', + 'reffacelow', + 'reffacemid', + 'reffaceup', + 'refnum', + 'reftet', + 'reftri', + 'region', + 'regionlist', + 'renumv', + 'rescaling', + 'ridgeangle', + 'save', + 'sigma', + 'sizeofvolume', + 'smoothing', + 'solver', + 'sparams', + 'split', + 'splitin2', + 'splitpbedge', + 'stop', + 'strategy', + 'swap', + 'switch', + 'sym', + 't', + 'tgv', + 'thetamax', + 'tol', + 'tolpivot', + 'tolpivotsym', + 'transfo', + 'U2Vc', + 'value', + 'varrow', + 'vector', + 'veps', + 'viso', + 'wait', + 'width', + 'withsurfacemesh', + 'WindowIndex', + 'which', + 'zbound' } - - # deprecated + + # deprecated deprecated = {'fixeborder'} - - # do not highlight + + # do not highlight suppress_highlight = { - 'alignof', - 'asm', - 'constexpr', - 'decltype', - 'div', - 'double', - 'grad', - 'mutable', - 'namespace', - 'noexcept', - 'restrict', - 'static_assert', - 'template', - 'this', - 'thread_local', - 'typeid', - 'typename', - 'using' + 'alignof', + 'asm', + 'constexpr', + 'decltype', + 'div', + 'double', + 'grad', + 'mutable', + 'namespace', + 'noexcept', + 'restrict', + 'static_assert', + 'template', + 'this', + 'thread_local', + 'typeid', + 'typename', + 'using' } - - def get_tokens_unprocessed(self, text): - for index, token, value in CppLexer.get_tokens_unprocessed(self, text): - if value in self.operators: - yield index, Operator, value - elif value in self.types: - yield index, Keyword.Type, value - elif value in self.fespaces: - yield index, Name.Class, value - elif value in self.preprocessor: - yield index, Comment.Preproc, value - elif value in self.keywords: - yield index, Keyword.Reserved, value - elif value in self.functions: - yield index, Name.Function, value - elif value in self.parameters: - yield index, Keyword.Pseudo, value - elif value in self.suppress_highlight: - yield index, Name, value - else: - yield index, token, value + + def get_tokens_unprocessed(self, text): + for index, token, value in CppLexer.get_tokens_unprocessed(self, text): + if value in self.operators: + yield index, Operator, value + elif value in self.types: + yield index, Keyword.Type, value + elif value in self.fespaces: + yield index, Name.Class, value + elif value in self.preprocessor: + yield index, Comment.Preproc, value + elif value in self.keywords: + yield index, Keyword.Reserved, value + elif value in self.functions: + yield index, Name.Function, value + elif value in self.parameters: + yield index, Keyword.Pseudo, value + elif value in self.suppress_highlight: + yield index, Name, value + else: + yield index, token, value diff --git a/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py b/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py index 5bc93263cd..ff57c99917 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py +++ b/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py @@ -8,15 +8,15 @@ :license: BSD, see LICENSE for details. """ -import re +import re -from pygments.lexer import RegexLexer, bygroups, include, this, using, words -from pygments.token import Comment, Keyword, Literal, Name, Number, \ +from pygments.lexer import RegexLexer, bygroups, include, this, using, words +from pygments.token import Comment, Keyword, Literal, Name, Number, \ Operator, Punctuation, String, Text, Whitespace __all__ = ['BnfLexer', 'AbnfLexer', 'JsgfLexer', 'PegLexer'] - + class BnfLexer(RegexLexer): """ This lexer is for grammar notations which are similar to @@ -130,86 +130,86 @@ class AbnfLexer(RegexLexer): (r'.', Text), ], } - - -class JsgfLexer(RegexLexer): - """ - For `JSpeech Grammar Format <https://www.w3.org/TR/jsgf/>`_ - grammars. - - .. versionadded:: 2.2 - """ - name = 'JSGF' - aliases = ['jsgf'] - filenames = ['*.jsgf'] - mimetypes = ['application/jsgf', 'application/x-jsgf', 'text/jsgf'] - - flags = re.MULTILINE | re.UNICODE - - tokens = { - 'root': [ - include('comments'), - include('non-comments'), - ], - 'comments': [ - (r'/\*\*(?!/)', Comment.Multiline, 'documentation comment'), - (r'/\*[\w\W]*?\*/', Comment.Multiline), + + +class JsgfLexer(RegexLexer): + """ + For `JSpeech Grammar Format <https://www.w3.org/TR/jsgf/>`_ + grammars. + + .. versionadded:: 2.2 + """ + name = 'JSGF' + aliases = ['jsgf'] + filenames = ['*.jsgf'] + mimetypes = ['application/jsgf', 'application/x-jsgf', 'text/jsgf'] + + flags = re.MULTILINE | re.UNICODE + + tokens = { + 'root': [ + include('comments'), + include('non-comments'), + ], + 'comments': [ + (r'/\*\*(?!/)', Comment.Multiline, 'documentation comment'), + (r'/\*[\w\W]*?\*/', Comment.Multiline), (r'//.*$', Comment.Single), - ], - 'non-comments': [ - (r'\A#JSGF[^;]*', Comment.Preproc), + ], + 'non-comments': [ + (r'\A#JSGF[^;]*', Comment.Preproc), (r'\s+', Whitespace), - (r';', Punctuation), - (r'[=|()\[\]*+]', Operator), - (r'/[^/]+/', Number.Float), - (r'"', String.Double, 'string'), - (r'\{', String.Other, 'tag'), - (words(('import', 'public'), suffix=r'\b'), Keyword.Reserved), - (r'grammar\b', Keyword.Reserved, 'grammar name'), - (r'(<)(NULL|VOID)(>)', - bygroups(Punctuation, Name.Builtin, Punctuation)), - (r'<', Punctuation, 'rulename'), - (r'\w+|[^\s;=|()\[\]*+/"{<\w]+', Text), - ], - 'string': [ - (r'"', String.Double, '#pop'), - (r'\\.', String.Escape), - (r'[^\\"]+', String.Double), - ], - 'tag': [ - (r'\}', String.Other, '#pop'), - (r'\\.', String.Escape), - (r'[^\\}]+', String.Other), - ], - 'grammar name': [ - (r';', Punctuation, '#pop'), + (r';', Punctuation), + (r'[=|()\[\]*+]', Operator), + (r'/[^/]+/', Number.Float), + (r'"', String.Double, 'string'), + (r'\{', String.Other, 'tag'), + (words(('import', 'public'), suffix=r'\b'), Keyword.Reserved), + (r'grammar\b', Keyword.Reserved, 'grammar name'), + (r'(<)(NULL|VOID)(>)', + bygroups(Punctuation, Name.Builtin, Punctuation)), + (r'<', Punctuation, 'rulename'), + (r'\w+|[^\s;=|()\[\]*+/"{<\w]+', Text), + ], + 'string': [ + (r'"', String.Double, '#pop'), + (r'\\.', String.Escape), + (r'[^\\"]+', String.Double), + ], + 'tag': [ + (r'\}', String.Other, '#pop'), + (r'\\.', String.Escape), + (r'[^\\}]+', String.Other), + ], + 'grammar name': [ + (r';', Punctuation, '#pop'), (r'\s+', Whitespace), - (r'\.', Punctuation), - (r'[^;\s.]+', Name.Namespace), - ], - 'rulename': [ - (r'>', Punctuation, '#pop'), - (r'\*', Punctuation), + (r'\.', Punctuation), + (r'[^;\s.]+', Name.Namespace), + ], + 'rulename': [ + (r'>', Punctuation, '#pop'), + (r'\*', Punctuation), (r'\s+', Whitespace), - (r'([^.>]+)(\s*)(\.)', bygroups(Name.Namespace, Text, Punctuation)), - (r'[^.>]+', Name.Constant), - ], - 'documentation comment': [ - (r'\*/', Comment.Multiline, '#pop'), + (r'([^.>]+)(\s*)(\.)', bygroups(Name.Namespace, Text, Punctuation)), + (r'[^.>]+', Name.Constant), + ], + 'documentation comment': [ + (r'\*/', Comment.Multiline, '#pop'), (r'^(\s*)(\*?)(\s*)(@(?:example|see))(\s+)' - r'([\w\W]*?(?=(?:^\s*\*?\s*@|\*/)))', + r'([\w\W]*?(?=(?:^\s*\*?\s*@|\*/)))', bygroups(Whitespace,Comment.Multiline, Whitespace, Comment.Special, Whitespace, using(this, state='example'))), - (r'(^\s*\*?\s*)(@\S*)', - bygroups(Comment.Multiline, Comment.Special)), - (r'[^*\n@]+|\w|\W', Comment.Multiline), - ], - 'example': [ + (r'(^\s*\*?\s*)(@\S*)', + bygroups(Comment.Multiline, Comment.Special)), + (r'[^*\n@]+|\w|\W', Comment.Multiline), + ], + 'example': [ (r'(\n\s*)(\*)', bygroups(Whitespace, Comment.Multiline)), - include('non-comments'), - (r'.', Comment.Multiline), - ], - } + include('non-comments'), + (r'.', Comment.Multiline), + ], + } class PegLexer(RegexLexer): diff --git a/contrib/python/Pygments/py3/pygments/lexers/graph.py b/contrib/python/Pygments/py3/pygments/lexers/graph.py index d52041f754..2af56af26b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graph.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graph.py @@ -21,9 +21,9 @@ __all__ = ['CypherLexer'] class CypherLexer(RegexLexer): """ For `Cypher Query Language - <https://neo4j.com/docs/developer-manual/3.3/cypher/>`_ + <https://neo4j.com/docs/developer-manual/3.3/cypher/>`_ - For the Cypher version in Neo4j 3.3 + For the Cypher version in Neo4j 3.3 .. versionadded:: 2.0 """ @@ -48,10 +48,10 @@ class CypherLexer(RegexLexer): ], 'keywords': [ (r'(create|order|match|limit|set|skip|start|return|with|where|' - r'delete|foreach|not|by|true|false)\b', Keyword), + r'delete|foreach|not|by|true|false)\b', Keyword), ], 'clauses': [ - # based on https://neo4j.com/docs/cypher-refcard/3.3/ + # based on https://neo4j.com/docs/cypher-refcard/3.3/ (r'(create)(\s+)(index|unique)\b', bygroups(Keyword, Whitespace, Keyword)), (r'(drop)(\s+)(contraint|index)(\s+)(on)\b', diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphics.py b/contrib/python/Pygments/py3/pygments/lexers/graphics.py index 4c5498e106..9f3e4a4431 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graphics.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graphics.py @@ -14,7 +14,7 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, \ Number, Punctuation, String, Whitespace __all__ = ['GLShaderLexer', 'PostScriptLexer', 'AsymptoteLexer', 'GnuplotLexer', - 'PovrayLexer', 'HLSLShaderLexer'] + 'PovrayLexer', 'HLSLShaderLexer'] class GLShaderLexer(RegexLexer): @@ -45,102 +45,102 @@ class GLShaderLexer(RegexLexer): (r'0[0-7]*', Number.Oct), (r'[1-9][0-9]*', Number.Integer), (words(( - # Storage qualifiers - 'attribute', 'const', 'uniform', 'varying', - 'buffer', 'shared', 'in', 'out', - # Layout qualifiers - 'layout', - # Interpolation qualifiers - 'flat', 'smooth', 'noperspective', - # Auxiliary qualifiers - 'centroid', 'sample', 'patch', - # Parameter qualifiers. Some double as Storage qualifiers - 'inout', - # Precision qualifiers - 'lowp', 'mediump', 'highp', 'precision', - # Invariance qualifiers - 'invariant', - # Precise qualifiers - 'precise', - # Memory qualifiers - 'coherent', 'volatile', 'restrict', 'readonly', 'writeonly', - # Statements - 'break', 'continue', 'do', 'for', 'while', 'switch', - 'case', 'default', 'if', 'else', 'subroutine', - 'discard', 'return', 'struct'), + # Storage qualifiers + 'attribute', 'const', 'uniform', 'varying', + 'buffer', 'shared', 'in', 'out', + # Layout qualifiers + 'layout', + # Interpolation qualifiers + 'flat', 'smooth', 'noperspective', + # Auxiliary qualifiers + 'centroid', 'sample', 'patch', + # Parameter qualifiers. Some double as Storage qualifiers + 'inout', + # Precision qualifiers + 'lowp', 'mediump', 'highp', 'precision', + # Invariance qualifiers + 'invariant', + # Precise qualifiers + 'precise', + # Memory qualifiers + 'coherent', 'volatile', 'restrict', 'readonly', 'writeonly', + # Statements + 'break', 'continue', 'do', 'for', 'while', 'switch', + 'case', 'default', 'if', 'else', 'subroutine', + 'discard', 'return', 'struct'), prefix=r'\b', suffix=r'\b'), Keyword), (words(( - # Boolean values - 'true', 'false'), + # Boolean values + 'true', 'false'), prefix=r'\b', suffix=r'\b'), - Keyword.Constant), - (words(( - # Miscellaneous types - 'void', 'atomic_uint', - # Floating-point scalars and vectors - 'float', 'vec2', 'vec3', 'vec4', - 'double', 'dvec2', 'dvec3', 'dvec4', - # Integer scalars and vectors - 'int', 'ivec2', 'ivec3', 'ivec4', - 'uint', 'uvec2', 'uvec3', 'uvec4', - # Boolean scalars and vectors - 'bool', 'bvec2', 'bvec3', 'bvec4', - # Matrices - 'mat2', 'mat3', 'mat4', 'dmat2', 'dmat3', 'dmat4', - 'mat2x2', 'mat2x3', 'mat2x4', 'dmat2x2', 'dmat2x3', 'dmat2x4', - 'mat3x2', 'mat3x3', 'mat3x4', 'dmat3x2', 'dmat3x3', - 'dmat3x4', 'mat4x2', 'mat4x3', 'mat4x4', 'dmat4x2', 'dmat4x3', 'dmat4x4', - # Floating-point samplers - 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube', - 'sampler1DArray', 'sampler2DArray', 'samplerCubeArray', - 'sampler2DRect', 'samplerBuffer', - 'sampler2DMS', 'sampler2DMSArray', - # Shadow samplers - 'sampler1DShadow', 'sampler2DShadow', 'samplerCubeShadow', - 'sampler1DArrayShadow', 'sampler2DArrayShadow', - 'samplerCubeArrayShadow', 'sampler2DRectShadow', - # Signed integer samplers - 'isampler1D', 'isampler2D', 'isampler3D', 'isamplerCube', - 'isampler1DArray', 'isampler2DArray', 'isamplerCubeArray', - 'isampler2DRect', 'isamplerBuffer', - 'isampler2DMS', 'isampler2DMSArray', - # Unsigned integer samplers - 'usampler1D', 'usampler2D', 'usampler3D', 'usamplerCube', - 'usampler1DArray', 'usampler2DArray', 'usamplerCubeArray', - 'usampler2DRect', 'usamplerBuffer', - 'usampler2DMS', 'usampler2DMSArray', - # Floating-point image types - 'image1D', 'image2D', 'image3D', 'imageCube', - 'image1DArray', 'image2DArray', 'imageCubeArray', - 'image2DRect', 'imageBuffer', - 'image2DMS', 'image2DMSArray', - # Signed integer image types - 'iimage1D', 'iimage2D', 'iimage3D', 'iimageCube', - 'iimage1DArray', 'iimage2DArray', 'iimageCubeArray', - 'iimage2DRect', 'iimageBuffer', - 'iimage2DMS', 'iimage2DMSArray', - # Unsigned integer image types - 'uimage1D', 'uimage2D', 'uimage3D', 'uimageCube', - 'uimage1DArray', 'uimage2DArray', 'uimageCubeArray', - 'uimage2DRect', 'uimageBuffer', - 'uimage2DMS', 'uimage2DMSArray'), - prefix=r'\b', suffix=r'\b'), - Keyword.Type), - (words(( - # Reserved for future use. - 'common', 'partition', 'active', 'asm', 'class', - 'union', 'enum', 'typedef', 'template', 'this', - 'resource', 'goto', 'inline', 'noinline', 'public', - 'static', 'extern', 'external', 'interface', 'long', - 'short', 'half', 'fixed', 'unsigned', 'superp', 'input', - 'output', 'hvec2', 'hvec3', 'hvec4', 'fvec2', 'fvec3', - 'fvec4', 'sampler3DRect', 'filter', 'sizeof', 'cast', - 'namespace', 'using'), - prefix=r'\b', suffix=r'\b'), - Keyword.Reserved), - # All names beginning with "gl_" are reserved. - (r'gl_\w*', Name.Builtin), + Keyword.Constant), + (words(( + # Miscellaneous types + 'void', 'atomic_uint', + # Floating-point scalars and vectors + 'float', 'vec2', 'vec3', 'vec4', + 'double', 'dvec2', 'dvec3', 'dvec4', + # Integer scalars and vectors + 'int', 'ivec2', 'ivec3', 'ivec4', + 'uint', 'uvec2', 'uvec3', 'uvec4', + # Boolean scalars and vectors + 'bool', 'bvec2', 'bvec3', 'bvec4', + # Matrices + 'mat2', 'mat3', 'mat4', 'dmat2', 'dmat3', 'dmat4', + 'mat2x2', 'mat2x3', 'mat2x4', 'dmat2x2', 'dmat2x3', 'dmat2x4', + 'mat3x2', 'mat3x3', 'mat3x4', 'dmat3x2', 'dmat3x3', + 'dmat3x4', 'mat4x2', 'mat4x3', 'mat4x4', 'dmat4x2', 'dmat4x3', 'dmat4x4', + # Floating-point samplers + 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube', + 'sampler1DArray', 'sampler2DArray', 'samplerCubeArray', + 'sampler2DRect', 'samplerBuffer', + 'sampler2DMS', 'sampler2DMSArray', + # Shadow samplers + 'sampler1DShadow', 'sampler2DShadow', 'samplerCubeShadow', + 'sampler1DArrayShadow', 'sampler2DArrayShadow', + 'samplerCubeArrayShadow', 'sampler2DRectShadow', + # Signed integer samplers + 'isampler1D', 'isampler2D', 'isampler3D', 'isamplerCube', + 'isampler1DArray', 'isampler2DArray', 'isamplerCubeArray', + 'isampler2DRect', 'isamplerBuffer', + 'isampler2DMS', 'isampler2DMSArray', + # Unsigned integer samplers + 'usampler1D', 'usampler2D', 'usampler3D', 'usamplerCube', + 'usampler1DArray', 'usampler2DArray', 'usamplerCubeArray', + 'usampler2DRect', 'usamplerBuffer', + 'usampler2DMS', 'usampler2DMSArray', + # Floating-point image types + 'image1D', 'image2D', 'image3D', 'imageCube', + 'image1DArray', 'image2DArray', 'imageCubeArray', + 'image2DRect', 'imageBuffer', + 'image2DMS', 'image2DMSArray', + # Signed integer image types + 'iimage1D', 'iimage2D', 'iimage3D', 'iimageCube', + 'iimage1DArray', 'iimage2DArray', 'iimageCubeArray', + 'iimage2DRect', 'iimageBuffer', + 'iimage2DMS', 'iimage2DMSArray', + # Unsigned integer image types + 'uimage1D', 'uimage2D', 'uimage3D', 'uimageCube', + 'uimage1DArray', 'uimage2DArray', 'uimageCubeArray', + 'uimage2DRect', 'uimageBuffer', + 'uimage2DMS', 'uimage2DMSArray'), + prefix=r'\b', suffix=r'\b'), + Keyword.Type), + (words(( + # Reserved for future use. + 'common', 'partition', 'active', 'asm', 'class', + 'union', 'enum', 'typedef', 'template', 'this', + 'resource', 'goto', 'inline', 'noinline', 'public', + 'static', 'extern', 'external', 'interface', 'long', + 'short', 'half', 'fixed', 'unsigned', 'superp', 'input', + 'output', 'hvec2', 'hvec3', 'hvec4', 'fvec2', 'fvec3', + 'fvec4', 'sampler3DRect', 'filter', 'sizeof', 'cast', + 'namespace', 'using'), + prefix=r'\b', suffix=r'\b'), + Keyword.Reserved), + # All names beginning with "gl_" are reserved. + (r'gl_\w*', Name.Builtin), (r'[a-zA-Z_]\w*', Name), (r'\.', Punctuation), (r'\s+', Whitespace), @@ -148,160 +148,160 @@ class GLShaderLexer(RegexLexer): } -class HLSLShaderLexer(RegexLexer): - """ - HLSL (Microsoft Direct3D Shader) lexer. - - .. versionadded:: 2.3 - """ - name = 'HLSL' - aliases = ['hlsl'] - filenames = ['*.hlsl', '*.hlsli'] - mimetypes = ['text/x-hlsl'] - - tokens = { - 'root': [ +class HLSLShaderLexer(RegexLexer): + """ + HLSL (Microsoft Direct3D Shader) lexer. + + .. versionadded:: 2.3 + """ + name = 'HLSL' + aliases = ['hlsl'] + filenames = ['*.hlsl', '*.hlsli'] + mimetypes = ['text/x-hlsl'] + + tokens = { + 'root': [ (r'^#.*$', Comment.Preproc), (r'//.*$', Comment.Single), - (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), - (r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?', - Operator), - (r'[?:]', Operator), # quick hack for ternary - (r'\bdefined\b', Operator), - (r'[;{}(),.\[\]]', Punctuation), - # FIXME when e is present, no decimal point needed - (r'[+-]?\d*\.\d+([eE][-+]?\d+)?f?', Number.Float), - (r'[+-]?\d+\.\d*([eE][-+]?\d+)?f?', Number.Float), - (r'0[xX][0-9a-fA-F]*', Number.Hex), - (r'0[0-7]*', Number.Oct), - (r'[1-9][0-9]*', Number.Integer), - (r'"', String, 'string'), - (words(( - 'asm','asm_fragment','break','case','cbuffer','centroid','class', - 'column_major','compile','compile_fragment','const','continue', - 'default','discard','do','else','export','extern','for','fxgroup', - 'globallycoherent','groupshared','if','in','inline','inout', - 'interface','line','lineadj','linear','namespace','nointerpolation', - 'noperspective','NULL','out','packoffset','pass','pixelfragment', - 'point','precise','return','register','row_major','sample', - 'sampler','shared','stateblock','stateblock_state','static', - 'struct','switch','tbuffer','technique','technique10', - 'technique11','texture','typedef','triangle','triangleadj', - 'uniform','vertexfragment','volatile','while'), - prefix=r'\b', suffix=r'\b'), - Keyword), - (words(('true','false'), prefix=r'\b', suffix=r'\b'), - Keyword.Constant), - (words(( - 'auto','catch','char','const_cast','delete','dynamic_cast','enum', - 'explicit','friend','goto','long','mutable','new','operator', - 'private','protected','public','reinterpret_cast','short','signed', - 'sizeof','static_cast','template','this','throw','try','typename', - 'union','unsigned','using','virtual'), - prefix=r'\b', suffix=r'\b'), - Keyword.Reserved), - (words(( - 'dword','matrix','snorm','string','unorm','unsigned','void','vector', - 'BlendState','Buffer','ByteAddressBuffer','ComputeShader', - 'DepthStencilState','DepthStencilView','DomainShader', - 'GeometryShader','HullShader','InputPatch','LineStream', - 'OutputPatch','PixelShader','PointStream','RasterizerState', - 'RenderTargetView','RasterizerOrderedBuffer', - 'RasterizerOrderedByteAddressBuffer', - 'RasterizerOrderedStructuredBuffer','RasterizerOrderedTexture1D', - 'RasterizerOrderedTexture1DArray','RasterizerOrderedTexture2D', - 'RasterizerOrderedTexture2DArray','RasterizerOrderedTexture3D', - 'RWBuffer','RWByteAddressBuffer','RWStructuredBuffer', - 'RWTexture1D','RWTexture1DArray','RWTexture2D','RWTexture2DArray', - 'RWTexture3D','SamplerState','SamplerComparisonState', - 'StructuredBuffer','Texture1D','Texture1DArray','Texture2D', - 'Texture2DArray','Texture2DMS','Texture2DMSArray','Texture3D', - 'TextureCube','TextureCubeArray','TriangleStream','VertexShader'), - prefix=r'\b', suffix=r'\b'), - Keyword.Type), - (words(( - 'bool','double','float','int','half','min16float','min10float', - 'min16int','min12int','min16uint','uint'), - prefix=r'\b', suffix=r'([1-4](x[1-4])?)?\b'), - Keyword.Type), # vector and matrix types - (words(( - 'abort','abs','acos','all','AllMemoryBarrier', - 'AllMemoryBarrierWithGroupSync','any','AppendStructuredBuffer', - 'asdouble','asfloat','asin','asint','asuint','asuint','atan', - 'atan2','ceil','CheckAccessFullyMapped','clamp','clip', - 'CompileShader','ConsumeStructuredBuffer','cos','cosh','countbits', - 'cross','D3DCOLORtoUBYTE4','ddx','ddx_coarse','ddx_fine','ddy', - 'ddy_coarse','ddy_fine','degrees','determinant', - 'DeviceMemoryBarrier','DeviceMemoryBarrierWithGroupSync','distance', - 'dot','dst','errorf','EvaluateAttributeAtCentroid', - 'EvaluateAttributeAtSample','EvaluateAttributeSnapped','exp', - 'exp2','f16tof32','f32tof16','faceforward','firstbithigh', - 'firstbitlow','floor','fma','fmod','frac','frexp','fwidth', - 'GetRenderTargetSampleCount','GetRenderTargetSamplePosition', - 'GlobalOrderedCountIncrement','GroupMemoryBarrier', - 'GroupMemoryBarrierWithGroupSync','InterlockedAdd','InterlockedAnd', - 'InterlockedCompareExchange','InterlockedCompareStore', - 'InterlockedExchange','InterlockedMax','InterlockedMin', - 'InterlockedOr','InterlockedXor','isfinite','isinf','isnan', - 'ldexp','length','lerp','lit','log','log10','log2','mad','max', - 'min','modf','msad4','mul','noise','normalize','pow','printf', - 'Process2DQuadTessFactorsAvg','Process2DQuadTessFactorsMax', - 'Process2DQuadTessFactorsMin','ProcessIsolineTessFactors', - 'ProcessQuadTessFactorsAvg','ProcessQuadTessFactorsMax', - 'ProcessQuadTessFactorsMin','ProcessTriTessFactorsAvg', - 'ProcessTriTessFactorsMax','ProcessTriTessFactorsMin', - 'QuadReadLaneAt','QuadSwapX','QuadSwapY','radians','rcp', - 'reflect','refract','reversebits','round','rsqrt','saturate', - 'sign','sin','sincos','sinh','smoothstep','sqrt','step','tan', - 'tanh','tex1D','tex1D','tex1Dbias','tex1Dgrad','tex1Dlod', - 'tex1Dproj','tex2D','tex2D','tex2Dbias','tex2Dgrad','tex2Dlod', - 'tex2Dproj','tex3D','tex3D','tex3Dbias','tex3Dgrad','tex3Dlod', - 'tex3Dproj','texCUBE','texCUBE','texCUBEbias','texCUBEgrad', - 'texCUBElod','texCUBEproj','transpose','trunc','WaveAllBitAnd', - 'WaveAllMax','WaveAllMin','WaveAllBitOr','WaveAllBitXor', - 'WaveAllEqual','WaveAllProduct','WaveAllSum','WaveAllTrue', - 'WaveAnyTrue','WaveBallot','WaveGetLaneCount','WaveGetLaneIndex', - 'WaveGetOrderedIndex','WaveIsHelperLane','WaveOnce', - 'WavePrefixProduct','WavePrefixSum','WaveReadFirstLane', - 'WaveReadLaneAt'), - prefix=r'\b', suffix=r'\b'), - Name.Builtin), # built-in functions - (words(( - 'SV_ClipDistance','SV_ClipDistance0','SV_ClipDistance1', - 'SV_Culldistance','SV_CullDistance0','SV_CullDistance1', - 'SV_Coverage','SV_Depth','SV_DepthGreaterEqual', - 'SV_DepthLessEqual','SV_DispatchThreadID','SV_DomainLocation', - 'SV_GroupID','SV_GroupIndex','SV_GroupThreadID','SV_GSInstanceID', - 'SV_InnerCoverage','SV_InsideTessFactor','SV_InstanceID', - 'SV_IsFrontFace','SV_OutputControlPointID','SV_Position', - 'SV_PrimitiveID','SV_RenderTargetArrayIndex','SV_SampleIndex', - 'SV_StencilRef','SV_TessFactor','SV_VertexID', - 'SV_ViewportArrayIndex'), - prefix=r'\b', suffix=r'\b'), - Name.Decorator), # system-value semantics - (r'\bSV_Target[0-7]?\b', Name.Decorator), - (words(( - 'allow_uav_condition','branch','call','domain','earlydepthstencil', - 'fastopt','flatten','forcecase','instance','loop','maxtessfactor', - 'numthreads','outputcontrolpoints','outputtopology','partitioning', - 'patchconstantfunc','unroll'), - prefix=r'\b', suffix=r'\b'), - Name.Decorator), # attributes - (r'[a-zA-Z_]\w*', Name), - (r'\\$', Comment.Preproc), # backslash at end of line -- usually macro continuation + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + (r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?', + Operator), + (r'[?:]', Operator), # quick hack for ternary + (r'\bdefined\b', Operator), + (r'[;{}(),.\[\]]', Punctuation), + # FIXME when e is present, no decimal point needed + (r'[+-]?\d*\.\d+([eE][-+]?\d+)?f?', Number.Float), + (r'[+-]?\d+\.\d*([eE][-+]?\d+)?f?', Number.Float), + (r'0[xX][0-9a-fA-F]*', Number.Hex), + (r'0[0-7]*', Number.Oct), + (r'[1-9][0-9]*', Number.Integer), + (r'"', String, 'string'), + (words(( + 'asm','asm_fragment','break','case','cbuffer','centroid','class', + 'column_major','compile','compile_fragment','const','continue', + 'default','discard','do','else','export','extern','for','fxgroup', + 'globallycoherent','groupshared','if','in','inline','inout', + 'interface','line','lineadj','linear','namespace','nointerpolation', + 'noperspective','NULL','out','packoffset','pass','pixelfragment', + 'point','precise','return','register','row_major','sample', + 'sampler','shared','stateblock','stateblock_state','static', + 'struct','switch','tbuffer','technique','technique10', + 'technique11','texture','typedef','triangle','triangleadj', + 'uniform','vertexfragment','volatile','while'), + prefix=r'\b', suffix=r'\b'), + Keyword), + (words(('true','false'), prefix=r'\b', suffix=r'\b'), + Keyword.Constant), + (words(( + 'auto','catch','char','const_cast','delete','dynamic_cast','enum', + 'explicit','friend','goto','long','mutable','new','operator', + 'private','protected','public','reinterpret_cast','short','signed', + 'sizeof','static_cast','template','this','throw','try','typename', + 'union','unsigned','using','virtual'), + prefix=r'\b', suffix=r'\b'), + Keyword.Reserved), + (words(( + 'dword','matrix','snorm','string','unorm','unsigned','void','vector', + 'BlendState','Buffer','ByteAddressBuffer','ComputeShader', + 'DepthStencilState','DepthStencilView','DomainShader', + 'GeometryShader','HullShader','InputPatch','LineStream', + 'OutputPatch','PixelShader','PointStream','RasterizerState', + 'RenderTargetView','RasterizerOrderedBuffer', + 'RasterizerOrderedByteAddressBuffer', + 'RasterizerOrderedStructuredBuffer','RasterizerOrderedTexture1D', + 'RasterizerOrderedTexture1DArray','RasterizerOrderedTexture2D', + 'RasterizerOrderedTexture2DArray','RasterizerOrderedTexture3D', + 'RWBuffer','RWByteAddressBuffer','RWStructuredBuffer', + 'RWTexture1D','RWTexture1DArray','RWTexture2D','RWTexture2DArray', + 'RWTexture3D','SamplerState','SamplerComparisonState', + 'StructuredBuffer','Texture1D','Texture1DArray','Texture2D', + 'Texture2DArray','Texture2DMS','Texture2DMSArray','Texture3D', + 'TextureCube','TextureCubeArray','TriangleStream','VertexShader'), + prefix=r'\b', suffix=r'\b'), + Keyword.Type), + (words(( + 'bool','double','float','int','half','min16float','min10float', + 'min16int','min12int','min16uint','uint'), + prefix=r'\b', suffix=r'([1-4](x[1-4])?)?\b'), + Keyword.Type), # vector and matrix types + (words(( + 'abort','abs','acos','all','AllMemoryBarrier', + 'AllMemoryBarrierWithGroupSync','any','AppendStructuredBuffer', + 'asdouble','asfloat','asin','asint','asuint','asuint','atan', + 'atan2','ceil','CheckAccessFullyMapped','clamp','clip', + 'CompileShader','ConsumeStructuredBuffer','cos','cosh','countbits', + 'cross','D3DCOLORtoUBYTE4','ddx','ddx_coarse','ddx_fine','ddy', + 'ddy_coarse','ddy_fine','degrees','determinant', + 'DeviceMemoryBarrier','DeviceMemoryBarrierWithGroupSync','distance', + 'dot','dst','errorf','EvaluateAttributeAtCentroid', + 'EvaluateAttributeAtSample','EvaluateAttributeSnapped','exp', + 'exp2','f16tof32','f32tof16','faceforward','firstbithigh', + 'firstbitlow','floor','fma','fmod','frac','frexp','fwidth', + 'GetRenderTargetSampleCount','GetRenderTargetSamplePosition', + 'GlobalOrderedCountIncrement','GroupMemoryBarrier', + 'GroupMemoryBarrierWithGroupSync','InterlockedAdd','InterlockedAnd', + 'InterlockedCompareExchange','InterlockedCompareStore', + 'InterlockedExchange','InterlockedMax','InterlockedMin', + 'InterlockedOr','InterlockedXor','isfinite','isinf','isnan', + 'ldexp','length','lerp','lit','log','log10','log2','mad','max', + 'min','modf','msad4','mul','noise','normalize','pow','printf', + 'Process2DQuadTessFactorsAvg','Process2DQuadTessFactorsMax', + 'Process2DQuadTessFactorsMin','ProcessIsolineTessFactors', + 'ProcessQuadTessFactorsAvg','ProcessQuadTessFactorsMax', + 'ProcessQuadTessFactorsMin','ProcessTriTessFactorsAvg', + 'ProcessTriTessFactorsMax','ProcessTriTessFactorsMin', + 'QuadReadLaneAt','QuadSwapX','QuadSwapY','radians','rcp', + 'reflect','refract','reversebits','round','rsqrt','saturate', + 'sign','sin','sincos','sinh','smoothstep','sqrt','step','tan', + 'tanh','tex1D','tex1D','tex1Dbias','tex1Dgrad','tex1Dlod', + 'tex1Dproj','tex2D','tex2D','tex2Dbias','tex2Dgrad','tex2Dlod', + 'tex2Dproj','tex3D','tex3D','tex3Dbias','tex3Dgrad','tex3Dlod', + 'tex3Dproj','texCUBE','texCUBE','texCUBEbias','texCUBEgrad', + 'texCUBElod','texCUBEproj','transpose','trunc','WaveAllBitAnd', + 'WaveAllMax','WaveAllMin','WaveAllBitOr','WaveAllBitXor', + 'WaveAllEqual','WaveAllProduct','WaveAllSum','WaveAllTrue', + 'WaveAnyTrue','WaveBallot','WaveGetLaneCount','WaveGetLaneIndex', + 'WaveGetOrderedIndex','WaveIsHelperLane','WaveOnce', + 'WavePrefixProduct','WavePrefixSum','WaveReadFirstLane', + 'WaveReadLaneAt'), + prefix=r'\b', suffix=r'\b'), + Name.Builtin), # built-in functions + (words(( + 'SV_ClipDistance','SV_ClipDistance0','SV_ClipDistance1', + 'SV_Culldistance','SV_CullDistance0','SV_CullDistance1', + 'SV_Coverage','SV_Depth','SV_DepthGreaterEqual', + 'SV_DepthLessEqual','SV_DispatchThreadID','SV_DomainLocation', + 'SV_GroupID','SV_GroupIndex','SV_GroupThreadID','SV_GSInstanceID', + 'SV_InnerCoverage','SV_InsideTessFactor','SV_InstanceID', + 'SV_IsFrontFace','SV_OutputControlPointID','SV_Position', + 'SV_PrimitiveID','SV_RenderTargetArrayIndex','SV_SampleIndex', + 'SV_StencilRef','SV_TessFactor','SV_VertexID', + 'SV_ViewportArrayIndex'), + prefix=r'\b', suffix=r'\b'), + Name.Decorator), # system-value semantics + (r'\bSV_Target[0-7]?\b', Name.Decorator), + (words(( + 'allow_uav_condition','branch','call','domain','earlydepthstencil', + 'fastopt','flatten','forcecase','instance','loop','maxtessfactor', + 'numthreads','outputcontrolpoints','outputtopology','partitioning', + 'patchconstantfunc','unroll'), + prefix=r'\b', suffix=r'\b'), + Name.Decorator), # attributes + (r'[a-zA-Z_]\w*', Name), + (r'\\$', Comment.Preproc), # backslash at end of line -- usually macro continuation (r'\s+', Whitespace), - ], - 'string': [ - (r'"', String, '#pop'), - (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|' - r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape), - (r'[^\\"\n]+', String), # all other characters - (r'\\\n', String), # line continuation - (r'\\', String), # stray backslash - ], - } - - + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|' + r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\\n', String), # line continuation + (r'\\', String), # stray backslash + ], + } + + class PostScriptLexer(RegexLexer): """ Lexer for PostScript files. @@ -460,8 +460,8 @@ class AsymptoteLexer(RegexLexer): r'bounds|coord|frame|guide|horner|int|linefit|marginT|pair|pen|' r'picture|position|real|revolution|slice|splitface|ticksgridT|' r'tickvalues|tree|triple|vertex|void)\b', Keyword.Type), - (r'[a-zA-Z_]\w*:(?!:)', Name.Label), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*:(?!:)', Name.Label), + (r'[a-zA-Z_]\w*', Name), ], 'root': [ include('whitespace'), @@ -561,9 +561,9 @@ class GnuplotLexer(RegexLexer): (_shortened_many('pwd$', 're$read', 'res$et', 'scr$eendump', 'she$ll', 'test$'), Keyword, 'noargs'), - (r'([a-zA-Z_]\w*)(\s*)(=)', + (r'([a-zA-Z_]\w*)(\s*)(=)', bygroups(Name.Variable, Whitespace, Operator), 'genericargs'), - (r'([a-zA-Z_]\w*)(\s*\(.*?\)\s*)(=)', + (r'([a-zA-Z_]\w*)(\s*\(.*?\)\s*)(=)', bygroups(Name.Function, Whitespace, Operator), 'genericargs'), (r'@[a-zA-Z_]\w*', Name.Constant), # macros (r';', Keyword), @@ -609,7 +609,7 @@ class GnuplotLexer(RegexLexer): (r'(\d+\.\d*|\.\d+)', Number.Float), (r'-?\d+', Number.Integer), ('[,.~!%^&*+=|?:<>/-]', Operator), - (r'[{}()\[\]]', Punctuation), + (r'[{}()\[\]]', Punctuation), (r'(eq|ne)\b', Operator.Word), (r'([a-zA-Z_]\w*)(\s*)(\()', bygroups(Name.Function, Text, Punctuation)), diff --git a/contrib/python/Pygments/py3/pygments/lexers/haskell.py b/contrib/python/Pygments/py3/pygments/lexers/haskell.py index 4201ec876d..6ab0f3340e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/haskell.py +++ b/contrib/python/Pygments/py3/pygments/lexers/haskell.py @@ -11,12 +11,12 @@ import re from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \ - default, include, inherit + default, include, inherit from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Generic, Whitespace from pygments import unistring as uni -__all__ = ['HaskellLexer', 'HspecLexer', 'IdrisLexer', 'AgdaLexer', 'CryptolLexer', +__all__ = ['HaskellLexer', 'HspecLexer', 'IdrisLexer', 'AgdaLexer', 'CryptolLexer', 'LiterateHaskellLexer', 'LiterateIdrisLexer', 'LiterateAgdaLexer', 'LiterateCryptolLexer', 'KokaLexer'] @@ -38,7 +38,7 @@ class HaskellLexer(RegexLexer): flags = re.MULTILINE | re.UNICODE reserved = ('case', 'class', 'data', 'default', 'deriving', 'do', 'else', - 'family', 'if', 'in', 'infix[lr]?', 'instance', + 'family', 'if', 'in', 'infix[lr]?', 'instance', 'let', 'newtype', 'of', 'then', 'type', 'where', '_') ascii = ('NUL', 'SOH', '[SE]TX', 'EOT', 'ENQ', 'ACK', 'BEL', 'BS', 'HT', 'LF', 'VT', 'FF', 'CR', 'S[OI]', 'DLE', @@ -62,9 +62,9 @@ class HaskellLexer(RegexLexer): (r'^[_' + uni.Ll + r'][\w\']*', Name.Function), (r"'?[_" + uni.Ll + r"][\w']*", Name), (r"('')?[" + uni.Lu + r"][\w\']*", Keyword.Type), - (r"(')[" + uni.Lu + r"][\w\']*", Keyword.Type), - (r"(')\[[^\]]*\]", Keyword.Type), # tuples and lists get special treatment in GHC - (r"(')\([^)]*\)", Keyword.Type), # .. + (r"(')[" + uni.Lu + r"][\w\']*", Keyword.Type), + (r"(')\[[^\]]*\]", Keyword.Type), # tuples and lists get special treatment in GHC + (r"(')\([^)]*\)", Keyword.Type), # .. (r"(')[:!#$%&*+.\\/<=>?@^|~-]+", Keyword.Type), # promoted type operators # Operators (r'\\(?![:!#$%&*+.\\/<=>?@^|~-]+)', Name.Function), # lambda operator @@ -72,15 +72,15 @@ class HaskellLexer(RegexLexer): (r':[:!#$%&*+.\\/<=>?@^|~-]*', Keyword.Type), # Constructor operators (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # Other operators # Numbers - (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*', Number.Float), - (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*\.[\da-fA-F](_*[\da-fA-F])*' - r'(_*[pP][+-]?\d(_*\d)*)?', Number.Float), - (r'\d(_*\d)*_*[eE][+-]?\d(_*\d)*', Number.Float), - (r'\d(_*\d)*\.\d(_*\d)*(_*[eE][+-]?\d(_*\d)*)?', Number.Float), - (r'0[bB]_*[01](_*[01])*', Number.Bin), - (r'0[oO]_*[0-7](_*[0-7])*', Number.Oct), - (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*', Number.Hex), - (r'\d(_*\d)*', Number.Integer), + (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*', Number.Float), + (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*\.[\da-fA-F](_*[\da-fA-F])*' + r'(_*[pP][+-]?\d(_*\d)*)?', Number.Float), + (r'\d(_*\d)*_*[eE][+-]?\d(_*\d)*', Number.Float), + (r'\d(_*\d)*\.\d(_*\d)*(_*[eE][+-]?\d(_*\d)*)?', Number.Float), + (r'0[bB]_*[01](_*[01])*', Number.Bin), + (r'0[oO]_*[0-7](_*[0-7])*', Number.Oct), + (r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*', Number.Hex), + (r'\d(_*\d)*', Number.Integer), # Character/String Literals (r"'", String.Char, 'character'), (r'"', String, 'string'), @@ -158,28 +158,28 @@ class HaskellLexer(RegexLexer): } -class HspecLexer(HaskellLexer): - """ - A Haskell lexer with support for Hspec constructs. - - .. versionadded:: 2.4.0 - """ - - name = 'Hspec' - aliases = ['hspec'] - filenames = [] - mimetypes = [] - - tokens = { - 'root': [ +class HspecLexer(HaskellLexer): + """ + A Haskell lexer with support for Hspec constructs. + + .. versionadded:: 2.4.0 + """ + + name = 'Hspec' + aliases = ['hspec'] + filenames = [] + mimetypes = [] + + tokens = { + 'root': [ (r'(it)(\s*)("[^"]*")', bygroups(Text, Whitespace, String.Doc)), (r'(describe)(\s*)("[^"]*")', bygroups(Text, Whitespace, String.Doc)), (r'(context)(\s*)("[^"]*")', bygroups(Text, Whitespace, String.Doc)), - inherit, - ], - } - - + inherit, + ], + } + + class IdrisLexer(RegexLexer): """ A lexer for the dependently typed programming language Idris. @@ -351,7 +351,7 @@ class AgdaLexer(RegexLexer): 'module': [ (r'\{-', Comment.Multiline, 'comment'), (r'[a-zA-Z][\w.]*', Name, '#pop'), - (r'[\W0-9_]+', Text) + (r'[\W0-9_]+', Text) ], 'comment': HaskellLexer.tokens['comment'], 'character': HaskellLexer.tokens['character'], @@ -445,8 +445,8 @@ class CryptolLexer(RegexLexer): (r'[A-Z]\w*', Keyword.Type), (r'(_[\w\']+|[a-z][\w\']*)', Name.Function), # TODO: these don't match the comments in docs, remove. - # (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single), - # (r'{-', Comment.Multiline, 'comment'), + # (r'--(?![!#$%&*+./<=>?@^|_~:\\]).*?$', Comment.Single), + # (r'{-', Comment.Multiline, 'comment'), (r',', Punctuation), (r'[:!#$%&*+.\\/<=>?@^|~-]+', Operator), # (HACK, but it makes sense to push two instances, believe me) @@ -703,10 +703,10 @@ class KokaLexer(RegexLexer): symbols = r'[$%&*+@!/\\^~=.:\-?|<>]+' # symbol boundary: an operator keyword should not be followed by any of these - sboundary = '(?!' + symbols + ')' + sboundary = '(?!' + symbols + ')' # name boundary: a keyword should not be followed by any of these - boundary = r'(?![\w/])' + boundary = r'(?![\w/])' # koka token abstractions tokenType = Name.Attribute diff --git a/contrib/python/Pygments/py3/pygments/lexers/haxe.py b/contrib/python/Pygments/py3/pygments/lexers/haxe.py index 28580712cb..ee587e99b7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/haxe.py +++ b/contrib/python/Pygments/py3/pygments/lexers/haxe.py @@ -42,7 +42,7 @@ class HaxeLexer(ExtendedRegexLexer): typeid = r'_*[A-Z]\w*' # combined ident and dollar and idtype - ident = r'(?:_*[a-z]\w*|_+[0-9]\w*|' + typeid + r'|_+|\$\w+)' + ident = r'(?:_*[a-z]\w*|_+[0-9]\w*|' + typeid + r'|_+|\$\w+)' binop = (r'(?:%=|&=|\|=|\^=|\+=|\-=|\*=|/=|<<=|>\s*>\s*=|>\s*>\s*>\s*=|==|' r'!=|<=|>\s*=|&&|\|\||<<|>>>|>\s*>|\.\.\.|<|>|%|&|\||\^|\+|\*|' @@ -181,7 +181,7 @@ class HaxeLexer(ExtendedRegexLexer): (r'[0-9]+[eE][+\-]?[0-9]+', Number.Float), (r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float), (r'[0-9]+\.[0-9]+', Number.Float), - (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float), + (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float), # Int (r'0x[0-9a-fA-F]+', Number.Hex), @@ -218,7 +218,7 @@ class HaxeLexer(ExtendedRegexLexer): (r'[0-9]+[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')), (r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')), (r'[0-9]+\.[0-9]+', Number.Float, ('#pop', 'preproc-expr-chain')), - (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, ('#pop', 'preproc-expr-chain')), + (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, ('#pop', 'preproc-expr-chain')), # Int (r'0x[0-9a-fA-F]+', Number.Hex, ('#pop', 'preproc-expr-chain')), @@ -455,7 +455,7 @@ class HaxeLexer(ExtendedRegexLexer): (r'[0-9]+[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'expr-chain')), (r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float, ('#pop', 'expr-chain')), (r'[0-9]+\.[0-9]+', Number.Float, ('#pop', 'expr-chain')), - (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, ('#pop', 'expr-chain')), + (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, ('#pop', 'expr-chain')), # Int (r'0x[0-9a-fA-F]+', Number.Hex, ('#pop', 'expr-chain')), @@ -710,7 +710,7 @@ class HaxeLexer(ExtendedRegexLexer): (r'[0-9]+[eE][+\-]?[0-9]+', Number.Float, '#pop'), (r'[0-9]+\.[0-9]*[eE][+\-]?[0-9]+', Number.Float, '#pop'), (r'[0-9]+\.[0-9]+', Number.Float, '#pop'), - (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, '#pop'), + (r'[0-9]+\.(?!' + ident + r'|\.\.)', Number.Float, '#pop'), # Int (r'0x[0-9a-fA-F]+', Number.Hex, '#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/hdl.py b/contrib/python/Pygments/py3/pygments/lexers/hdl.py index ddaf5d4322..e96f79a475 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/hdl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/hdl.py @@ -105,8 +105,8 @@ class VerilogLexer(RegexLexer): 'trior', 'tri0', 'tri1', 'trireg', 'uwire', 'wire', 'wand', 'wor' 'shortreal', 'real', 'realtime'), suffix=r'\b'), Keyword.Type), - (r'[a-zA-Z_]\w*:(?!:)', Name.Label), - (r'\$?[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*:(?!:)', Name.Label), + (r'\$?[a-zA-Z_]\w*', Name), (r'\\(\S+)', Name), ], 'string': [ @@ -345,8 +345,8 @@ class SystemVerilogLexer(RegexLexer): ), suffix=r'\b'), Name.Builtin), - (r'[a-zA-Z_]\w*:(?!:)', Name.Label), - (r'\$?[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*:(?!:)', Name.Label), + (r'\$?[a-zA-Z_]\w*', Name), (r'\\(\S+)', Name), ], 'string': [ @@ -391,26 +391,26 @@ class VhdlLexer(RegexLexer): (r'[~!%^&*+=|?:<>/-]', Operator), (r"'[a-z_]\w*", Name.Attribute), (r'[()\[\],.;\']', Punctuation), - (r'"[^\n\\"]*"', String), + (r'"[^\n\\"]*"', String), (r'(library)(\s+)([a-z_]\w*)', bygroups(Keyword, Whitespace, Name.Namespace)), (r'(use)(\s+)(entity)', bygroups(Keyword, Whitespace, Keyword)), - (r'(use)(\s+)([a-z_][\w.]*\.)(all)', + (r'(use)(\s+)([a-z_][\w.]*\.)(all)', bygroups(Keyword, Whitespace, Name.Namespace, Keyword)), (r'(use)(\s+)([a-z_][\w.]*)', bygroups(Keyword, Whitespace, Name.Namespace)), - (r'(std|ieee)(\.[a-z_]\w*)', - bygroups(Name.Namespace, Name.Namespace)), - (words(('std', 'ieee', 'work'), suffix=r'\b'), - Name.Namespace), + (r'(std|ieee)(\.[a-z_]\w*)', + bygroups(Name.Namespace, Name.Namespace)), + (words(('std', 'ieee', 'work'), suffix=r'\b'), + Name.Namespace), (r'(entity|component)(\s+)([a-z_]\w*)', bygroups(Keyword, Whitespace, Name.Class)), (r'(architecture|configuration)(\s+)([a-z_]\w*)(\s+)' r'(of)(\s+)([a-z_]\w*)(\s+)(is)', bygroups(Keyword, Whitespace, Name.Class, Whitespace, Keyword, Whitespace, Name.Class, Whitespace, Keyword)), - (r'([a-z_]\w*)(:)(\s+)(process|for)', + (r'([a-z_]\w*)(:)(\s+)(process|for)', bygroups(Name.Class, Operator, Whitespace, Keyword)), (r'(end)(\s+)', bygroups(using(this), Whitespace), 'endblock'), @@ -431,7 +431,7 @@ class VhdlLexer(RegexLexer): 'boolean', 'bit', 'character', 'severity_level', 'integer', 'time', 'delay_length', 'natural', 'positive', 'string', 'bit_vector', 'file_open_kind', 'file_open_status', 'std_ulogic', 'std_ulogic_vector', - 'std_logic', 'std_logic_vector', 'signed', 'unsigned'), suffix=r'\b'), + 'std_logic', 'std_logic_vector', 'signed', 'unsigned'), suffix=r'\b'), Keyword.Type), ], 'keywords': [ @@ -447,8 +447,8 @@ class VhdlLexer(RegexLexer): 'next', 'nor', 'not', 'null', 'of', 'on', 'open', 'or', 'others', 'out', 'package', 'port', 'postponed', 'procedure', 'process', 'pure', 'range', 'record', - 'register', 'reject', 'rem', 'return', 'rol', 'ror', 'select', - 'severity', 'signal', 'shared', 'sla', 'sll', 'sra', + 'register', 'reject', 'rem', 'return', 'rol', 'ror', 'select', + 'severity', 'signal', 'shared', 'sla', 'sll', 'sra', 'srl', 'subtype', 'then', 'to', 'transport', 'type', 'units', 'until', 'use', 'variable', 'wait', 'when', 'while', 'with', 'xnor', 'xor'), suffix=r'\b'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/hexdump.py b/contrib/python/Pygments/py3/pygments/lexers/hexdump.py index 7d9a235a1b..041d7f6c25 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/hexdump.py +++ b/contrib/python/Pygments/py3/pygments/lexers/hexdump.py @@ -33,7 +33,7 @@ class HexdumpLexer(RegexLexer): * ``od -t x1z FILE`` * ``xxd FILE`` * ``DEBUG.EXE FILE.COM`` and entering ``d`` to the prompt. - + .. versionadded:: 2.1 """ name = 'Hexdump' @@ -45,16 +45,16 @@ class HexdumpLexer(RegexLexer): 'root': [ (r'\n', Whitespace), include('offset'), - (r'('+hd+r'{2})(\-)('+hd+r'{2})', - bygroups(Number.Hex, Punctuation, Number.Hex)), + (r'('+hd+r'{2})(\-)('+hd+r'{2})', + bygroups(Number.Hex, Punctuation, Number.Hex)), (hd+r'{2}', Number.Hex), - (r'(\s{2,3})(\>)(.{16})(\<)$', + (r'(\s{2,3})(\>)(.{16})(\<)$', bygroups(Whitespace, Punctuation, String, Punctuation), 'bracket-strings'), - (r'(\s{2,3})(\|)(.{16})(\|)$', + (r'(\s{2,3})(\|)(.{16})(\|)$', bygroups(Whitespace, Punctuation, String, Punctuation), 'piped-strings'), - (r'(\s{2,3})(\>)(.{1,15})(\<)$', + (r'(\s{2,3})(\>)(.{1,15})(\<)$', bygroups(Whitespace, Punctuation, String, Punctuation)), - (r'(\s{2,3})(\|)(.{1,15})(\|)$', + (r'(\s{2,3})(\|)(.{1,15})(\|)$', bygroups(Whitespace, Punctuation, String, Punctuation)), (r'(\s{2,3})(.{1,15})$', bygroups(Whitespace, String)), (r'(\s{2,3})(.{16}|.{20})$', bygroups(Whitespace, String), 'nonpiped-strings'), @@ -74,7 +74,7 @@ class HexdumpLexer(RegexLexer): (r'\n', Whitespace), include('offset'), (hd+r'{2}', Number.Hex), - (r'(\s{2,3})(\|)(.{1,16})(\|)$', + (r'(\s{2,3})(\|)(.{1,16})(\|)$', bygroups(Whitespace, Punctuation, String, Punctuation)), (r'\s', Whitespace), (r'^\*', Punctuation), @@ -83,7 +83,7 @@ class HexdumpLexer(RegexLexer): (r'\n', Whitespace), include('offset'), (hd+r'{2}', Number.Hex), - (r'(\s{2,3})(\>)(.{1,16})(\<)$', + (r'(\s{2,3})(\>)(.{1,16})(\<)$', bygroups(Whitespace, Punctuation, String, Punctuation)), (r'\s', Whitespace), (r'^\*', Punctuation), @@ -91,8 +91,8 @@ class HexdumpLexer(RegexLexer): 'nonpiped-strings': [ (r'\n', Whitespace), include('offset'), - (r'('+hd+r'{2})(\-)('+hd+r'{2})', - bygroups(Number.Hex, Punctuation, Number.Hex)), + (r'('+hd+r'{2})(\-)('+hd+r'{2})', + bygroups(Number.Hex, Punctuation, Number.Hex)), (hd+r'{2}', Number.Hex), (r'(\s{19,})(.{1,20}?)$', bygroups(Whitespace, String)), (r'(\s{2,3})(.{1,20})$', bygroups(Whitespace, String)), diff --git a/contrib/python/Pygments/py3/pygments/lexers/html.py b/contrib/python/Pygments/py3/pygments/lexers/html.py index 01225a5045..2e29f453cd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/html.py +++ b/contrib/python/Pygments/py3/pygments/lexers/html.py @@ -22,7 +22,7 @@ from pygments.lexers.css import CssLexer, _indentation, _starts_block from pygments.lexers.ruby import RubyLexer __all__ = ['HtmlLexer', 'DtdLexer', 'XmlLexer', 'XsltLexer', 'HamlLexer', - 'ScamlLexer', 'PugLexer'] + 'ScamlLexer', 'PugLexer'] class HtmlLexer(RegexLexer): @@ -221,7 +221,7 @@ class XmlLexer(RegexLexer): (r'/?\s*>', Name.Tag, '#pop'), ], 'attr': [ - (r'\s+', Text), + (r'\s+', Text), ('".*?"', String, '#pop'), ("'.*?'", String, '#pop'), (r'[^\s>]+', String, '#pop'), @@ -314,7 +314,7 @@ class HamlLexer(ExtendedRegexLexer): include('css'), (r'%[\w:-]+', Name.Tag, 'tag'), (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), - (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', + (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', bygroups(Comment, Comment.Special, Comment), '#pop'), (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), @@ -331,8 +331,8 @@ class HamlLexer(ExtendedRegexLexer): 'tag': [ include('css'), - (r'\{(,\n|' + _dot + r')*?\}', using(RubyLexer)), - (r'\[' + _dot + r'*?\]', using(RubyLexer)), + (r'\{(,\n|' + _dot + r')*?\}', using(RubyLexer)), + (r'\[' + _dot + r'*?\]', using(RubyLexer)), (r'\(', Text, 'html-attributes'), (r'/[ \t]*\n', Punctuation, '#pop:2'), (r'[<>]{1,2}(?=[ \t=])', Punctuation), @@ -341,7 +341,7 @@ class HamlLexer(ExtendedRegexLexer): 'plain': [ (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), - (r'(#\{)(' + _dot + r'*?)(\})', + (r'(#\{)(' + _dot + r'*?)(\})', bygroups(String.Interpol, using(RubyLexer), String.Interpol)), (r'\n', Text, 'root'), ], @@ -374,7 +374,7 @@ class HamlLexer(ExtendedRegexLexer): 'filter-block': [ (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), - (r'(#\{)(' + _dot + r'*?)(\})', + (r'(#\{)(' + _dot + r'*?)(\})', bygroups(String.Interpol, using(RubyLexer), String.Interpol)), (r'\n', Text, 'root'), ], @@ -423,7 +423,7 @@ class ScamlLexer(ExtendedRegexLexer): include('css'), (r'%[\w:-]+', Name.Tag, 'tag'), (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), - (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', + (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', bygroups(Comment, Comment.Special, Comment), '#pop'), (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), @@ -443,8 +443,8 @@ class ScamlLexer(ExtendedRegexLexer): 'tag': [ include('css'), - (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)), - (r'\[' + _dot + r'*?\]', using(ScalaLexer)), + (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)), + (r'\[' + _dot + r'*?\]', using(ScalaLexer)), (r'\(', Text, 'html-attributes'), (r'/[ \t]*\n', Punctuation, '#pop:2'), (r'[<>]{1,2}(?=[ \t=])', Punctuation), @@ -453,7 +453,7 @@ class ScamlLexer(ExtendedRegexLexer): 'plain': [ (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), - (r'(#\{)(' + _dot + r'*?)(\})', + (r'(#\{)(' + _dot + r'*?)(\})', bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), (r'\n', Text, 'root'), ], @@ -486,26 +486,26 @@ class ScamlLexer(ExtendedRegexLexer): 'filter-block': [ (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), - (r'(#\{)(' + _dot + r'*?)(\})', + (r'(#\{)(' + _dot + r'*?)(\})', bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), (r'\n', Text, 'root'), ], } -class PugLexer(ExtendedRegexLexer): +class PugLexer(ExtendedRegexLexer): """ - For Pug markup. - Pug is a variant of Scaml, see: + For Pug markup. + Pug is a variant of Scaml, see: http://scalate.fusesource.org/documentation/scaml-reference.html .. versionadded:: 1.4 """ - name = 'Pug' - aliases = ['pug', 'jade'] - filenames = ['*.pug', '*.jade'] - mimetypes = ['text/x-pug', 'text/x-jade'] + name = 'Pug' + aliases = ['pug', 'jade'] + filenames = ['*.pug', '*.jade'] + mimetypes = ['text/x-pug', 'text/x-jade'] flags = re.IGNORECASE _dot = r'.' @@ -531,7 +531,7 @@ class PugLexer(ExtendedRegexLexer): 'content': [ include('css'), (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), - (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', + (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', bygroups(Comment, Comment.Special, Comment), '#pop'), (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), @@ -552,8 +552,8 @@ class PugLexer(ExtendedRegexLexer): 'tag': [ include('css'), - (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)), - (r'\[' + _dot + r'*?\]', using(ScalaLexer)), + (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)), + (r'\[' + _dot + r'*?\]', using(ScalaLexer)), (r'\(', Text, 'html-attributes'), (r'/[ \t]*\n', Punctuation, '#pop:2'), (r'[<>]{1,2}(?=[ \t=])', Punctuation), @@ -562,7 +562,7 @@ class PugLexer(ExtendedRegexLexer): 'plain': [ (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), - (r'(#\{)(' + _dot + r'*?)(\})', + (r'(#\{)(' + _dot + r'*?)(\})', bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), (r'\n', Text, 'root'), ], @@ -595,9 +595,9 @@ class PugLexer(ExtendedRegexLexer): 'filter-block': [ (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), - (r'(#\{)(' + _dot + r'*?)(\})', + (r'(#\{)(' + _dot + r'*?)(\})', bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), (r'\n', Text, 'root'), ], } -JadeLexer = PugLexer # compat +JadeLexer = PugLexer # compat diff --git a/contrib/python/Pygments/py3/pygments/lexers/idl.py b/contrib/python/Pygments/py3/pygments/lexers/idl.py index b0a445785c..22b8346ac3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/idl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/idl.py @@ -52,7 +52,7 @@ class IDLLexer(RegexLexer): 'broyden', 'butterworth', 'bytarr', 'byte', 'byteorder', 'bytscl', 'caldat', 'calendar', 'call_external', 'call_function', 'call_method', 'call_procedure', 'canny', - 'catch', 'cd', r'cdf_\w*', 'ceil', 'chebyshev', + 'catch', 'cd', r'cdf_\w*', 'ceil', 'chebyshev', 'check_math', 'chisqr_cvf', 'chisqr_pdf', 'choldc', 'cholsol', 'cindgen', 'cir_3pnt', 'close', 'cluster', 'cluster_tree', 'clust_wts', @@ -86,7 +86,7 @@ class IDLLexer(RegexLexer): 'dlm_load', 'dlm_register', 'doc_library', 'double', 'draw_roi', 'edge_dog', 'efont', 'eigenql', 'eigenvec', 'ellipse', 'elmhes', 'emboss', 'empty', 'enable_sysrtn', - 'eof', r'eos_\w*', 'erase', 'erf', 'erfc', 'erfcx', + 'eof', r'eos_\w*', 'erase', 'erf', 'erfc', 'erfcx', 'erode', 'errorplot', 'errplot', 'estimator_filter', 'execute', 'exit', 'exp', 'expand', 'expand_path', 'expint', 'extrac', 'extract_slice', 'factorial', 'fft', 'filepath', @@ -103,11 +103,11 @@ class IDLLexer(RegexLexer): 'gauss_cvf', 'gauss_pdf', 'gauss_smooth', 'getenv', 'getwindows', 'get_drive_list', 'get_dxf_objects', 'get_kbrd', 'get_login_info', 'get_lun', 'get_screen_size', - 'greg2jul', r'grib_\w*', 'grid3', 'griddata', + 'greg2jul', r'grib_\w*', 'grid3', 'griddata', 'grid_input', 'grid_tps', 'gs_iter', - r'h5[adfgirst]_\w*', 'h5_browser', 'h5_close', + r'h5[adfgirst]_\w*', 'h5_browser', 'h5_close', 'h5_create', 'h5_get_libversion', 'h5_open', 'h5_parse', - 'hanning', 'hash', r'hdf_\w*', 'heap_free', + 'hanning', 'hash', r'hdf_\w*', 'heap_free', 'heap_gc', 'heap_nosave', 'heap_refcount', 'heap_save', 'help', 'hilbert', 'histogram', 'hist_2d', 'hist_equal', 'hls', 'hough', 'hqr', 'hsv', 'h_eq_ct', 'h_eq_int', @@ -155,7 +155,7 @@ class IDLLexer(RegexLexer): 'modifyct', 'moment', 'morph_close', 'morph_distance', 'morph_gradient', 'morph_hitormiss', 'morph_open', 'morph_thin', 'morph_tophat', 'multi', 'm_correlate', - r'ncdf_\w*', 'newton', 'noise_hurl', 'noise_pick', + r'ncdf_\w*', 'newton', 'noise_hurl', 'noise_pick', 'noise_scatter', 'noise_slur', 'norm', 'n_elements', 'n_params', 'n_tags', 'objarr', 'obj_class', 'obj_destroy', 'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid', @@ -248,7 +248,7 @@ class IDLLexer(RegexLexer): tokens = { 'root': [ - (r'^\s*;.*?\n', Comment.Single), + (r'^\s*;.*?\n', Comment.Single), (words(_RESERVED, prefix=r'\b', suffix=r'\b'), Keyword), (words(_BUILTIN_LIB, prefix=r'\b', suffix=r'\b'), Name.Builtin), (r'\+=|-=|\^=|\*=|/=|#=|##=|<=|>=|=', Operator), @@ -257,13 +257,13 @@ class IDLLexer(RegexLexer): (r'\b(mod|lt|le|eq|ne|ge|gt|not|and|or|xor)\b', Operator), (r'"[^\"]*"', String.Double), (r"'[^\']*'", String.Single), - (r'\b[+\-]?([0-9]*\.[0-9]+|[0-9]+\.[0-9]*)(D|E)?([+\-]?[0-9]+)?\b', - Number.Float), - (r'\b\'[+\-]?[0-9A-F]+\'X(U?(S?|L{1,2})|B)\b', Number.Hex), - (r'\b\'[+\-]?[0-7]+\'O(U?(S?|L{1,2})|B)\b', Number.Oct), - (r'\b[+\-]?[0-9]+U?L{1,2}\b', Number.Integer.Long), - (r'\b[+\-]?[0-9]+U?S?\b', Number.Integer), - (r'\b[+\-]?[0-9]+B\b', Number), + (r'\b[+\-]?([0-9]*\.[0-9]+|[0-9]+\.[0-9]*)(D|E)?([+\-]?[0-9]+)?\b', + Number.Float), + (r'\b\'[+\-]?[0-9A-F]+\'X(U?(S?|L{1,2})|B)\b', Number.Hex), + (r'\b\'[+\-]?[0-7]+\'O(U?(S?|L{1,2})|B)\b', Number.Oct), + (r'\b[+\-]?[0-9]+U?L{1,2}\b', Number.Integer.Long), + (r'\b[+\-]?[0-9]+U?S?\b', Number.Integer), + (r'\b[+\-]?[0-9]+B\b', Number), (r'.', Text), ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/igor.py b/contrib/python/Pygments/py3/pygments/lexers/igor.py index 79fbf1bfb4..e843d081f1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/igor.py +++ b/contrib/python/Pygments/py3/pygments/lexers/igor.py @@ -39,7 +39,7 @@ class IgorLexer(RegexLexer): types = ( 'variable', 'string', 'constant', 'strconstant', 'NVAR', 'SVAR', 'WAVE', 'STRUCT', 'dfref', 'funcref', 'char', 'uchar', 'int16', 'uint16', 'int32', - 'uint32', 'int64', 'uint64', 'float', 'double' + 'uint32', 'int64', 'uint64', 'float', 'double' ) keywords = ( 'override', 'ThreadSafe', 'MultiThread', 'static', 'Proc', @@ -47,349 +47,349 @@ class IgorLexer(RegexLexer): 'Structure', 'EndStructure', 'EndMacro', 'Menu', 'SubMenu' ) operations = ( - 'Abort', 'AddFIFOData', 'AddFIFOVectData', 'AddMovieAudio', 'AddMovieFrame', - 'AddWavesToBoxPlot', 'AddWavesToViolinPlot', 'AdoptFiles', 'APMath', 'Append', - 'AppendBoxPlot', 'AppendImage', 'AppendLayoutObject', 'AppendMatrixContour', - 'AppendText', 'AppendToGizmo', 'AppendToGraph', 'AppendToLayout', 'AppendToTable', - 'AppendViolinPlot', 'AppendXYZContour', 'AutoPositionWindow', - 'AxonTelegraphFindServers', 'BackgroundInfo', 'Beep', 'BoundingBall', 'BoxSmooth', - 'BrowseURL', 'BuildMenu', 'Button', 'cd', 'Chart', 'CheckBox', 'CheckDisplayed', - 'ChooseColor', 'Close', 'CloseHelp', 'CloseMovie', 'CloseProc', 'ColorScale', - 'ColorTab2Wave', 'Concatenate', 'ControlBar', 'ControlInfo', 'ControlUpdate', - 'ConvertGlobalStringTextEncoding', 'ConvexHull', 'Convolve', 'CopyDimLabels', - 'CopyFile', 'CopyFolder', 'CopyScales', 'Correlate', 'CreateAliasShortcut', - 'CreateBrowser', 'Cross', 'CtrlBackground', 'CtrlFIFO', 'CtrlNamedBackground', - 'Cursor', 'CurveFit', 'CustomControl', 'CWT', 'DAQmx_AI_SetupReader', - 'DAQmx_AO_SetOutputs', 'DAQmx_CTR_CountEdges', 'DAQmx_CTR_OutputPulse', - 'DAQmx_CTR_Period', 'DAQmx_CTR_PulseWidth', 'DAQmx_DIO_Config', - 'DAQmx_DIO_WriteNewData', 'DAQmx_Scan', 'DAQmx_WaveformGen', 'Debugger', - 'DebuggerOptions', 'DefaultFont', 'DefaultGuiControls', 'DefaultGuiFont', - 'DefaultTextEncoding', 'DefineGuide', 'DelayUpdate', 'DeleteAnnotations', - 'DeleteFile', 'DeleteFolder', 'DeletePoints', 'Differentiate', 'dir', 'Display', - 'DisplayHelpTopic', 'DisplayProcedure', 'DoAlert', 'DoIgorMenu', 'DoUpdate', - 'DoWindow', 'DoXOPIdle', 'DPSS', 'DrawAction', 'DrawArc', 'DrawBezier', - 'DrawLine', 'DrawOval', 'DrawPICT', 'DrawPoly', 'DrawRect', 'DrawRRect', - 'DrawText', 'DrawUserShape', 'DSPDetrend', 'DSPPeriodogram', 'Duplicate', - 'DuplicateDataFolder', 'DWT', 'EdgeStats', 'Edit', 'ErrorBars', - 'EstimatePeakSizes', 'Execute', 'ExecuteScriptText', 'ExperimentInfo', - 'ExperimentModified', 'ExportGizmo', 'Extract', 'FastGaussTransform', 'FastOp', - 'FBinRead', 'FBinWrite', 'FFT', 'FGetPos', 'FIFOStatus', 'FIFO2Wave', 'FilterFIR', - 'FilterIIR', 'FindAPeak', 'FindContour', 'FindDuplicates', 'FindLevel', - 'FindLevels', 'FindPeak', 'FindPointsInPoly', 'FindRoots', 'FindSequence', - 'FindValue', 'FMaxFlat', 'FPClustering', 'fprintf', 'FReadLine', 'FSetPos', - 'FStatus', 'FTPCreateDirectory', 'FTPDelete', 'FTPDownload', 'FTPUpload', - 'FuncFit', 'FuncFitMD', 'GBLoadWave', 'GetAxis', 'GetCamera', 'GetFileFolderInfo', - 'GetGizmo', 'GetLastUserMenuInfo', 'GetMarquee', 'GetMouse', 'GetSelection', - 'GetWindow', 'GISCreateVectorLayer', 'GISGetRasterInfo', - 'GISGetRegisteredFileInfo', 'GISGetVectorLayerInfo', 'GISLoadRasterData', - 'GISLoadVectorData', 'GISRasterizeVectorData', 'GISRegisterFile', - 'GISTransformCoords', 'GISUnRegisterFile', 'GISWriteFieldData', - 'GISWriteGeometryData', 'GISWriteRaster', 'GPIBReadBinaryWave2', - 'GPIBReadBinary2', 'GPIBReadWave2', 'GPIBRead2', 'GPIBWriteBinaryWave2', - 'GPIBWriteBinary2', 'GPIBWriteWave2', 'GPIBWrite2', 'GPIB2', 'GraphNormal', - 'GraphWaveDraw', 'GraphWaveEdit', 'Grep', 'GroupBox', 'Hanning', 'HDFInfo', - 'HDFReadImage', 'HDFReadSDS', 'HDFReadVset', 'HDF5CloseFile', 'HDF5CloseGroup', - 'HDF5ConvertColors', 'HDF5CreateFile', 'HDF5CreateGroup', 'HDF5CreateLink', - 'HDF5Dump', 'HDF5DumpErrors', 'HDF5DumpState', 'HDF5FlushFile', - 'HDF5ListAttributes', 'HDF5ListGroup', 'HDF5LoadData', 'HDF5LoadGroup', - 'HDF5LoadImage', 'HDF5OpenFile', 'HDF5OpenGroup', 'HDF5SaveData', 'HDF5SaveGroup', - 'HDF5SaveImage', 'HDF5TestOperation', 'HDF5UnlinkObject', 'HideIgorMenus', - 'HideInfo', 'HideProcedures', 'HideTools', 'HilbertTransform', 'Histogram', 'ICA', - 'IFFT', 'ImageAnalyzeParticles', 'ImageBlend', 'ImageBoundaryToMask', - 'ImageComposite', 'ImageEdgeDetection', 'ImageFileInfo', 'ImageFilter', - 'ImageFocus', 'ImageFromXYZ', 'ImageGenerateROIMask', 'ImageGLCM', - 'ImageHistModification', 'ImageHistogram', 'ImageInterpolate', 'ImageLineProfile', - 'ImageLoad', 'ImageMorphology', 'ImageRegistration', 'ImageRemoveBackground', - 'ImageRestore', 'ImageRotate', 'ImageSave', 'ImageSeedFill', 'ImageSkeleton3d', - 'ImageSnake', 'ImageStats', 'ImageThreshold', 'ImageTransform', - 'ImageUnwrapPhase', 'ImageWindow', 'IndexSort', 'InsertPoints', 'Integrate', - 'IntegrateODE', 'Integrate2D', 'Interpolate2', 'Interpolate3D', 'Interp3DPath', - 'ITCCloseAll2', 'ITCCloseDevice2', 'ITCConfigAllChannels2', - 'ITCConfigChannelReset2', 'ITCConfigChannelUpload2', 'ITCConfigChannel2', - 'ITCFIFOAvailableAll2', 'ITCFIFOAvailable2', 'ITCGetAllChannelsConfig2', - 'ITCGetChannelConfig2', 'ITCGetCurrentDevice2', 'ITCGetDeviceInfo2', - 'ITCGetDevices2', 'ITCGetErrorString2', 'ITCGetSerialNumber2', 'ITCGetState2', - 'ITCGetVersions2', 'ITCInitialize2', 'ITCOpenDevice2', 'ITCReadADC2', - 'ITCReadDigital2', 'ITCReadTimer2', 'ITCSelectDevice2', 'ITCSetDAC2', - 'ITCSetGlobals2', 'ITCSetModes2', 'ITCSetState2', 'ITCStartAcq2', 'ITCStopAcq2', - 'ITCUpdateFIFOPositionAll2', 'ITCUpdateFIFOPosition2', 'ITCWriteDigital2', - 'JCAMPLoadWave', 'JointHistogram', 'KillBackground', 'KillControl', - 'KillDataFolder', 'KillFIFO', 'KillFreeAxis', 'KillPath', 'KillPICTs', - 'KillStrings', 'KillVariables', 'KillWaves', 'KillWindow', 'KMeans', 'Label', - 'Layout', 'LayoutPageAction', 'LayoutSlideShow', 'Legend', - 'LinearFeedbackShiftRegister', 'ListBox', 'LoadData', 'LoadPackagePreferences', - 'LoadPICT', 'LoadWave', 'Loess', 'LombPeriodogram', 'Make', 'MakeIndex', - 'MarkPerfTestTime', 'MatrixConvolve', 'MatrixCorr', 'MatrixEigenV', - 'MatrixFilter', 'MatrixGaussJ', 'MatrixGLM', 'MatrixInverse', 'MatrixLinearSolve', - 'MatrixLinearSolveTD', 'MatrixLLS', 'MatrixLUBkSub', 'MatrixLUD', 'MatrixLUDTD', - 'MatrixMultiply', 'MatrixOP', 'MatrixSchur', 'MatrixSolve', 'MatrixSVBkSub', - 'MatrixSVD', 'MatrixTranspose', 'MCC_FindServers', 'MeasureStyledText', - 'MFR_CheckForNewBricklets', - 'MFR_CloseResultFile', 'MFR_CreateOverviewTable', 'MFR_GetBrickletCount', - 'MFR_GetBrickletData', 'MFR_GetBrickletDeployData', 'MFR_GetBrickletMetaData', - 'MFR_GetBrickletRawData', 'MFR_GetReportTemplate', 'MFR_GetResultFileMetaData', - 'MFR_GetResultFileName', 'MFR_GetVernissageVersion', 'MFR_GetVersion', - 'MFR_GetXOPErrorMessage', 'MFR_OpenResultFile', - 'MLLoadWave', 'Modify', 'ModifyBoxPlot', 'ModifyBrowser', 'ModifyCamera', - 'ModifyContour', 'ModifyControl', 'ModifyControlList', 'ModifyFreeAxis', - 'ModifyGizmo', 'ModifyGraph', 'ModifyImage', 'ModifyLayout', 'ModifyPanel', - 'ModifyTable', 'ModifyViolinPlot', 'ModifyWaterfall', 'MoveDataFolder', + 'Abort', 'AddFIFOData', 'AddFIFOVectData', 'AddMovieAudio', 'AddMovieFrame', + 'AddWavesToBoxPlot', 'AddWavesToViolinPlot', 'AdoptFiles', 'APMath', 'Append', + 'AppendBoxPlot', 'AppendImage', 'AppendLayoutObject', 'AppendMatrixContour', + 'AppendText', 'AppendToGizmo', 'AppendToGraph', 'AppendToLayout', 'AppendToTable', + 'AppendViolinPlot', 'AppendXYZContour', 'AutoPositionWindow', + 'AxonTelegraphFindServers', 'BackgroundInfo', 'Beep', 'BoundingBall', 'BoxSmooth', + 'BrowseURL', 'BuildMenu', 'Button', 'cd', 'Chart', 'CheckBox', 'CheckDisplayed', + 'ChooseColor', 'Close', 'CloseHelp', 'CloseMovie', 'CloseProc', 'ColorScale', + 'ColorTab2Wave', 'Concatenate', 'ControlBar', 'ControlInfo', 'ControlUpdate', + 'ConvertGlobalStringTextEncoding', 'ConvexHull', 'Convolve', 'CopyDimLabels', + 'CopyFile', 'CopyFolder', 'CopyScales', 'Correlate', 'CreateAliasShortcut', + 'CreateBrowser', 'Cross', 'CtrlBackground', 'CtrlFIFO', 'CtrlNamedBackground', + 'Cursor', 'CurveFit', 'CustomControl', 'CWT', 'DAQmx_AI_SetupReader', + 'DAQmx_AO_SetOutputs', 'DAQmx_CTR_CountEdges', 'DAQmx_CTR_OutputPulse', + 'DAQmx_CTR_Period', 'DAQmx_CTR_PulseWidth', 'DAQmx_DIO_Config', + 'DAQmx_DIO_WriteNewData', 'DAQmx_Scan', 'DAQmx_WaveformGen', 'Debugger', + 'DebuggerOptions', 'DefaultFont', 'DefaultGuiControls', 'DefaultGuiFont', + 'DefaultTextEncoding', 'DefineGuide', 'DelayUpdate', 'DeleteAnnotations', + 'DeleteFile', 'DeleteFolder', 'DeletePoints', 'Differentiate', 'dir', 'Display', + 'DisplayHelpTopic', 'DisplayProcedure', 'DoAlert', 'DoIgorMenu', 'DoUpdate', + 'DoWindow', 'DoXOPIdle', 'DPSS', 'DrawAction', 'DrawArc', 'DrawBezier', + 'DrawLine', 'DrawOval', 'DrawPICT', 'DrawPoly', 'DrawRect', 'DrawRRect', + 'DrawText', 'DrawUserShape', 'DSPDetrend', 'DSPPeriodogram', 'Duplicate', + 'DuplicateDataFolder', 'DWT', 'EdgeStats', 'Edit', 'ErrorBars', + 'EstimatePeakSizes', 'Execute', 'ExecuteScriptText', 'ExperimentInfo', + 'ExperimentModified', 'ExportGizmo', 'Extract', 'FastGaussTransform', 'FastOp', + 'FBinRead', 'FBinWrite', 'FFT', 'FGetPos', 'FIFOStatus', 'FIFO2Wave', 'FilterFIR', + 'FilterIIR', 'FindAPeak', 'FindContour', 'FindDuplicates', 'FindLevel', + 'FindLevels', 'FindPeak', 'FindPointsInPoly', 'FindRoots', 'FindSequence', + 'FindValue', 'FMaxFlat', 'FPClustering', 'fprintf', 'FReadLine', 'FSetPos', + 'FStatus', 'FTPCreateDirectory', 'FTPDelete', 'FTPDownload', 'FTPUpload', + 'FuncFit', 'FuncFitMD', 'GBLoadWave', 'GetAxis', 'GetCamera', 'GetFileFolderInfo', + 'GetGizmo', 'GetLastUserMenuInfo', 'GetMarquee', 'GetMouse', 'GetSelection', + 'GetWindow', 'GISCreateVectorLayer', 'GISGetRasterInfo', + 'GISGetRegisteredFileInfo', 'GISGetVectorLayerInfo', 'GISLoadRasterData', + 'GISLoadVectorData', 'GISRasterizeVectorData', 'GISRegisterFile', + 'GISTransformCoords', 'GISUnRegisterFile', 'GISWriteFieldData', + 'GISWriteGeometryData', 'GISWriteRaster', 'GPIBReadBinaryWave2', + 'GPIBReadBinary2', 'GPIBReadWave2', 'GPIBRead2', 'GPIBWriteBinaryWave2', + 'GPIBWriteBinary2', 'GPIBWriteWave2', 'GPIBWrite2', 'GPIB2', 'GraphNormal', + 'GraphWaveDraw', 'GraphWaveEdit', 'Grep', 'GroupBox', 'Hanning', 'HDFInfo', + 'HDFReadImage', 'HDFReadSDS', 'HDFReadVset', 'HDF5CloseFile', 'HDF5CloseGroup', + 'HDF5ConvertColors', 'HDF5CreateFile', 'HDF5CreateGroup', 'HDF5CreateLink', + 'HDF5Dump', 'HDF5DumpErrors', 'HDF5DumpState', 'HDF5FlushFile', + 'HDF5ListAttributes', 'HDF5ListGroup', 'HDF5LoadData', 'HDF5LoadGroup', + 'HDF5LoadImage', 'HDF5OpenFile', 'HDF5OpenGroup', 'HDF5SaveData', 'HDF5SaveGroup', + 'HDF5SaveImage', 'HDF5TestOperation', 'HDF5UnlinkObject', 'HideIgorMenus', + 'HideInfo', 'HideProcedures', 'HideTools', 'HilbertTransform', 'Histogram', 'ICA', + 'IFFT', 'ImageAnalyzeParticles', 'ImageBlend', 'ImageBoundaryToMask', + 'ImageComposite', 'ImageEdgeDetection', 'ImageFileInfo', 'ImageFilter', + 'ImageFocus', 'ImageFromXYZ', 'ImageGenerateROIMask', 'ImageGLCM', + 'ImageHistModification', 'ImageHistogram', 'ImageInterpolate', 'ImageLineProfile', + 'ImageLoad', 'ImageMorphology', 'ImageRegistration', 'ImageRemoveBackground', + 'ImageRestore', 'ImageRotate', 'ImageSave', 'ImageSeedFill', 'ImageSkeleton3d', + 'ImageSnake', 'ImageStats', 'ImageThreshold', 'ImageTransform', + 'ImageUnwrapPhase', 'ImageWindow', 'IndexSort', 'InsertPoints', 'Integrate', + 'IntegrateODE', 'Integrate2D', 'Interpolate2', 'Interpolate3D', 'Interp3DPath', + 'ITCCloseAll2', 'ITCCloseDevice2', 'ITCConfigAllChannels2', + 'ITCConfigChannelReset2', 'ITCConfigChannelUpload2', 'ITCConfigChannel2', + 'ITCFIFOAvailableAll2', 'ITCFIFOAvailable2', 'ITCGetAllChannelsConfig2', + 'ITCGetChannelConfig2', 'ITCGetCurrentDevice2', 'ITCGetDeviceInfo2', + 'ITCGetDevices2', 'ITCGetErrorString2', 'ITCGetSerialNumber2', 'ITCGetState2', + 'ITCGetVersions2', 'ITCInitialize2', 'ITCOpenDevice2', 'ITCReadADC2', + 'ITCReadDigital2', 'ITCReadTimer2', 'ITCSelectDevice2', 'ITCSetDAC2', + 'ITCSetGlobals2', 'ITCSetModes2', 'ITCSetState2', 'ITCStartAcq2', 'ITCStopAcq2', + 'ITCUpdateFIFOPositionAll2', 'ITCUpdateFIFOPosition2', 'ITCWriteDigital2', + 'JCAMPLoadWave', 'JointHistogram', 'KillBackground', 'KillControl', + 'KillDataFolder', 'KillFIFO', 'KillFreeAxis', 'KillPath', 'KillPICTs', + 'KillStrings', 'KillVariables', 'KillWaves', 'KillWindow', 'KMeans', 'Label', + 'Layout', 'LayoutPageAction', 'LayoutSlideShow', 'Legend', + 'LinearFeedbackShiftRegister', 'ListBox', 'LoadData', 'LoadPackagePreferences', + 'LoadPICT', 'LoadWave', 'Loess', 'LombPeriodogram', 'Make', 'MakeIndex', + 'MarkPerfTestTime', 'MatrixConvolve', 'MatrixCorr', 'MatrixEigenV', + 'MatrixFilter', 'MatrixGaussJ', 'MatrixGLM', 'MatrixInverse', 'MatrixLinearSolve', + 'MatrixLinearSolveTD', 'MatrixLLS', 'MatrixLUBkSub', 'MatrixLUD', 'MatrixLUDTD', + 'MatrixMultiply', 'MatrixOP', 'MatrixSchur', 'MatrixSolve', 'MatrixSVBkSub', + 'MatrixSVD', 'MatrixTranspose', 'MCC_FindServers', 'MeasureStyledText', + 'MFR_CheckForNewBricklets', + 'MFR_CloseResultFile', 'MFR_CreateOverviewTable', 'MFR_GetBrickletCount', + 'MFR_GetBrickletData', 'MFR_GetBrickletDeployData', 'MFR_GetBrickletMetaData', + 'MFR_GetBrickletRawData', 'MFR_GetReportTemplate', 'MFR_GetResultFileMetaData', + 'MFR_GetResultFileName', 'MFR_GetVernissageVersion', 'MFR_GetVersion', + 'MFR_GetXOPErrorMessage', 'MFR_OpenResultFile', + 'MLLoadWave', 'Modify', 'ModifyBoxPlot', 'ModifyBrowser', 'ModifyCamera', + 'ModifyContour', 'ModifyControl', 'ModifyControlList', 'ModifyFreeAxis', + 'ModifyGizmo', 'ModifyGraph', 'ModifyImage', 'ModifyLayout', 'ModifyPanel', + 'ModifyTable', 'ModifyViolinPlot', 'ModifyWaterfall', 'MoveDataFolder', 'MoveFile', 'MoveFolder', 'MoveString', 'MoveSubwindow', 'MoveVariable', - 'MoveWave', 'MoveWindow', 'MultiTaperPSD', 'MultiThreadingControl', - 'NC_CloseFile', 'NC_DumpErrors', 'NC_Inquire', 'NC_ListAttributes', - 'NC_ListObjects', 'NC_LoadData', 'NC_OpenFile', 'NeuralNetworkRun', - 'NeuralNetworkTrain', 'NewCamera', 'NewDataFolder', 'NewFIFO', 'NewFIFOChan', - 'NewFreeAxis', 'NewGizmo', 'NewImage', 'NewLayout', 'NewMovie', 'NewNotebook', - 'NewPanel', 'NewPath', 'NewWaterfall', 'NILoadWave', 'NI4882', 'Note', 'Notebook', - 'NotebookAction', 'Open', 'OpenHelp', 'OpenNotebook', 'Optimize', - 'ParseOperationTemplate', 'PathInfo', 'PauseForUser', 'PauseUpdate', 'PCA', - 'PlayMovie', 'PlayMovieAction', 'PlaySound', 'PopupContextualMenu', 'PopupMenu', - 'Preferences', 'PrimeFactors', 'Print', 'printf', 'PrintGraphs', 'PrintLayout', - 'PrintNotebook', 'PrintSettings', 'PrintTable', 'Project', 'PulseStats', - 'PutScrapText', 'pwd', 'Quit', 'RatioFromNumber', 'Redimension', 'Remez', - 'Remove', 'RemoveContour', 'RemoveFromGizmo', 'RemoveFromGraph', - 'RemoveFromLayout', 'RemoveFromTable', 'RemoveImage', 'RemoveLayoutObjects', - 'RemovePath', 'Rename', 'RenameDataFolder', 'RenamePath', 'RenamePICT', - 'RenameWindow', 'ReorderImages', 'ReorderTraces', 'ReplaceText', 'ReplaceWave', - 'Resample', 'ResumeUpdate', 'Reverse', 'Rotate', 'Save', 'SaveData', - 'SaveExperiment', 'SaveGizmoCopy', 'SaveGraphCopy', 'SaveNotebook', - 'SavePackagePreferences', 'SavePICT', 'SaveTableCopy', 'SetActiveSubwindow', - 'SetAxis', 'SetBackground', 'SetDashPattern', 'SetDataFolder', 'SetDimLabel', - 'SetDrawEnv', 'SetDrawLayer', 'SetFileFolderInfo', 'SetFormula', 'SetIdlePeriod', - 'SetIgorHook', 'SetIgorMenuMode', 'SetIgorOption', 'SetMarquee', - 'SetProcessSleep', 'SetRandomSeed', 'SetScale', 'SetVariable', 'SetWaveLock', - 'SetWaveTextEncoding', 'SetWindow', 'ShowIgorMenus', 'ShowInfo', 'ShowTools', - 'Silent', 'Sleep', 'Slider', 'Smooth', 'SmoothCustom', 'Sort', 'SortColumns', - 'SoundInRecord', 'SoundInSet', 'SoundInStartChart', 'SoundInStatus', - 'SoundInStopChart', 'SoundLoadWave', 'SoundSaveWave', 'SphericalInterpolate', - 'SphericalTriangulate', 'SplitString', 'SplitWave', 'sprintf', 'SQLHighLevelOp', - 'sscanf', 'Stack', 'StackWindows', 'StatsAngularDistanceTest', 'StatsANOVA1Test', - 'StatsANOVA2NRTest', 'StatsANOVA2RMTest', 'StatsANOVA2Test', 'StatsChiTest', - 'StatsCircularCorrelationTest', 'StatsCircularMeans', 'StatsCircularMoments', - 'StatsCircularTwoSampleTest', 'StatsCochranTest', 'StatsContingencyTable', - 'StatsDIPTest', 'StatsDunnettTest', 'StatsFriedmanTest', 'StatsFTest', - 'StatsHodgesAjneTest', 'StatsJBTest', 'StatsKDE', 'StatsKendallTauTest', + 'MoveWave', 'MoveWindow', 'MultiTaperPSD', 'MultiThreadingControl', + 'NC_CloseFile', 'NC_DumpErrors', 'NC_Inquire', 'NC_ListAttributes', + 'NC_ListObjects', 'NC_LoadData', 'NC_OpenFile', 'NeuralNetworkRun', + 'NeuralNetworkTrain', 'NewCamera', 'NewDataFolder', 'NewFIFO', 'NewFIFOChan', + 'NewFreeAxis', 'NewGizmo', 'NewImage', 'NewLayout', 'NewMovie', 'NewNotebook', + 'NewPanel', 'NewPath', 'NewWaterfall', 'NILoadWave', 'NI4882', 'Note', 'Notebook', + 'NotebookAction', 'Open', 'OpenHelp', 'OpenNotebook', 'Optimize', + 'ParseOperationTemplate', 'PathInfo', 'PauseForUser', 'PauseUpdate', 'PCA', + 'PlayMovie', 'PlayMovieAction', 'PlaySound', 'PopupContextualMenu', 'PopupMenu', + 'Preferences', 'PrimeFactors', 'Print', 'printf', 'PrintGraphs', 'PrintLayout', + 'PrintNotebook', 'PrintSettings', 'PrintTable', 'Project', 'PulseStats', + 'PutScrapText', 'pwd', 'Quit', 'RatioFromNumber', 'Redimension', 'Remez', + 'Remove', 'RemoveContour', 'RemoveFromGizmo', 'RemoveFromGraph', + 'RemoveFromLayout', 'RemoveFromTable', 'RemoveImage', 'RemoveLayoutObjects', + 'RemovePath', 'Rename', 'RenameDataFolder', 'RenamePath', 'RenamePICT', + 'RenameWindow', 'ReorderImages', 'ReorderTraces', 'ReplaceText', 'ReplaceWave', + 'Resample', 'ResumeUpdate', 'Reverse', 'Rotate', 'Save', 'SaveData', + 'SaveExperiment', 'SaveGizmoCopy', 'SaveGraphCopy', 'SaveNotebook', + 'SavePackagePreferences', 'SavePICT', 'SaveTableCopy', 'SetActiveSubwindow', + 'SetAxis', 'SetBackground', 'SetDashPattern', 'SetDataFolder', 'SetDimLabel', + 'SetDrawEnv', 'SetDrawLayer', 'SetFileFolderInfo', 'SetFormula', 'SetIdlePeriod', + 'SetIgorHook', 'SetIgorMenuMode', 'SetIgorOption', 'SetMarquee', + 'SetProcessSleep', 'SetRandomSeed', 'SetScale', 'SetVariable', 'SetWaveLock', + 'SetWaveTextEncoding', 'SetWindow', 'ShowIgorMenus', 'ShowInfo', 'ShowTools', + 'Silent', 'Sleep', 'Slider', 'Smooth', 'SmoothCustom', 'Sort', 'SortColumns', + 'SoundInRecord', 'SoundInSet', 'SoundInStartChart', 'SoundInStatus', + 'SoundInStopChart', 'SoundLoadWave', 'SoundSaveWave', 'SphericalInterpolate', + 'SphericalTriangulate', 'SplitString', 'SplitWave', 'sprintf', 'SQLHighLevelOp', + 'sscanf', 'Stack', 'StackWindows', 'StatsAngularDistanceTest', 'StatsANOVA1Test', + 'StatsANOVA2NRTest', 'StatsANOVA2RMTest', 'StatsANOVA2Test', 'StatsChiTest', + 'StatsCircularCorrelationTest', 'StatsCircularMeans', 'StatsCircularMoments', + 'StatsCircularTwoSampleTest', 'StatsCochranTest', 'StatsContingencyTable', + 'StatsDIPTest', 'StatsDunnettTest', 'StatsFriedmanTest', 'StatsFTest', + 'StatsHodgesAjneTest', 'StatsJBTest', 'StatsKDE', 'StatsKendallTauTest', 'StatsKSTest', 'StatsKWTest', 'StatsLinearCorrelationTest', - 'StatsLinearRegression', 'StatsMultiCorrelationTest', 'StatsNPMCTest', - 'StatsNPNominalSRTest', 'StatsQuantiles', 'StatsRankCorrelationTest', - 'StatsResample', 'StatsSample', 'StatsScheffeTest', 'StatsShapiroWilkTest', - 'StatsSignTest', 'StatsSRTest', 'StatsTTest', 'StatsTukeyTest', - 'StatsVariancesTest', 'StatsWatsonUSquaredTest', 'StatsWatsonWilliamsTest', - 'StatsWheelerWatsonTest', 'StatsWilcoxonRankTest', 'StatsWRCorrelationTest', - 'STFT', 'String', 'StructFill', 'StructGet', 'StructPut', 'SumDimension', - 'SumSeries', 'TabControl', 'Tag', 'TDMLoadData', 'TDMSaveData', 'TextBox', - 'ThreadGroupPutDF', 'ThreadStart', 'TickWavesFromAxis', 'Tile', 'TileWindows', - 'TitleBox', 'ToCommandLine', 'ToolsGrid', 'Triangulate3d', 'Unwrap', 'URLRequest', - 'ValDisplay', 'Variable', 'VDTClosePort2', 'VDTGetPortList2', 'VDTGetStatus2', - 'VDTOpenPort2', 'VDTOperationsPort2', 'VDTReadBinaryWave2', 'VDTReadBinary2', - 'VDTReadHexWave2', 'VDTReadHex2', 'VDTReadWave2', 'VDTRead2', 'VDTTerminalPort2', - 'VDTWriteBinaryWave2', 'VDTWriteBinary2', 'VDTWriteHexWave2', 'VDTWriteHex2', - 'VDTWriteWave2', 'VDTWrite2', 'VDT2', 'VISAControl', 'VISARead', 'VISAReadBinary', - 'VISAReadBinaryWave', 'VISAReadWave', 'VISAWrite', 'VISAWriteBinary', - 'VISAWriteBinaryWave', 'VISAWriteWave', 'WaveMeanStdv', 'WaveStats', - 'WaveTransform', 'wfprintf', 'WignerTransform', 'WindowFunction', 'XLLoadWave' + 'StatsLinearRegression', 'StatsMultiCorrelationTest', 'StatsNPMCTest', + 'StatsNPNominalSRTest', 'StatsQuantiles', 'StatsRankCorrelationTest', + 'StatsResample', 'StatsSample', 'StatsScheffeTest', 'StatsShapiroWilkTest', + 'StatsSignTest', 'StatsSRTest', 'StatsTTest', 'StatsTukeyTest', + 'StatsVariancesTest', 'StatsWatsonUSquaredTest', 'StatsWatsonWilliamsTest', + 'StatsWheelerWatsonTest', 'StatsWilcoxonRankTest', 'StatsWRCorrelationTest', + 'STFT', 'String', 'StructFill', 'StructGet', 'StructPut', 'SumDimension', + 'SumSeries', 'TabControl', 'Tag', 'TDMLoadData', 'TDMSaveData', 'TextBox', + 'ThreadGroupPutDF', 'ThreadStart', 'TickWavesFromAxis', 'Tile', 'TileWindows', + 'TitleBox', 'ToCommandLine', 'ToolsGrid', 'Triangulate3d', 'Unwrap', 'URLRequest', + 'ValDisplay', 'Variable', 'VDTClosePort2', 'VDTGetPortList2', 'VDTGetStatus2', + 'VDTOpenPort2', 'VDTOperationsPort2', 'VDTReadBinaryWave2', 'VDTReadBinary2', + 'VDTReadHexWave2', 'VDTReadHex2', 'VDTReadWave2', 'VDTRead2', 'VDTTerminalPort2', + 'VDTWriteBinaryWave2', 'VDTWriteBinary2', 'VDTWriteHexWave2', 'VDTWriteHex2', + 'VDTWriteWave2', 'VDTWrite2', 'VDT2', 'VISAControl', 'VISARead', 'VISAReadBinary', + 'VISAReadBinaryWave', 'VISAReadWave', 'VISAWrite', 'VISAWriteBinary', + 'VISAWriteBinaryWave', 'VISAWriteWave', 'WaveMeanStdv', 'WaveStats', + 'WaveTransform', 'wfprintf', 'WignerTransform', 'WindowFunction', 'XLLoadWave' ) functions = ( - 'abs', 'acos', 'acosh', 'AddListItem', 'AiryA', 'AiryAD', 'AiryB', 'AiryBD', - 'alog', 'AnnotationInfo', 'AnnotationList', 'area', 'areaXY', 'asin', 'asinh', - 'atan', 'atanh', 'atan2', 'AxisInfo', 'AxisList', 'AxisValFromPixel', - 'AxonTelegraphAGetDataNum', 'AxonTelegraphAGetDataString', - 'AxonTelegraphAGetDataStruct', 'AxonTelegraphGetDataNum', - 'AxonTelegraphGetDataString', 'AxonTelegraphGetDataStruct', - 'AxonTelegraphGetTimeoutMs', 'AxonTelegraphSetTimeoutMs', 'Base64Decode', - 'Base64Encode', 'Besseli', 'Besselj', 'Besselk', 'Bessely', 'beta', 'betai', - 'BinarySearch', 'BinarySearchInterp', 'binomial', 'binomialln', 'binomialNoise', - 'cabs', 'CaptureHistory', 'CaptureHistoryStart', 'ceil', 'cequal', 'char2num', - 'chebyshev', 'chebyshevU', 'CheckName', 'ChildWindowList', 'CleanupName', 'cmplx', - 'cmpstr', 'conj', 'ContourInfo', 'ContourNameList', 'ContourNameToWaveRef', - 'ContourZ', 'ControlNameList', 'ConvertTextEncoding', 'cos', 'cosh', - 'cosIntegral', 'cot', 'coth', 'CountObjects', 'CountObjectsDFR', 'cpowi', - 'CreationDate', 'csc', 'csch', 'CsrInfo', 'CsrWave', 'CsrWaveRef', 'CsrXWave', - 'CsrXWaveRef', 'CTabList', 'DataFolderDir', 'DataFolderExists', - 'DataFolderRefsEqual', 'DataFolderRefStatus', 'date', 'datetime', 'DateToJulian', - 'date2secs', 'Dawson', 'defined', 'deltax', 'digamma', 'dilogarithm', 'DimDelta', - 'DimOffset', 'DimSize', 'ei', 'enoise', 'equalWaves', 'erf', 'erfc', 'erfcw', - 'exists', 'exp', 'expInt', 'expIntegralE1', 'expNoise', 'factorial', 'Faddeeva', - 'fakedata', 'faverage', 'faverageXY', 'fDAQmx_AI_GetReader', - 'fDAQmx_AO_UpdateOutputs', 'fDAQmx_ConnectTerminals', 'fDAQmx_CTR_Finished', - 'fDAQmx_CTR_IsFinished', 'fDAQmx_CTR_IsPulseFinished', 'fDAQmx_CTR_ReadCounter', - 'fDAQmx_CTR_ReadWithOptions', 'fDAQmx_CTR_SetPulseFrequency', 'fDAQmx_CTR_Start', - 'fDAQmx_DeviceNames', 'fDAQmx_DIO_Finished', 'fDAQmx_DIO_PortWidth', - 'fDAQmx_DIO_Read', 'fDAQmx_DIO_Write', 'fDAQmx_DisconnectTerminals', - 'fDAQmx_ErrorString', 'fDAQmx_ExternalCalDate', 'fDAQmx_NumAnalogInputs', - 'fDAQmx_NumAnalogOutputs', 'fDAQmx_NumCounters', 'fDAQmx_NumDIOPorts', - 'fDAQmx_ReadChan', 'fDAQmx_ReadNamedChan', 'fDAQmx_ResetDevice', - 'fDAQmx_ScanGetAvailable', 'fDAQmx_ScanGetNextIndex', 'fDAQmx_ScanStart', - 'fDAQmx_ScanStop', 'fDAQmx_ScanWait', 'fDAQmx_ScanWaitWithTimeout', - 'fDAQmx_SelfCalDate', 'fDAQmx_SelfCalibration', 'fDAQmx_WaveformStart', - 'fDAQmx_WaveformStop', 'fDAQmx_WF_IsFinished', 'fDAQmx_WF_WaitUntilFinished', - 'fDAQmx_WriteChan', 'FetchURL', 'FindDimLabel', 'FindListItem', 'floor', - 'FontList', 'FontSizeHeight', 'FontSizeStringWidth', 'FresnelCos', 'FresnelSin', - 'FuncRefInfo', 'FunctionInfo', 'FunctionList', 'FunctionPath', 'gamma', - 'gammaEuler', 'gammaInc', 'gammaNoise', 'gammln', 'gammp', 'gammq', 'Gauss', - 'Gauss1D', 'Gauss2D', 'gcd', 'GetBrowserLine', 'GetBrowserSelection', - 'GetDataFolder', 'GetDataFolderDFR', 'GetDefaultFont', 'GetDefaultFontSize', - 'GetDefaultFontStyle', 'GetDimLabel', 'GetEnvironmentVariable', 'GetErrMessage', - 'GetFormula', 'GetIndependentModuleName', 'GetIndexedObjName', - 'GetIndexedObjNameDFR', 'GetKeyState', 'GetRTErrMessage', 'GetRTError', - 'GetRTLocation', 'GetRTLocInfo', 'GetRTStackInfo', 'GetScrapText', 'GetUserData', - 'GetWavesDataFolder', 'GetWavesDataFolderDFR', 'GISGetAllFileFormats', - 'GISSRefsAreEqual', 'GizmoInfo', 'GizmoScale', 'gnoise', 'GrepList', 'GrepString', - 'GuideInfo', 'GuideNameList', 'Hash', 'hcsr', 'HDF5AttributeInfo', - 'HDF5DatasetInfo', 'HDF5LibraryInfo', 'HDF5TypeInfo', 'hermite', 'hermiteGauss', - 'HyperGNoise', 'HyperGPFQ', 'HyperG0F1', 'HyperG1F1', 'HyperG2F1', 'IgorInfo', - 'IgorVersion', 'imag', 'ImageInfo', 'ImageNameList', 'ImageNameToWaveRef', - 'IndependentModuleList', 'IndexedDir', 'IndexedFile', 'IndexToScale', 'Inf', - 'Integrate1D', 'interp', 'Interp2D', 'Interp3D', 'inverseERF', 'inverseERFC', - 'ItemsInList', 'JacobiCn', 'JacobiSn', 'JulianToDate', 'Laguerre', 'LaguerreA', - 'LaguerreGauss', 'LambertW', 'LayoutInfo', 'leftx', 'LegendreA', 'limit', - 'ListMatch', 'ListToTextWave', 'ListToWaveRefWave', 'ln', 'log', 'logNormalNoise', - 'lorentzianNoise', 'LowerStr', 'MacroList', 'magsqr', 'MandelbrotPoint', - 'MarcumQ', 'MatrixCondition', 'MatrixDet', 'MatrixDot', 'MatrixRank', - 'MatrixTrace', 'max', 'MCC_AutoBridgeBal', 'MCC_AutoFastComp', - 'MCC_AutoPipetteOffset', 'MCC_AutoSlowComp', 'MCC_AutoWholeCellComp', - 'MCC_GetBridgeBalEnable', 'MCC_GetBridgeBalResist', 'MCC_GetFastCompCap', - 'MCC_GetFastCompTau', 'MCC_GetHolding', 'MCC_GetHoldingEnable', 'MCC_GetMode', - 'MCC_GetNeutralizationCap', 'MCC_GetNeutralizationEnable', - 'MCC_GetOscKillerEnable', 'MCC_GetPipetteOffset', 'MCC_GetPrimarySignalGain', - 'MCC_GetPrimarySignalHPF', 'MCC_GetPrimarySignalLPF', 'MCC_GetRsCompBandwidth', - 'MCC_GetRsCompCorrection', 'MCC_GetRsCompEnable', 'MCC_GetRsCompPrediction', - 'MCC_GetSecondarySignalGain', 'MCC_GetSecondarySignalLPF', 'MCC_GetSlowCompCap', - 'MCC_GetSlowCompTau', 'MCC_GetSlowCompTauX20Enable', - 'MCC_GetSlowCurrentInjEnable', 'MCC_GetSlowCurrentInjLevel', - 'MCC_GetSlowCurrentInjSetlTime', 'MCC_GetWholeCellCompCap', - 'MCC_GetWholeCellCompEnable', 'MCC_GetWholeCellCompResist', - 'MCC_SelectMultiClamp700B', 'MCC_SetBridgeBalEnable', 'MCC_SetBridgeBalResist', - 'MCC_SetFastCompCap', 'MCC_SetFastCompTau', 'MCC_SetHolding', - 'MCC_SetHoldingEnable', 'MCC_SetMode', 'MCC_SetNeutralizationCap', - 'MCC_SetNeutralizationEnable', 'MCC_SetOscKillerEnable', 'MCC_SetPipetteOffset', - 'MCC_SetPrimarySignalGain', 'MCC_SetPrimarySignalHPF', 'MCC_SetPrimarySignalLPF', - 'MCC_SetRsCompBandwidth', 'MCC_SetRsCompCorrection', 'MCC_SetRsCompEnable', - 'MCC_SetRsCompPrediction', 'MCC_SetSecondarySignalGain', - 'MCC_SetSecondarySignalLPF', 'MCC_SetSlowCompCap', 'MCC_SetSlowCompTau', - 'MCC_SetSlowCompTauX20Enable', 'MCC_SetSlowCurrentInjEnable', - 'MCC_SetSlowCurrentInjLevel', 'MCC_SetSlowCurrentInjSetlTime', 'MCC_SetTimeoutMs', - 'MCC_SetWholeCellCompCap', 'MCC_SetWholeCellCompEnable', - 'MCC_SetWholeCellCompResist', 'mean', 'median', 'min', 'mod', 'ModDate', - 'MPFXEMGPeak', 'MPFXExpConvExpPeak', 'MPFXGaussPeak', 'MPFXLorenzianPeak', - 'MPFXVoigtPeak', 'NameOfWave', 'NaN', 'NewFreeDataFolder', 'NewFreeWave', 'norm', - 'NormalizeUnicode', 'note', 'NumberByKey', 'numpnts', 'numtype', - 'NumVarOrDefault', 'num2char', 'num2istr', 'num2str', 'NVAR_Exists', - 'OperationList', 'PadString', 'PanelResolution', 'ParamIsDefault', - 'ParseFilePath', 'PathList', 'pcsr', 'Pi', 'PICTInfo', 'PICTList', - 'PixelFromAxisVal', 'pnt2x', 'poissonNoise', 'poly', 'PolygonArea', 'poly2D', - 'PossiblyQuoteName', 'ProcedureText', 'p2rect', 'qcsr', 'real', 'RemoveByKey', - 'RemoveEnding', 'RemoveFromList', 'RemoveListItem', 'ReplaceNumberByKey', - 'ReplaceString', 'ReplaceStringByKey', 'rightx', 'round', 'r2polar', 'sawtooth', - 'scaleToIndex', 'ScreenResolution', 'sec', 'sech', 'Secs2Date', 'Secs2Time', - 'SelectNumber', 'SelectString', 'SetEnvironmentVariable', 'sign', 'sin', 'sinc', - 'sinh', 'sinIntegral', 'SortList', 'SpecialCharacterInfo', 'SpecialCharacterList', - 'SpecialDirPath', 'SphericalBessJ', 'SphericalBessJD', 'SphericalBessY', - 'SphericalBessYD', 'SphericalHarmonics', 'SQLAllocHandle', 'SQLAllocStmt', - 'SQLBinaryWavesToTextWave', 'SQLBindCol', 'SQLBindParameter', 'SQLBrowseConnect', - 'SQLBulkOperations', 'SQLCancel', 'SQLCloseCursor', 'SQLColAttributeNum', - 'SQLColAttributeStr', 'SQLColumnPrivileges', 'SQLColumns', 'SQLConnect', - 'SQLDataSources', 'SQLDescribeCol', 'SQLDescribeParam', 'SQLDisconnect', - 'SQLDriverConnect', 'SQLDrivers', 'SQLEndTran', 'SQLError', 'SQLExecDirect', - 'SQLExecute', 'SQLFetch', 'SQLFetchScroll', 'SQLForeignKeys', 'SQLFreeConnect', - 'SQLFreeEnv', 'SQLFreeHandle', 'SQLFreeStmt', 'SQLGetConnectAttrNum', - 'SQLGetConnectAttrStr', 'SQLGetCursorName', 'SQLGetDataNum', 'SQLGetDataStr', - 'SQLGetDescFieldNum', 'SQLGetDescFieldStr', 'SQLGetDescRec', 'SQLGetDiagFieldNum', - 'SQLGetDiagFieldStr', 'SQLGetDiagRec', 'SQLGetEnvAttrNum', 'SQLGetEnvAttrStr', - 'SQLGetFunctions', 'SQLGetInfoNum', 'SQLGetInfoStr', 'SQLGetStmtAttrNum', - 'SQLGetStmtAttrStr', 'SQLGetTypeInfo', 'SQLMoreResults', 'SQLNativeSql', - 'SQLNumParams', 'SQLNumResultCols', 'SQLNumResultRowsIfKnown', - 'SQLNumRowsFetched', 'SQLParamData', 'SQLPrepare', 'SQLPrimaryKeys', - 'SQLProcedureColumns', 'SQLProcedures', 'SQLPutData', 'SQLReinitialize', - 'SQLRowCount', 'SQLSetConnectAttrNum', 'SQLSetConnectAttrStr', 'SQLSetCursorName', - 'SQLSetDescFieldNum', 'SQLSetDescFieldStr', 'SQLSetDescRec', 'SQLSetEnvAttrNum', - 'SQLSetEnvAttrStr', 'SQLSetPos', 'SQLSetStmtAttrNum', 'SQLSetStmtAttrStr', - 'SQLSpecialColumns', 'SQLStatistics', 'SQLTablePrivileges', 'SQLTables', - 'SQLTextWaveToBinaryWaves', 'SQLTextWaveTo2DBinaryWave', 'SQLUpdateBoundValues', - 'SQLXOPCheckState', 'SQL2DBinaryWaveToTextWave', 'sqrt', 'StartMSTimer', - 'StatsBetaCDF', 'StatsBetaPDF', 'StatsBinomialCDF', 'StatsBinomialPDF', - 'StatsCauchyCDF', 'StatsCauchyPDF', 'StatsChiCDF', 'StatsChiPDF', 'StatsCMSSDCDF', - 'StatsCorrelation', 'StatsDExpCDF', 'StatsDExpPDF', 'StatsErlangCDF', - 'StatsErlangPDF', 'StatsErrorPDF', 'StatsEValueCDF', 'StatsEValuePDF', - 'StatsExpCDF', 'StatsExpPDF', 'StatsFCDF', 'StatsFPDF', 'StatsFriedmanCDF', - 'StatsGammaCDF', 'StatsGammaPDF', 'StatsGeometricCDF', 'StatsGeometricPDF', - 'StatsGEVCDF', 'StatsGEVPDF', 'StatsHyperGCDF', 'StatsHyperGPDF', - 'StatsInvBetaCDF', 'StatsInvBinomialCDF', 'StatsInvCauchyCDF', 'StatsInvChiCDF', - 'StatsInvCMSSDCDF', 'StatsInvDExpCDF', 'StatsInvEValueCDF', 'StatsInvExpCDF', - 'StatsInvFCDF', 'StatsInvFriedmanCDF', 'StatsInvGammaCDF', 'StatsInvGeometricCDF', - 'StatsInvKuiperCDF', 'StatsInvLogisticCDF', 'StatsInvLogNormalCDF', - 'StatsInvMaxwellCDF', 'StatsInvMooreCDF', 'StatsInvNBinomialCDF', - 'StatsInvNCChiCDF', 'StatsInvNCFCDF', 'StatsInvNormalCDF', 'StatsInvParetoCDF', - 'StatsInvPoissonCDF', 'StatsInvPowerCDF', 'StatsInvQCDF', 'StatsInvQpCDF', + 'abs', 'acos', 'acosh', 'AddListItem', 'AiryA', 'AiryAD', 'AiryB', 'AiryBD', + 'alog', 'AnnotationInfo', 'AnnotationList', 'area', 'areaXY', 'asin', 'asinh', + 'atan', 'atanh', 'atan2', 'AxisInfo', 'AxisList', 'AxisValFromPixel', + 'AxonTelegraphAGetDataNum', 'AxonTelegraphAGetDataString', + 'AxonTelegraphAGetDataStruct', 'AxonTelegraphGetDataNum', + 'AxonTelegraphGetDataString', 'AxonTelegraphGetDataStruct', + 'AxonTelegraphGetTimeoutMs', 'AxonTelegraphSetTimeoutMs', 'Base64Decode', + 'Base64Encode', 'Besseli', 'Besselj', 'Besselk', 'Bessely', 'beta', 'betai', + 'BinarySearch', 'BinarySearchInterp', 'binomial', 'binomialln', 'binomialNoise', + 'cabs', 'CaptureHistory', 'CaptureHistoryStart', 'ceil', 'cequal', 'char2num', + 'chebyshev', 'chebyshevU', 'CheckName', 'ChildWindowList', 'CleanupName', 'cmplx', + 'cmpstr', 'conj', 'ContourInfo', 'ContourNameList', 'ContourNameToWaveRef', + 'ContourZ', 'ControlNameList', 'ConvertTextEncoding', 'cos', 'cosh', + 'cosIntegral', 'cot', 'coth', 'CountObjects', 'CountObjectsDFR', 'cpowi', + 'CreationDate', 'csc', 'csch', 'CsrInfo', 'CsrWave', 'CsrWaveRef', 'CsrXWave', + 'CsrXWaveRef', 'CTabList', 'DataFolderDir', 'DataFolderExists', + 'DataFolderRefsEqual', 'DataFolderRefStatus', 'date', 'datetime', 'DateToJulian', + 'date2secs', 'Dawson', 'defined', 'deltax', 'digamma', 'dilogarithm', 'DimDelta', + 'DimOffset', 'DimSize', 'ei', 'enoise', 'equalWaves', 'erf', 'erfc', 'erfcw', + 'exists', 'exp', 'expInt', 'expIntegralE1', 'expNoise', 'factorial', 'Faddeeva', + 'fakedata', 'faverage', 'faverageXY', 'fDAQmx_AI_GetReader', + 'fDAQmx_AO_UpdateOutputs', 'fDAQmx_ConnectTerminals', 'fDAQmx_CTR_Finished', + 'fDAQmx_CTR_IsFinished', 'fDAQmx_CTR_IsPulseFinished', 'fDAQmx_CTR_ReadCounter', + 'fDAQmx_CTR_ReadWithOptions', 'fDAQmx_CTR_SetPulseFrequency', 'fDAQmx_CTR_Start', + 'fDAQmx_DeviceNames', 'fDAQmx_DIO_Finished', 'fDAQmx_DIO_PortWidth', + 'fDAQmx_DIO_Read', 'fDAQmx_DIO_Write', 'fDAQmx_DisconnectTerminals', + 'fDAQmx_ErrorString', 'fDAQmx_ExternalCalDate', 'fDAQmx_NumAnalogInputs', + 'fDAQmx_NumAnalogOutputs', 'fDAQmx_NumCounters', 'fDAQmx_NumDIOPorts', + 'fDAQmx_ReadChan', 'fDAQmx_ReadNamedChan', 'fDAQmx_ResetDevice', + 'fDAQmx_ScanGetAvailable', 'fDAQmx_ScanGetNextIndex', 'fDAQmx_ScanStart', + 'fDAQmx_ScanStop', 'fDAQmx_ScanWait', 'fDAQmx_ScanWaitWithTimeout', + 'fDAQmx_SelfCalDate', 'fDAQmx_SelfCalibration', 'fDAQmx_WaveformStart', + 'fDAQmx_WaveformStop', 'fDAQmx_WF_IsFinished', 'fDAQmx_WF_WaitUntilFinished', + 'fDAQmx_WriteChan', 'FetchURL', 'FindDimLabel', 'FindListItem', 'floor', + 'FontList', 'FontSizeHeight', 'FontSizeStringWidth', 'FresnelCos', 'FresnelSin', + 'FuncRefInfo', 'FunctionInfo', 'FunctionList', 'FunctionPath', 'gamma', + 'gammaEuler', 'gammaInc', 'gammaNoise', 'gammln', 'gammp', 'gammq', 'Gauss', + 'Gauss1D', 'Gauss2D', 'gcd', 'GetBrowserLine', 'GetBrowserSelection', + 'GetDataFolder', 'GetDataFolderDFR', 'GetDefaultFont', 'GetDefaultFontSize', + 'GetDefaultFontStyle', 'GetDimLabel', 'GetEnvironmentVariable', 'GetErrMessage', + 'GetFormula', 'GetIndependentModuleName', 'GetIndexedObjName', + 'GetIndexedObjNameDFR', 'GetKeyState', 'GetRTErrMessage', 'GetRTError', + 'GetRTLocation', 'GetRTLocInfo', 'GetRTStackInfo', 'GetScrapText', 'GetUserData', + 'GetWavesDataFolder', 'GetWavesDataFolderDFR', 'GISGetAllFileFormats', + 'GISSRefsAreEqual', 'GizmoInfo', 'GizmoScale', 'gnoise', 'GrepList', 'GrepString', + 'GuideInfo', 'GuideNameList', 'Hash', 'hcsr', 'HDF5AttributeInfo', + 'HDF5DatasetInfo', 'HDF5LibraryInfo', 'HDF5TypeInfo', 'hermite', 'hermiteGauss', + 'HyperGNoise', 'HyperGPFQ', 'HyperG0F1', 'HyperG1F1', 'HyperG2F1', 'IgorInfo', + 'IgorVersion', 'imag', 'ImageInfo', 'ImageNameList', 'ImageNameToWaveRef', + 'IndependentModuleList', 'IndexedDir', 'IndexedFile', 'IndexToScale', 'Inf', + 'Integrate1D', 'interp', 'Interp2D', 'Interp3D', 'inverseERF', 'inverseERFC', + 'ItemsInList', 'JacobiCn', 'JacobiSn', 'JulianToDate', 'Laguerre', 'LaguerreA', + 'LaguerreGauss', 'LambertW', 'LayoutInfo', 'leftx', 'LegendreA', 'limit', + 'ListMatch', 'ListToTextWave', 'ListToWaveRefWave', 'ln', 'log', 'logNormalNoise', + 'lorentzianNoise', 'LowerStr', 'MacroList', 'magsqr', 'MandelbrotPoint', + 'MarcumQ', 'MatrixCondition', 'MatrixDet', 'MatrixDot', 'MatrixRank', + 'MatrixTrace', 'max', 'MCC_AutoBridgeBal', 'MCC_AutoFastComp', + 'MCC_AutoPipetteOffset', 'MCC_AutoSlowComp', 'MCC_AutoWholeCellComp', + 'MCC_GetBridgeBalEnable', 'MCC_GetBridgeBalResist', 'MCC_GetFastCompCap', + 'MCC_GetFastCompTau', 'MCC_GetHolding', 'MCC_GetHoldingEnable', 'MCC_GetMode', + 'MCC_GetNeutralizationCap', 'MCC_GetNeutralizationEnable', + 'MCC_GetOscKillerEnable', 'MCC_GetPipetteOffset', 'MCC_GetPrimarySignalGain', + 'MCC_GetPrimarySignalHPF', 'MCC_GetPrimarySignalLPF', 'MCC_GetRsCompBandwidth', + 'MCC_GetRsCompCorrection', 'MCC_GetRsCompEnable', 'MCC_GetRsCompPrediction', + 'MCC_GetSecondarySignalGain', 'MCC_GetSecondarySignalLPF', 'MCC_GetSlowCompCap', + 'MCC_GetSlowCompTau', 'MCC_GetSlowCompTauX20Enable', + 'MCC_GetSlowCurrentInjEnable', 'MCC_GetSlowCurrentInjLevel', + 'MCC_GetSlowCurrentInjSetlTime', 'MCC_GetWholeCellCompCap', + 'MCC_GetWholeCellCompEnable', 'MCC_GetWholeCellCompResist', + 'MCC_SelectMultiClamp700B', 'MCC_SetBridgeBalEnable', 'MCC_SetBridgeBalResist', + 'MCC_SetFastCompCap', 'MCC_SetFastCompTau', 'MCC_SetHolding', + 'MCC_SetHoldingEnable', 'MCC_SetMode', 'MCC_SetNeutralizationCap', + 'MCC_SetNeutralizationEnable', 'MCC_SetOscKillerEnable', 'MCC_SetPipetteOffset', + 'MCC_SetPrimarySignalGain', 'MCC_SetPrimarySignalHPF', 'MCC_SetPrimarySignalLPF', + 'MCC_SetRsCompBandwidth', 'MCC_SetRsCompCorrection', 'MCC_SetRsCompEnable', + 'MCC_SetRsCompPrediction', 'MCC_SetSecondarySignalGain', + 'MCC_SetSecondarySignalLPF', 'MCC_SetSlowCompCap', 'MCC_SetSlowCompTau', + 'MCC_SetSlowCompTauX20Enable', 'MCC_SetSlowCurrentInjEnable', + 'MCC_SetSlowCurrentInjLevel', 'MCC_SetSlowCurrentInjSetlTime', 'MCC_SetTimeoutMs', + 'MCC_SetWholeCellCompCap', 'MCC_SetWholeCellCompEnable', + 'MCC_SetWholeCellCompResist', 'mean', 'median', 'min', 'mod', 'ModDate', + 'MPFXEMGPeak', 'MPFXExpConvExpPeak', 'MPFXGaussPeak', 'MPFXLorenzianPeak', + 'MPFXVoigtPeak', 'NameOfWave', 'NaN', 'NewFreeDataFolder', 'NewFreeWave', 'norm', + 'NormalizeUnicode', 'note', 'NumberByKey', 'numpnts', 'numtype', + 'NumVarOrDefault', 'num2char', 'num2istr', 'num2str', 'NVAR_Exists', + 'OperationList', 'PadString', 'PanelResolution', 'ParamIsDefault', + 'ParseFilePath', 'PathList', 'pcsr', 'Pi', 'PICTInfo', 'PICTList', + 'PixelFromAxisVal', 'pnt2x', 'poissonNoise', 'poly', 'PolygonArea', 'poly2D', + 'PossiblyQuoteName', 'ProcedureText', 'p2rect', 'qcsr', 'real', 'RemoveByKey', + 'RemoveEnding', 'RemoveFromList', 'RemoveListItem', 'ReplaceNumberByKey', + 'ReplaceString', 'ReplaceStringByKey', 'rightx', 'round', 'r2polar', 'sawtooth', + 'scaleToIndex', 'ScreenResolution', 'sec', 'sech', 'Secs2Date', 'Secs2Time', + 'SelectNumber', 'SelectString', 'SetEnvironmentVariable', 'sign', 'sin', 'sinc', + 'sinh', 'sinIntegral', 'SortList', 'SpecialCharacterInfo', 'SpecialCharacterList', + 'SpecialDirPath', 'SphericalBessJ', 'SphericalBessJD', 'SphericalBessY', + 'SphericalBessYD', 'SphericalHarmonics', 'SQLAllocHandle', 'SQLAllocStmt', + 'SQLBinaryWavesToTextWave', 'SQLBindCol', 'SQLBindParameter', 'SQLBrowseConnect', + 'SQLBulkOperations', 'SQLCancel', 'SQLCloseCursor', 'SQLColAttributeNum', + 'SQLColAttributeStr', 'SQLColumnPrivileges', 'SQLColumns', 'SQLConnect', + 'SQLDataSources', 'SQLDescribeCol', 'SQLDescribeParam', 'SQLDisconnect', + 'SQLDriverConnect', 'SQLDrivers', 'SQLEndTran', 'SQLError', 'SQLExecDirect', + 'SQLExecute', 'SQLFetch', 'SQLFetchScroll', 'SQLForeignKeys', 'SQLFreeConnect', + 'SQLFreeEnv', 'SQLFreeHandle', 'SQLFreeStmt', 'SQLGetConnectAttrNum', + 'SQLGetConnectAttrStr', 'SQLGetCursorName', 'SQLGetDataNum', 'SQLGetDataStr', + 'SQLGetDescFieldNum', 'SQLGetDescFieldStr', 'SQLGetDescRec', 'SQLGetDiagFieldNum', + 'SQLGetDiagFieldStr', 'SQLGetDiagRec', 'SQLGetEnvAttrNum', 'SQLGetEnvAttrStr', + 'SQLGetFunctions', 'SQLGetInfoNum', 'SQLGetInfoStr', 'SQLGetStmtAttrNum', + 'SQLGetStmtAttrStr', 'SQLGetTypeInfo', 'SQLMoreResults', 'SQLNativeSql', + 'SQLNumParams', 'SQLNumResultCols', 'SQLNumResultRowsIfKnown', + 'SQLNumRowsFetched', 'SQLParamData', 'SQLPrepare', 'SQLPrimaryKeys', + 'SQLProcedureColumns', 'SQLProcedures', 'SQLPutData', 'SQLReinitialize', + 'SQLRowCount', 'SQLSetConnectAttrNum', 'SQLSetConnectAttrStr', 'SQLSetCursorName', + 'SQLSetDescFieldNum', 'SQLSetDescFieldStr', 'SQLSetDescRec', 'SQLSetEnvAttrNum', + 'SQLSetEnvAttrStr', 'SQLSetPos', 'SQLSetStmtAttrNum', 'SQLSetStmtAttrStr', + 'SQLSpecialColumns', 'SQLStatistics', 'SQLTablePrivileges', 'SQLTables', + 'SQLTextWaveToBinaryWaves', 'SQLTextWaveTo2DBinaryWave', 'SQLUpdateBoundValues', + 'SQLXOPCheckState', 'SQL2DBinaryWaveToTextWave', 'sqrt', 'StartMSTimer', + 'StatsBetaCDF', 'StatsBetaPDF', 'StatsBinomialCDF', 'StatsBinomialPDF', + 'StatsCauchyCDF', 'StatsCauchyPDF', 'StatsChiCDF', 'StatsChiPDF', 'StatsCMSSDCDF', + 'StatsCorrelation', 'StatsDExpCDF', 'StatsDExpPDF', 'StatsErlangCDF', + 'StatsErlangPDF', 'StatsErrorPDF', 'StatsEValueCDF', 'StatsEValuePDF', + 'StatsExpCDF', 'StatsExpPDF', 'StatsFCDF', 'StatsFPDF', 'StatsFriedmanCDF', + 'StatsGammaCDF', 'StatsGammaPDF', 'StatsGeometricCDF', 'StatsGeometricPDF', + 'StatsGEVCDF', 'StatsGEVPDF', 'StatsHyperGCDF', 'StatsHyperGPDF', + 'StatsInvBetaCDF', 'StatsInvBinomialCDF', 'StatsInvCauchyCDF', 'StatsInvChiCDF', + 'StatsInvCMSSDCDF', 'StatsInvDExpCDF', 'StatsInvEValueCDF', 'StatsInvExpCDF', + 'StatsInvFCDF', 'StatsInvFriedmanCDF', 'StatsInvGammaCDF', 'StatsInvGeometricCDF', + 'StatsInvKuiperCDF', 'StatsInvLogisticCDF', 'StatsInvLogNormalCDF', + 'StatsInvMaxwellCDF', 'StatsInvMooreCDF', 'StatsInvNBinomialCDF', + 'StatsInvNCChiCDF', 'StatsInvNCFCDF', 'StatsInvNormalCDF', 'StatsInvParetoCDF', + 'StatsInvPoissonCDF', 'StatsInvPowerCDF', 'StatsInvQCDF', 'StatsInvQpCDF', 'StatsInvRayleighCDF', 'StatsInvRectangularCDF', 'StatsInvSpearmanCDF', 'StatsInvStudentCDF', 'StatsInvTopDownCDF', 'StatsInvTriangularCDF', 'StatsInvUsquaredCDF', 'StatsInvVonMisesCDF', 'StatsInvWeibullCDF', - 'StatsKuiperCDF', 'StatsLogisticCDF', 'StatsLogisticPDF', 'StatsLogNormalCDF', - 'StatsLogNormalPDF', 'StatsMaxwellCDF', 'StatsMaxwellPDF', 'StatsMedian', - 'StatsMooreCDF', 'StatsNBinomialCDF', 'StatsNBinomialPDF', 'StatsNCChiCDF', - 'StatsNCChiPDF', 'StatsNCFCDF', 'StatsNCFPDF', 'StatsNCTCDF', 'StatsNCTPDF', - 'StatsNormalCDF', 'StatsNormalPDF', 'StatsParetoCDF', 'StatsParetoPDF', - 'StatsPermute', 'StatsPoissonCDF', 'StatsPoissonPDF', 'StatsPowerCDF', - 'StatsPowerNoise', 'StatsPowerPDF', 'StatsQCDF', 'StatsQpCDF', 'StatsRayleighCDF', - 'StatsRayleighPDF', 'StatsRectangularCDF', 'StatsRectangularPDF', 'StatsRunsCDF', - 'StatsSpearmanRhoCDF', 'StatsStudentCDF', 'StatsStudentPDF', 'StatsTopDownCDF', + 'StatsKuiperCDF', 'StatsLogisticCDF', 'StatsLogisticPDF', 'StatsLogNormalCDF', + 'StatsLogNormalPDF', 'StatsMaxwellCDF', 'StatsMaxwellPDF', 'StatsMedian', + 'StatsMooreCDF', 'StatsNBinomialCDF', 'StatsNBinomialPDF', 'StatsNCChiCDF', + 'StatsNCChiPDF', 'StatsNCFCDF', 'StatsNCFPDF', 'StatsNCTCDF', 'StatsNCTPDF', + 'StatsNormalCDF', 'StatsNormalPDF', 'StatsParetoCDF', 'StatsParetoPDF', + 'StatsPermute', 'StatsPoissonCDF', 'StatsPoissonPDF', 'StatsPowerCDF', + 'StatsPowerNoise', 'StatsPowerPDF', 'StatsQCDF', 'StatsQpCDF', 'StatsRayleighCDF', + 'StatsRayleighPDF', 'StatsRectangularCDF', 'StatsRectangularPDF', 'StatsRunsCDF', + 'StatsSpearmanRhoCDF', 'StatsStudentCDF', 'StatsStudentPDF', 'StatsTopDownCDF', 'StatsTriangularCDF', 'StatsTriangularPDF', 'StatsTrimmedMean', - 'StatsUSquaredCDF', 'StatsVonMisesCDF', 'StatsVonMisesNoise', 'StatsVonMisesPDF', - 'StatsWaldCDF', 'StatsWaldPDF', 'StatsWeibullCDF', 'StatsWeibullPDF', - 'StopMSTimer', 'StringByKey', 'stringCRC', 'StringFromList', 'StringList', - 'stringmatch', 'strlen', 'strsearch', 'StrVarOrDefault', 'str2num', 'StudentA', - 'StudentT', 'sum', 'SVAR_Exists', 'TableInfo', 'TagVal', 'TagWaveRef', 'tan', - 'tango_close_device', 'tango_command_inout', 'tango_compute_image_proj', - 'tango_get_dev_attr_list', 'tango_get_dev_black_box', 'tango_get_dev_cmd_list', - 'tango_get_dev_status', 'tango_get_dev_timeout', 'tango_get_error_stack', - 'tango_open_device', 'tango_ping_device', 'tango_read_attribute', - 'tango_read_attributes', 'tango_reload_dev_interface', - 'tango_resume_attr_monitor', 'tango_set_attr_monitor_period', - 'tango_set_dev_timeout', 'tango_start_attr_monitor', 'tango_stop_attr_monitor', - 'tango_suspend_attr_monitor', 'tango_write_attribute', 'tango_write_attributes', - 'tanh', 'TDMAddChannel', 'TDMAddGroup', 'TDMAppendDataValues', - 'TDMAppendDataValuesTime', 'TDMChannelPropertyExists', 'TDMCloseChannel', - 'TDMCloseFile', 'TDMCloseGroup', 'TDMCreateChannelProperty', 'TDMCreateFile', - 'TDMCreateFileProperty', 'TDMCreateGroupProperty', 'TDMFilePropertyExists', - 'TDMGetChannelPropertyNames', 'TDMGetChannelPropertyNum', - 'TDMGetChannelPropertyStr', 'TDMGetChannelPropertyTime', - 'TDMGetChannelPropertyType', 'TDMGetChannels', 'TDMGetChannelStringPropertyLen', - 'TDMGetDataType', 'TDMGetDataValues', 'TDMGetDataValuesTime', - 'TDMGetFilePropertyNames', 'TDMGetFilePropertyNum', 'TDMGetFilePropertyStr', - 'TDMGetFilePropertyTime', 'TDMGetFilePropertyType', 'TDMGetFileStringPropertyLen', - 'TDMGetGroupPropertyNames', 'TDMGetGroupPropertyNum', 'TDMGetGroupPropertyStr', - 'TDMGetGroupPropertyTime', 'TDMGetGroupPropertyType', 'TDMGetGroups', - 'TDMGetGroupStringPropertyLen', 'TDMGetLibraryErrorDescription', - 'TDMGetNumChannelProperties', 'TDMGetNumChannels', 'TDMGetNumDataValues', - 'TDMGetNumFileProperties', 'TDMGetNumGroupProperties', 'TDMGetNumGroups', - 'TDMGroupPropertyExists', 'TDMOpenFile', 'TDMOpenFileEx', 'TDMRemoveChannel', - 'TDMRemoveGroup', 'TDMReplaceDataValues', 'TDMReplaceDataValuesTime', - 'TDMSaveFile', 'TDMSetChannelPropertyNum', 'TDMSetChannelPropertyStr', - 'TDMSetChannelPropertyTime', 'TDMSetDataValues', 'TDMSetDataValuesTime', - 'TDMSetFilePropertyNum', 'TDMSetFilePropertyStr', 'TDMSetFilePropertyTime', - 'TDMSetGroupPropertyNum', 'TDMSetGroupPropertyStr', 'TDMSetGroupPropertyTime', - 'TextEncodingCode', 'TextEncodingName', 'TextFile', 'ThreadGroupCreate', - 'ThreadGroupGetDF', 'ThreadGroupGetDFR', 'ThreadGroupRelease', 'ThreadGroupWait', - 'ThreadProcessorCount', 'ThreadReturnValue', 'ticks', 'time', 'TraceFromPixel', - 'TraceInfo', 'TraceNameList', 'TraceNameToWaveRef', 'TrimString', 'trunc', - 'UniqueName', 'UnPadString', 'UnsetEnvironmentVariable', 'UpperStr', 'URLDecode', - 'URLEncode', 'VariableList', 'Variance', 'vcsr', 'viAssertIntrSignal', - 'viAssertTrigger', 'viAssertUtilSignal', 'viClear', 'viClose', 'viDisableEvent', - 'viDiscardEvents', 'viEnableEvent', 'viFindNext', 'viFindRsrc', 'viGetAttribute', - 'viGetAttributeString', 'viGpibCommand', 'viGpibControlATN', 'viGpibControlREN', - 'viGpibPassControl', 'viGpibSendIFC', 'viIn8', 'viIn16', 'viIn32', 'viLock', - 'viMapAddress', 'viMapTrigger', 'viMemAlloc', 'viMemFree', 'viMoveIn8', - 'viMoveIn16', 'viMoveIn32', 'viMoveOut8', 'viMoveOut16', 'viMoveOut32', 'viOpen', - 'viOpenDefaultRM', 'viOut8', 'viOut16', 'viOut32', 'viPeek8', 'viPeek16', - 'viPeek32', 'viPoke8', 'viPoke16', 'viPoke32', 'viRead', 'viReadSTB', - 'viSetAttribute', 'viSetAttributeString', 'viStatusDesc', 'viTerminate', - 'viUnlock', 'viUnmapAddress', 'viUnmapTrigger', 'viUsbControlIn', - 'viUsbControlOut', 'viVxiCommandQuery', 'viWaitOnEvent', 'viWrite', 'VoigtFunc', - 'VoigtPeak', 'WaveCRC', 'WaveDims', 'WaveExists', 'WaveHash', 'WaveInfo', - 'WaveList', 'WaveMax', 'WaveMin', 'WaveName', 'WaveRefIndexed', - 'WaveRefIndexedDFR', 'WaveRefsEqual', 'WaveRefWaveToList', 'WaveTextEncoding', - 'WaveType', 'WaveUnits', 'WhichListItem', 'WinList', 'WinName', 'WinRecreation', - 'WinType', 'wnoise', 'xcsr', 'XWaveName', 'XWaveRefFromTrace', 'x2pnt', 'zcsr', + 'StatsUSquaredCDF', 'StatsVonMisesCDF', 'StatsVonMisesNoise', 'StatsVonMisesPDF', + 'StatsWaldCDF', 'StatsWaldPDF', 'StatsWeibullCDF', 'StatsWeibullPDF', + 'StopMSTimer', 'StringByKey', 'stringCRC', 'StringFromList', 'StringList', + 'stringmatch', 'strlen', 'strsearch', 'StrVarOrDefault', 'str2num', 'StudentA', + 'StudentT', 'sum', 'SVAR_Exists', 'TableInfo', 'TagVal', 'TagWaveRef', 'tan', + 'tango_close_device', 'tango_command_inout', 'tango_compute_image_proj', + 'tango_get_dev_attr_list', 'tango_get_dev_black_box', 'tango_get_dev_cmd_list', + 'tango_get_dev_status', 'tango_get_dev_timeout', 'tango_get_error_stack', + 'tango_open_device', 'tango_ping_device', 'tango_read_attribute', + 'tango_read_attributes', 'tango_reload_dev_interface', + 'tango_resume_attr_monitor', 'tango_set_attr_monitor_period', + 'tango_set_dev_timeout', 'tango_start_attr_monitor', 'tango_stop_attr_monitor', + 'tango_suspend_attr_monitor', 'tango_write_attribute', 'tango_write_attributes', + 'tanh', 'TDMAddChannel', 'TDMAddGroup', 'TDMAppendDataValues', + 'TDMAppendDataValuesTime', 'TDMChannelPropertyExists', 'TDMCloseChannel', + 'TDMCloseFile', 'TDMCloseGroup', 'TDMCreateChannelProperty', 'TDMCreateFile', + 'TDMCreateFileProperty', 'TDMCreateGroupProperty', 'TDMFilePropertyExists', + 'TDMGetChannelPropertyNames', 'TDMGetChannelPropertyNum', + 'TDMGetChannelPropertyStr', 'TDMGetChannelPropertyTime', + 'TDMGetChannelPropertyType', 'TDMGetChannels', 'TDMGetChannelStringPropertyLen', + 'TDMGetDataType', 'TDMGetDataValues', 'TDMGetDataValuesTime', + 'TDMGetFilePropertyNames', 'TDMGetFilePropertyNum', 'TDMGetFilePropertyStr', + 'TDMGetFilePropertyTime', 'TDMGetFilePropertyType', 'TDMGetFileStringPropertyLen', + 'TDMGetGroupPropertyNames', 'TDMGetGroupPropertyNum', 'TDMGetGroupPropertyStr', + 'TDMGetGroupPropertyTime', 'TDMGetGroupPropertyType', 'TDMGetGroups', + 'TDMGetGroupStringPropertyLen', 'TDMGetLibraryErrorDescription', + 'TDMGetNumChannelProperties', 'TDMGetNumChannels', 'TDMGetNumDataValues', + 'TDMGetNumFileProperties', 'TDMGetNumGroupProperties', 'TDMGetNumGroups', + 'TDMGroupPropertyExists', 'TDMOpenFile', 'TDMOpenFileEx', 'TDMRemoveChannel', + 'TDMRemoveGroup', 'TDMReplaceDataValues', 'TDMReplaceDataValuesTime', + 'TDMSaveFile', 'TDMSetChannelPropertyNum', 'TDMSetChannelPropertyStr', + 'TDMSetChannelPropertyTime', 'TDMSetDataValues', 'TDMSetDataValuesTime', + 'TDMSetFilePropertyNum', 'TDMSetFilePropertyStr', 'TDMSetFilePropertyTime', + 'TDMSetGroupPropertyNum', 'TDMSetGroupPropertyStr', 'TDMSetGroupPropertyTime', + 'TextEncodingCode', 'TextEncodingName', 'TextFile', 'ThreadGroupCreate', + 'ThreadGroupGetDF', 'ThreadGroupGetDFR', 'ThreadGroupRelease', 'ThreadGroupWait', + 'ThreadProcessorCount', 'ThreadReturnValue', 'ticks', 'time', 'TraceFromPixel', + 'TraceInfo', 'TraceNameList', 'TraceNameToWaveRef', 'TrimString', 'trunc', + 'UniqueName', 'UnPadString', 'UnsetEnvironmentVariable', 'UpperStr', 'URLDecode', + 'URLEncode', 'VariableList', 'Variance', 'vcsr', 'viAssertIntrSignal', + 'viAssertTrigger', 'viAssertUtilSignal', 'viClear', 'viClose', 'viDisableEvent', + 'viDiscardEvents', 'viEnableEvent', 'viFindNext', 'viFindRsrc', 'viGetAttribute', + 'viGetAttributeString', 'viGpibCommand', 'viGpibControlATN', 'viGpibControlREN', + 'viGpibPassControl', 'viGpibSendIFC', 'viIn8', 'viIn16', 'viIn32', 'viLock', + 'viMapAddress', 'viMapTrigger', 'viMemAlloc', 'viMemFree', 'viMoveIn8', + 'viMoveIn16', 'viMoveIn32', 'viMoveOut8', 'viMoveOut16', 'viMoveOut32', 'viOpen', + 'viOpenDefaultRM', 'viOut8', 'viOut16', 'viOut32', 'viPeek8', 'viPeek16', + 'viPeek32', 'viPoke8', 'viPoke16', 'viPoke32', 'viRead', 'viReadSTB', + 'viSetAttribute', 'viSetAttributeString', 'viStatusDesc', 'viTerminate', + 'viUnlock', 'viUnmapAddress', 'viUnmapTrigger', 'viUsbControlIn', + 'viUsbControlOut', 'viVxiCommandQuery', 'viWaitOnEvent', 'viWrite', 'VoigtFunc', + 'VoigtPeak', 'WaveCRC', 'WaveDims', 'WaveExists', 'WaveHash', 'WaveInfo', + 'WaveList', 'WaveMax', 'WaveMin', 'WaveName', 'WaveRefIndexed', + 'WaveRefIndexedDFR', 'WaveRefsEqual', 'WaveRefWaveToList', 'WaveTextEncoding', + 'WaveType', 'WaveUnits', 'WhichListItem', 'WinList', 'WinName', 'WinRecreation', + 'WinType', 'wnoise', 'xcsr', 'XWaveName', 'XWaveRefFromTrace', 'x2pnt', 'zcsr', 'ZernikeR', 'zeromq_client_connect', 'zeromq_client_recv', 'zeromq_client_send', 'zeromq_handler_start', 'zeromq_handler_stop', 'zeromq_server_bind', 'zeromq_server_recv', 'zeromq_server_send', 'zeromq_set', @@ -411,7 +411,7 @@ class IgorLexer(RegexLexer): # Built-in functions. (words(functions, prefix=r'\b', suffix=r'\b'), Name.Function), # Compiler directives. - (r'^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)', + (r'^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)', Name.Decorator), (r'[^a-z"/]+$', Text), (r'.', Text), diff --git a/contrib/python/Pygments/py3/pygments/lexers/inferno.py b/contrib/python/Pygments/py3/pygments/lexers/inferno.py index 475ebcfc7f..befe42ab51 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/inferno.py +++ b/contrib/python/Pygments/py3/pygments/lexers/inferno.py @@ -63,7 +63,7 @@ class LimboLexer(RegexLexer): (r'(byte|int|big|real|string|array|chan|list|adt' r'|fn|ref|of|module|self|type)\b', Keyword.Type), (r'(con|iota|nil)\b', Keyword.Constant), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), ], 'statement' : [ include('whitespace'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py b/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py index 98d5449eb1..c309d19248 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py +++ b/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py @@ -921,7 +921,7 @@ class Tads3Lexer(RegexLexer): 'block?/root': [ (r'\{', Punctuation, ('#pop', 'block')), include('whitespace'), - (r'(?=[\[\'"<(:])', Text, # It might be a VerbRule macro. + (r'(?=[\[\'"<(:])', Text, # It might be a VerbRule macro. ('#pop', 'object-body/no-braces', 'grammar', 'grammar-rules')), # It might be a macro like DefineAction. default(('#pop', 'object-body/no-braces')) diff --git a/contrib/python/Pygments/py3/pygments/lexers/iolang.py b/contrib/python/Pygments/py3/pygments/lexers/iolang.py index 97620cb27b..c1fbe9084e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/iolang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/iolang.py @@ -48,7 +48,7 @@ class IoLexer(RegexLexer): # names (r'(Object|list|List|Map|args|Sequence|Coroutine|File)\b', Name.Builtin), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), # numbers (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), (r'\d+', Number.Integer) diff --git a/contrib/python/Pygments/py3/pygments/lexers/j.py b/contrib/python/Pygments/py3/pygments/lexers/j.py index c8c9b51ccc..8a3ddcbdd1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/j.py +++ b/contrib/python/Pygments/py3/pygments/lexers/j.py @@ -47,17 +47,17 @@ class JLexer(RegexLexer): # Definitions (r'0\s+:\s*0|noun\s+define\s*$', Name.Entity, 'nounDefinition'), - (r'(([1-4]|13)\s+:\s*0|(adverb|conjunction|dyad|monad|verb)\s+define)\b', + (r'(([1-4]|13)\s+:\s*0|(adverb|conjunction|dyad|monad|verb)\s+define)\b', Name.Function, 'explicitDefinition'), # Flow Control - (words(('for_', 'goto_', 'label_'), suffix=validName+r'\.'), Name.Label), + (words(('for_', 'goto_', 'label_'), suffix=validName+r'\.'), Name.Label), (words(( 'assert', 'break', 'case', 'catch', 'catchd', 'catcht', 'continue', 'do', 'else', 'elseif', 'end', 'fcase', 'for', 'if', 'return', 'select', 'throw', 'try', 'while', 'whilst', - ), suffix=r'\.'), Name.Label), + ), suffix=r'\.'), Name.Label), # Variable Names (validName, Name.Variable), @@ -74,8 +74,8 @@ class JLexer(RegexLexer): 'fetch', 'file2url', 'fixdotdot', 'fliprgb', 'getargs', 'getenv', 'hfd', 'inv', 'inverse', 'iospath', 'isatty', 'isutf8', 'items', 'leaf', 'list', - 'nameclass', 'namelist', 'names', 'nc', - 'nl', 'on', 'pick', 'rows', + 'nameclass', 'namelist', 'names', 'nc', + 'nl', 'on', 'pick', 'rows', 'script', 'scriptd', 'sign', 'sminfo', 'smoutput', 'sort', 'split', 'stderr', 'stdin', 'stdout', 'table', 'take', 'timespacex', 'timex', 'tmoutput', diff --git a/contrib/python/Pygments/py3/pygments/lexers/javascript.py b/contrib/python/Pygments/py3/pygments/lexers/javascript.py index d4c07b370d..7ddd1148e6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/javascript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/javascript.py @@ -76,7 +76,7 @@ class JavascriptLexer(RegexLexer): # integers (r'(\.[0-9]+|[0-9]+\.[0-9]*|[0-9]+)([eE][-+]?[0-9]+)?', Number.Float), - (r'\.\.\.|=>', Punctuation), + (r'\.\.\.|=>', Punctuation), (r'\+\+|--|~|\?\?=?|\?|:|\\(?=\n)|' r'(<<|>>>?|==?|!=?|(?:\*\*|\|\||&&|[-<>+*%&|^/]))=?', Operator, 'slashstartsregex'), (r'[{(\[;,]', Punctuation, 'slashstartsregex'), @@ -122,13 +122,13 @@ class JavascriptLexer(RegexLexer): 'interp': [ (r'`', String.Backtick, '#pop'), (r'\\.', String.Backtick), - (r'\$\{', String.Interpol, 'interp-inside'), + (r'\$\{', String.Interpol, 'interp-inside'), (r'\$', String.Backtick), (r'[^`\\$]+', String.Backtick), ], 'interp-inside': [ # TODO: should this include single-line comments and allow nesting strings? - (r'\}', String.Interpol, '#pop'), + (r'\}', String.Interpol, '#pop'), include('root'), ], } @@ -528,7 +528,7 @@ class LassoLexer(RegexLexer): tokens = { 'root': [ (r'^#![ \S]+lasso9\b', Comment.Preproc, 'lasso'), - (r'(?=\[|<)', Other, 'delimiters'), + (r'(?=\[|<)', Other, 'delimiters'), (r'\s+', Other), default(('delimiters', 'lassofile')), ], @@ -536,14 +536,14 @@ class LassoLexer(RegexLexer): (r'\[no_square_brackets\]', Comment.Preproc, 'nosquarebrackets'), (r'\[noprocess\]', Comment.Preproc, 'noprocess'), (r'\[', Comment.Preproc, 'squarebrackets'), - (r'<\?(lasso(script)?|=)', Comment.Preproc, 'anglebrackets'), + (r'<\?(lasso(script)?|=)', Comment.Preproc, 'anglebrackets'), (r'<(!--.*?-->)?', Other), (r'[^[<]+', Other), ], 'nosquarebrackets': [ (r'\[noprocess\]', Comment.Preproc, 'noprocess'), (r'\[', Other), - (r'<\?(lasso(script)?|=)', Comment.Preproc, 'anglebrackets'), + (r'<\?(lasso(script)?|=)', Comment.Preproc, 'anglebrackets'), (r'<(!--.*?-->)?', Other), (r'[^[<]+', Other), ], @@ -585,7 +585,7 @@ class LassoLexer(RegexLexer): # names (r'\$[a-z_][\w.]*', Name.Variable), - (r'#([a-z_][\w.]*|\d+\b)', Name.Variable.Instance), + (r'#([a-z_][\w.]*|\d+\b)', Name.Variable.Instance), (r"(\.\s*)('[a-z_][\w.]*')", bygroups(Name.Builtin.Pseudo, Name.Variable.Class)), (r"(self)(\s*->\s*)('[a-z_][\w.]*')", @@ -636,20 +636,20 @@ class LassoLexer(RegexLexer): r'Database_TableNames|Define_Tag|Define_Type|Email_Batch|' r'Encode_Set|HTML_Comment|Handle|Handle_Error|Header|If|Inline|' r'Iterate|LJAX_Target|Link|Link_CurrentAction|Link_CurrentGroup|' - r'Link_CurrentRecord|Link_Detail|Link_FirstGroup|Link_FirstRecord|' - r'Link_LastGroup|Link_LastRecord|Link_NextGroup|Link_NextRecord|' - r'Link_PrevGroup|Link_PrevRecord|Log|Loop|Output_None|Portal|' - r'Private|Protect|Records|Referer|Referrer|Repeating|ResultSet|' - r'Rows|Search_Args|Search_Arguments|Select|Sort_Args|' - r'Sort_Arguments|Thread_Atomic|Value_List|While|Abort|Case|Else|' - r'Fail_If|Fail_IfNot|Fail|If_Empty|If_False|If_Null|If_True|' - r'Loop_Abort|Loop_Continue|Loop_Count|Params|Params_Up|Return|' - r'Return_Value|Run_Children|SOAP_DefineTag|SOAP_LastRequest|' - r'SOAP_LastResponse|Tag_Name|ascending|average|by|define|' - r'descending|do|equals|frozen|group|handle_failure|import|in|into|' - r'join|let|match|max|min|on|order|parent|protected|provide|public|' - r'require|returnhome|skip|split_thread|sum|take|thread|to|trait|' - r'type|where|with|yield|yieldhome)\b', + r'Link_CurrentRecord|Link_Detail|Link_FirstGroup|Link_FirstRecord|' + r'Link_LastGroup|Link_LastRecord|Link_NextGroup|Link_NextRecord|' + r'Link_PrevGroup|Link_PrevRecord|Log|Loop|Output_None|Portal|' + r'Private|Protect|Records|Referer|Referrer|Repeating|ResultSet|' + r'Rows|Search_Args|Search_Arguments|Select|Sort_Args|' + r'Sort_Arguments|Thread_Atomic|Value_List|While|Abort|Case|Else|' + r'Fail_If|Fail_IfNot|Fail|If_Empty|If_False|If_Null|If_True|' + r'Loop_Abort|Loop_Continue|Loop_Count|Params|Params_Up|Return|' + r'Return_Value|Run_Children|SOAP_DefineTag|SOAP_LastRequest|' + r'SOAP_LastResponse|Tag_Name|ascending|average|by|define|' + r'descending|do|equals|frozen|group|handle_failure|import|in|into|' + r'join|let|match|max|min|on|order|parent|protected|provide|public|' + r'require|returnhome|skip|split_thread|sum|take|thread|to|trait|' + r'type|where|with|yield|yieldhome)\b', bygroups(Punctuation, Keyword)), # other @@ -974,7 +974,7 @@ class ObjectiveJLexer(RegexLexer): } def analyse_text(text): - if re.search(r'^\s*@import\s+[<"]', text, re.MULTILINE): + if re.search(r'^\s*@import\s+[<"]', text, re.MULTILINE): # special directive found in most Objective-J files return True return False @@ -994,11 +994,11 @@ class CoffeeScriptLexer(RegexLexer): filenames = ['*.coffee'] mimetypes = ['text/coffeescript'] - _operator_re = ( - r'\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|' - r'\|\||\\(?=\n)|' + _operator_re = ( + r'\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|' + r'\|\||\\(?=\n)|' r'(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&|\^/])=?') - + flags = re.DOTALL tokens = { 'commentsandwhitespace': [ @@ -1017,17 +1017,17 @@ class CoffeeScriptLexer(RegexLexer): (r'///', String.Regex, ('#pop', 'multilineregex')), (r'/(?! )(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/' r'([gimuysd]+\b|\B)', String.Regex, '#pop'), - # This isn't really guarding against mishighlighting well-formed - # code, just the ability to infinite-loop between root and - # slashstartsregex. + # This isn't really guarding against mishighlighting well-formed + # code, just the ability to infinite-loop between root and + # slashstartsregex. (r'/', Operator, '#pop'), default('#pop'), ], 'root': [ include('commentsandwhitespace'), (r'\A(?=\s|/)', Text, 'slashstartsregex'), - (_operator_re, Operator, 'slashstartsregex'), - (r'(?:\([^()]*\))?\s*[=-]>', Name.Function, 'slashstartsregex'), + (_operator_re, Operator, 'slashstartsregex'), + (r'(?:\([^()]*\))?\s*[=-]>', Name.Function, 'slashstartsregex'), (r'[{(\[;,]', Punctuation, 'slashstartsregex'), (r'[})\].]', Punctuation), (r'(?<![.$])(for|own|in|of|while|until|' @@ -1048,7 +1048,7 @@ class CoffeeScriptLexer(RegexLexer): (r'@[$a-zA-Z_][\w.:$]*\s*[:=]\s', Name.Variable.Instance, 'slashstartsregex'), (r'@', Name.Other, 'slashstartsregex'), - (r'@?[$a-zA-Z_][\w$]*', Name.Other), + (r'@?[$a-zA-Z_][\w$]*', Name.Other), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+', Number.Integer), @@ -1228,32 +1228,32 @@ class EarlGreyLexer(RegexLexer): include('control'), (r'[^\S\n]+', Text), (r';;.*\n', Comment), - (r'[\[\]{}:(),;]', Punctuation), + (r'[\[\]{}:(),;]', Punctuation), (r'\\\n', Text), (r'\\', Text), include('errors'), (words(( 'with', 'where', 'when', 'and', 'not', 'or', 'in', 'as', 'of', 'is'), - prefix=r'(?<=\s|\[)', suffix=r'(?![\w$\-])'), + prefix=r'(?<=\s|\[)', suffix=r'(?![\w$\-])'), Operator.Word), - (r'[*@]?->', Name.Function), + (r'[*@]?->', Name.Function), (r'[+\-*/~^<>%&|?!@#.]*=', Operator.Word), (r'\.{2,3}', Operator.Word), # Range Operator (r'([+*/~^<>&|?!]+)|([#\-](?=\s))|@@+(?=\s)|=+', Operator), - (r'(?<![\w$\-])(var|let)(?:[^\w$])', Keyword.Declaration), + (r'(?<![\w$\-])(var|let)(?:[^\w$])', Keyword.Declaration), include('keywords'), include('builtins'), include('assignment'), (r'''(?x) - (?:()([a-zA-Z$_](?:[\w$\-]*[\w$])?)| - (?<=[\s{\[(])(\.)([a-zA-Z$_](?:[\w$\-]*[\w$])?)) + (?:()([a-zA-Z$_](?:[\w$\-]*[\w$])?)| + (?<=[\s{\[(])(\.)([a-zA-Z$_](?:[\w$\-]*[\w$])?)) (?=.*%)''', bygroups(Punctuation, Name.Tag, Punctuation, Name.Class.Start), 'dbs'), (r'[rR]?`', String.Backtick, 'bt'), (r'[rR]?```', String.Backtick, 'tbt'), - (r'(?<=[\s\[{(,;])\.([a-zA-Z$_](?:[\w$\-]*[\w$])?)' - r'(?=[\s\]}),;])', String.Symbol), + (r'(?<=[\s\[{(,;])\.([a-zA-Z$_](?:[\w$\-]*[\w$])?)' + r'(?=[\s\]}),;])', String.Symbol), include('nested'), (r'(?:[rR]|[rR]\.[gmi]{1,3})?"', String, combined('stringescape', 'dqs')), (r'(?:[rR]|[rR]\.[gmi]{1,3})?\'', String, combined('stringescape', 'sqs')), @@ -1264,9 +1264,9 @@ class EarlGreyLexer(RegexLexer): include('numbers'), ], 'dbs': [ - (r'(\.)([a-zA-Z$_](?:[\w$\-]*[\w$])?)(?=[.\[\s])', + (r'(\.)([a-zA-Z$_](?:[\w$\-]*[\w$])?)(?=[.\[\s])', bygroups(Punctuation, Name.Class.DBS)), - (r'(\[)([\^#][a-zA-Z$_](?:[\w$\-]*[\w$])?)(\])', + (r'(\[)([\^#][a-zA-Z$_](?:[\w$\-]*[\w$])?)(\])', bygroups(Punctuation, Name.Entity.DBS, Punctuation)), (r'\s+', Text), (r'%', Operator.DBS, '#pop'), @@ -1276,29 +1276,29 @@ class EarlGreyLexer(RegexLexer): bygroups(Text.Whitespace, Text)), ], 'assignment': [ - (r'(\.)?([a-zA-Z$_](?:[\w$\-]*[\w$])?)' + (r'(\.)?([a-zA-Z$_](?:[\w$\-]*[\w$])?)' r'(?=\s+[+\-*/~^<>%&|?!@#.]*\=\s)', bygroups(Punctuation, Name.Variable)) ], 'errors': [ (words(('Error', 'TypeError', 'ReferenceError'), - prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$.])'), + prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$.])'), Name.Exception), (r'''(?x) - (?<![\w$]) - E\.[\w$](?:[\w$\-]*[\w$])? - (?:\.[\w$](?:[\w$\-]*[\w$])?)* - (?=[({\[?!\s])''', + (?<![\w$]) + E\.[\w$](?:[\w$\-]*[\w$])? + (?:\.[\w$](?:[\w$\-]*[\w$])?)* + (?=[({\[?!\s])''', Name.Exception), ], 'control': [ (r'''(?x) - ([a-zA-Z$_](?:[\w$-]*[\w$])?) + ([a-zA-Z$_](?:[\w$-]*[\w$])?) (?!\n)\s+ (?!and|as|each\*|each|in|is|mod|of|or|when|where|with) - (?=(?:[+\-*/~^<>%&|?!@#.])?[a-zA-Z$_](?:[\w$-]*[\w$])?)''', + (?=(?:[+\-*/~^<>%&|?!@#.])?[a-zA-Z$_](?:[\w$-]*[\w$])?)''', Keyword.Control), - (r'([a-zA-Z$_](?:[\w$-]*[\w$])?)(?!\n)\s+(?=[\'"\d{\[(])', + (r'([a-zA-Z$_](?:[\w$-]*[\w$])?)(?!\n)\s+(?=[\'"\d{\[(])', Keyword.Control), (r'''(?x) (?: @@ -1307,28 +1307,28 @@ class EarlGreyLexer(RegexLexer): (?<=with|each|with)| (?<=each\*|where) )(\s+) - ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)''', + ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)''', bygroups(Text, Keyword.Control, Punctuation)), (r'''(?x) (?<![+\-*/~^<>%&|?!@#.])(\s+) - ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)''', + ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)''', bygroups(Text, Keyword.Control, Punctuation)), ], 'nested': [ (r'''(?x) - (?<=[\w$\]})])(\.) - ([a-zA-Z$_](?:[\w$-]*[\w$])?) + (?<=[\w$\]})])(\.) + ([a-zA-Z$_](?:[\w$-]*[\w$])?) (?=\s+with(?:\s|\n))''', bygroups(Punctuation, Name.Function)), (r'''(?x) (?<!\s)(\.) - ([a-zA-Z$_](?:[\w$-]*[\w$])?) - (?=[}\]).,;:\s])''', + ([a-zA-Z$_](?:[\w$-]*[\w$])?) + (?=[}\]).,;:\s])''', bygroups(Punctuation, Name.Field)), (r'''(?x) - (?<=[\w$\]})])(\.) - ([a-zA-Z$_](?:[\w$-]*[\w$])?) - (?=[\[{(:])''', + (?<=[\w$\]})])(\.) + ([a-zA-Z$_](?:[\w$-]*[\w$])?) + (?=[\[{(:])''', bygroups(Punctuation, Name.Function)), ], 'keywords': [ @@ -1337,15 +1337,15 @@ class EarlGreyLexer(RegexLexer): 'continue', 'elif', 'expr-value', 'if', 'match', 'return', 'yield', 'pass', 'else', 'require', 'var', 'let', 'async', 'method', 'gen'), - prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$.])'), + prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$.])'), Keyword.Pseudo), (words(('this', 'self', '@'), - prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$])'), + prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$])'), Keyword.Constant), (words(( 'Function', 'Object', 'Array', 'String', 'Number', 'Boolean', 'ErrorFactory', 'ENode', 'Promise'), - prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$])'), + prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$])'), Keyword.Type), ], 'builtins': [ @@ -1356,20 +1356,20 @@ class EarlGreyLexer(RegexLexer): 'getChecker', 'get-checker', 'getProperty', 'get-property', 'getProjector', 'get-projector', 'consume', 'take', 'promisify', 'spawn', 'constructor'), - prefix=r'(?<![\w\-#.])', suffix=r'(?![\w\-.])'), + prefix=r'(?<![\w\-#.])', suffix=r'(?![\w\-.])'), Name.Builtin), (words(( 'true', 'false', 'null', 'undefined'), - prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$.])'), + prefix=r'(?<![\w\-$.])', suffix=r'(?![\w\-$.])'), Name.Constant), ], 'name': [ - (r'@([a-zA-Z$_](?:[\w$-]*[\w$])?)', Name.Variable.Instance), - (r'([a-zA-Z$_](?:[\w$-]*[\w$])?)(\+\+|\-\-)?', + (r'@([a-zA-Z$_](?:[\w$-]*[\w$])?)', Name.Variable.Instance), + (r'([a-zA-Z$_](?:[\w$-]*[\w$])?)(\+\+|\-\-)?', bygroups(Name.Symbol, Operator.Word)) ], 'tuple': [ - (r'#[a-zA-Z_][\w\-]*(?=[\s{(,;])', Name.Namespace) + (r'#[a-zA-Z_][\w\-]*(?=[\s{(,;])', Name.Namespace) ], 'interpoling_string': [ (r'\}', String.Interpol, '#pop'), @@ -1409,7 +1409,7 @@ class EarlGreyLexer(RegexLexer): (r'```', String.Backtick, '#pop'), (r'\n', String.Backtick), (r'\^=?', String.Escape), - (r'[^`]+', String.Backtick), + (r'[^`]+', String.Backtick), ], 'numbers': [ (r'\d+\.(?!\.)\d*([eE][+-]?[0-9]+)?', Number.Float), @@ -1422,75 +1422,75 @@ class EarlGreyLexer(RegexLexer): (r'\d+', Number.Integer) ], } - - -class JuttleLexer(RegexLexer): - """ - For `Juttle`_ source code. - - .. _Juttle: https://github.com/juttle/juttle - + + +class JuttleLexer(RegexLexer): + """ + For `Juttle`_ source code. + + .. _Juttle: https://github.com/juttle/juttle + .. versionadded:: 2.2 - """ - - name = 'Juttle' + """ + + name = 'Juttle' aliases = ['juttle'] - filenames = ['*.juttle'] - mimetypes = ['application/juttle', 'application/x-juttle', - 'text/x-juttle', 'text/juttle'] - - flags = re.DOTALL | re.UNICODE | re.MULTILINE - - tokens = { - 'commentsandwhitespace': [ - (r'\s+', Text), - (r'//.*?\n', Comment.Single), - (r'/\*.*?\*/', Comment.Multiline) - ], - 'slashstartsregex': [ - include('commentsandwhitespace'), - (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/' + filenames = ['*.juttle'] + mimetypes = ['application/juttle', 'application/x-juttle', + 'text/x-juttle', 'text/juttle'] + + flags = re.DOTALL | re.UNICODE | re.MULTILINE + + tokens = { + 'commentsandwhitespace': [ + (r'\s+', Text), + (r'//.*?\n', Comment.Single), + (r'/\*.*?\*/', Comment.Multiline) + ], + 'slashstartsregex': [ + include('commentsandwhitespace'), + (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/' r'([gimuysd]+\b|\B)', String.Regex, '#pop'), - (r'(?=/)', Text, ('#pop', 'badregex')), - default('#pop') - ], - 'badregex': [ - (r'\n', Text, '#pop') - ], - 'root': [ - (r'^(?=\s|/)', Text, 'slashstartsregex'), - include('commentsandwhitespace'), - (r':\d{2}:\d{2}:\d{2}(\.\d*)?:', String.Moment), - (r':(now|beginning|end|forever|yesterday|today|tomorrow|' - r'(\d+(\.\d*)?|\.\d+)(ms|[smhdwMy])?):', String.Moment), - (r':\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d*)?)?' - r'(Z|[+-]\d{2}:\d{2}|[+-]\d{4})?:', String.Moment), + (r'(?=/)', Text, ('#pop', 'badregex')), + default('#pop') + ], + 'badregex': [ + (r'\n', Text, '#pop') + ], + 'root': [ + (r'^(?=\s|/)', Text, 'slashstartsregex'), + include('commentsandwhitespace'), + (r':\d{2}:\d{2}:\d{2}(\.\d*)?:', String.Moment), + (r':(now|beginning|end|forever|yesterday|today|tomorrow|' + r'(\d+(\.\d*)?|\.\d+)(ms|[smhdwMy])?):', String.Moment), + (r':\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d*)?)?' + r'(Z|[+-]\d{2}:\d{2}|[+-]\d{4})?:', String.Moment), (r':((\d+(\.\d*)?|\.\d+)[ ]+)?(millisecond|second|minute|hour|' r'day|week|month|year)[s]?' r'(([ ]+and[ ]+(\d+[ ]+)?(millisecond|second|minute|hour|' r'day|week|month|year)[s]?)' - r'|[ ]+(ago|from[ ]+now))*:', String.Moment), - (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|' - r'(==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'), - (r'[{(\[;,]', Punctuation, 'slashstartsregex'), - (r'[})\].]', Punctuation), - (r'(import|return|continue|if|else)\b', Keyword, 'slashstartsregex'), + r'|[ ]+(ago|from[ ]+now))*:', String.Moment), + (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|' + r'(==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'), + (r'[{(\[;,]', Punctuation, 'slashstartsregex'), + (r'[})\].]', Punctuation), + (r'(import|return|continue|if|else)\b', Keyword, 'slashstartsregex'), (r'(var|const|function|reducer|sub|input)\b', Keyword.Declaration, 'slashstartsregex'), - (r'(batch|emit|filter|head|join|keep|pace|pass|put|read|reduce|remove|' + (r'(batch|emit|filter|head|join|keep|pace|pass|put|read|reduce|remove|' r'sequence|skip|sort|split|tail|unbatch|uniq|view|write)\b', Keyword.Reserved), - (r'(true|false|null|Infinity)\b', Keyword.Constant), + (r'(true|false|null|Infinity)\b', Keyword.Constant), (r'(Array|Date|Juttle|Math|Number|Object|RegExp|String)\b', Name.Builtin), - (JS_IDENT, Name.Other), - (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), - (r'[0-9]+', Number.Integer), + (JS_IDENT, Name.Other), + (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), + (r'[0-9]+', Number.Integer), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), - ] - - } + ] + + } class NodeConsoleLexer(Lexer): diff --git a/contrib/python/Pygments/py3/pygments/lexers/julia.py b/contrib/python/Pygments/py3/pygments/lexers/julia.py index 29b9164095..390d5d7158 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/julia.py +++ b/contrib/python/Pygments/py3/pygments/lexers/julia.py @@ -10,8 +10,8 @@ import re -from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \ - words, include +from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \ + words, include from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Generic from pygments.util import shebang_matches @@ -32,7 +32,7 @@ class JuliaLexer(RegexLexer): .. versionadded:: 1.6 """ - + name = 'Julia' aliases = ['julia', 'jl'] filenames = ['*.jl'] @@ -76,12 +76,12 @@ class JuliaLexer(RegexLexer): (words(['.' + o for o in DOTTED_OPERATORS_LIST], suffix=operator_suffixes), Operator), (words(['...', '..']), Operator), - # NOTE - # Patterns below work only for definition sites and thus hardly reliable. - # + # NOTE + # Patterns below work only for definition sites and thus hardly reliable. + # # functions - # (r'(function)(\s+)(' + allowed_variable + ')', - # bygroups(Keyword, Text, Name.Function)), + # (r'(function)(\s+)(' + allowed_variable + ')', + # bygroups(Keyword, Text, Name.Function)), # chars (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|" @@ -93,17 +93,17 @@ class JuliaLexer(RegexLexer): # raw strings (r'(raw)(""")', bygroups(String.Affix, String), 'tqrawstring'), (r'(raw)(")', bygroups(String.Affix, String), 'rawstring'), - # regular expressions + # regular expressions (r'(r)(""")', bygroups(String.Affix, String.Regex), 'tqregex'), (r'(r)(")', bygroups(String.Affix, String.Regex), 'regex'), # other strings (r'(' + allowed_variable + ')?(""")', bygroups(String.Affix, String), 'tqstring'), (r'(' + allowed_variable + ')?(")', bygroups(String.Affix, String), 'string'), - - # backticks + + # backticks (r'(' + allowed_variable + ')?(```)', bygroups(String.Affix, String.Backtick), 'tqcommand'), (r'(' + allowed_variable + ')?(`)', bygroups(String.Affix, String.Backtick), 'command'), - + # type names # - names that begin a curly expression ('(' + allowed_variable + r')(\{)', @@ -130,7 +130,7 @@ class JuliaLexer(RegexLexer): (words(LITERAL_LIST, suffix=r'\b'), Name.Builtin), # names - (allowed_variable, Name), + (allowed_variable, Name), # numbers (r'(\d+((_\d+)+)?\.(?!\.)(\d+((_\d+)+)?)?|\.\d+((_\d+)+)?)([eEf][+-]?[0-9]+)?', Number.Float), @@ -151,7 +151,7 @@ class JuliaLexer(RegexLexer): (r'=#', Comment.Multiline, '#pop'), (r'[=#]', Comment.Multiline), ], - + 'curly': [ (r'\{', Punctuation, '#push'), (r'\}', Punctuation, '#pop'), @@ -184,41 +184,41 @@ class JuliaLexer(RegexLexer): 'string': [ (r'(")(' + allowed_variable + r'|\d+)?', bygroups(String, String.Affix), '#pop'), - # FIXME: This escape pattern is not perfect. - (r'\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)', String.Escape), + # FIXME: This escape pattern is not perfect. + (r'\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)', String.Escape), include('interp'), - # @printf and @sprintf formats - (r'%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]', - String.Interpol), + # @printf and @sprintf formats + (r'%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]', + String.Interpol), (r'[^"$%\\]+', String), (r'.', String), ], - 'tqstring': [ + 'tqstring': [ (r'(""")(' + allowed_variable + r'|\d+)?', bygroups(String, String.Affix), '#pop'), - (r'\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)', String.Escape), + (r'\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)', String.Escape), include('interp'), (r'[^"$%\\]+', String), (r'.', String), - ], - - 'regex': [ + ], + + 'regex': [ (r'(")([imsxa]*)?', bygroups(String.Regex, String.Affix), '#pop'), - (r'\\"', String.Regex), + (r'\\"', String.Regex), (r'[^\\"]+', String.Regex), - ], - - 'tqregex': [ + ], + + 'tqregex': [ (r'(""")([imsxa]*)?', bygroups(String.Regex, String.Affix), '#pop'), (r'[^"]+', String.Regex), - ], - - 'command': [ + ], + + 'command': [ (r'(`)(' + allowed_variable + r'|\d+)?', bygroups(String.Backtick, String.Affix), '#pop'), (r'\\[`$]', String.Escape), include('interp'), (r'[^\\`$]+', String.Backtick), (r'.', String.Backtick), - ], + ], 'tqcommand': [ (r'(```)(' + allowed_variable + r'|\d+)?', bygroups(String.Backtick, String.Affix), '#pop'), (r'\\\$', String.Escape), @@ -243,40 +243,40 @@ class JuliaConsoleLexer(Lexer): def get_tokens_unprocessed(self, text): jllexer = JuliaLexer(**self.options) - start = 0 + start = 0 curcode = '' insertions = [] - output = False - error = False + output = False + error = False - for line in text.splitlines(True): + for line in text.splitlines(True): if line.startswith('julia>'): - insertions.append((len(curcode), [(0, Generic.Prompt, line[:6])])) + insertions.append((len(curcode), [(0, Generic.Prompt, line[:6])])) + curcode += line[6:] + output = False + error = False + elif line.startswith('help?>') or line.startswith('shell>'): + yield start, Generic.Prompt, line[:6] + yield start + 6, Text, line[6:] + output = False + error = False + elif line.startswith(' ') and not output: + insertions.append((len(curcode), [(0, Text, line[:6])])) curcode += line[6:] - output = False - error = False - elif line.startswith('help?>') or line.startswith('shell>'): - yield start, Generic.Prompt, line[:6] - yield start + 6, Text, line[6:] - output = False - error = False - elif line.startswith(' ') and not output: - insertions.append((len(curcode), [(0, Text, line[:6])])) - curcode += line[6:] else: if curcode: yield from do_insertions( insertions, jllexer.get_tokens_unprocessed(curcode)) curcode = '' insertions = [] - if line.startswith('ERROR: ') or error: - yield start, Generic.Error, line - error = True - else: - yield start, Generic.Output, line - output = True - start += len(line) - - if curcode: + if line.startswith('ERROR: ') or error: + yield start, Generic.Error, line + error = True + else: + yield start, Generic.Output, line + output = True + start += len(line) + + if curcode: yield from do_insertions( insertions, jllexer.get_tokens_unprocessed(curcode)) diff --git a/contrib/python/Pygments/py3/pygments/lexers/jvm.py b/contrib/python/Pygments/py3/pygments/lexers/jvm.py index c940dc2086..4ffc5c7fdf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jvm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jvm.py @@ -20,7 +20,7 @@ from pygments import unistring as uni __all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer', 'GroovyLexer', 'IokeLexer', 'ClojureLexer', 'ClojureScriptLexer', 'KotlinLexer', 'XtendLexer', 'AspectJLexer', 'CeylonLexer', - 'PigLexer', 'GoloLexer', 'JasminLexer', 'SarlLexer'] + 'PigLexer', 'GoloLexer', 'JasminLexer', 'SarlLexer'] class JavaLexer(RegexLexer): @@ -63,8 +63,8 @@ class JavaLexer(RegexLexer): (r'(class|interface)\b', Keyword.Declaration, 'class'), (r'(var)(\s+)', bygroups(Keyword.Declaration, Text), 'var'), - (r'(import(?:\s+static)?)(\s+)', bygroups(Keyword.Namespace, Text), - 'import'), + (r'(import(?:\s+static)?)(\s+)', bygroups(Keyword.Namespace, Text), + 'import'), (r'"', String, 'string'), (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char), (r'(\.)((?:[^\W\d]|\$)[\w$]*)', bygroups(Punctuation, @@ -73,18 +73,18 @@ class JavaLexer(RegexLexer): (r'^(\s*)((?:[^\W\d]|\$)[\w$]*)(:)', bygroups(Text, Name.Label, Punctuation)), (r'([^\W\d]|\$)[\w$]*', Name), - (r'([0-9][0-9_]*\.([0-9][0-9_]*)?|' - r'\.[0-9][0-9_]*)' - r'([eE][+\-]?[0-9][0-9_]*)?[fFdD]?|' - r'[0-9][eE][+\-]?[0-9][0-9_]*[fFdD]?|' - r'[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFdD]|' - r'0[xX]([0-9a-fA-F][0-9a-fA-F_]*\.?|' - r'([0-9a-fA-F][0-9a-fA-F_]*)?\.[0-9a-fA-F][0-9a-fA-F_]*)' - r'[pP][+\-]?[0-9][0-9_]*[fFdD]?', Number.Float), - (r'0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?', Number.Hex), - (r'0[bB][01][01_]*[lL]?', Number.Bin), - (r'0[0-7_]+[lL]?', Number.Oct), - (r'0|[1-9][0-9_]*[lL]?', Number.Integer), + (r'([0-9][0-9_]*\.([0-9][0-9_]*)?|' + r'\.[0-9][0-9_]*)' + r'([eE][+\-]?[0-9][0-9_]*)?[fFdD]?|' + r'[0-9][eE][+\-]?[0-9][0-9_]*[fFdD]?|' + r'[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFdD]|' + r'0[xX]([0-9a-fA-F][0-9a-fA-F_]*\.?|' + r'([0-9a-fA-F][0-9a-fA-F_]*)?\.[0-9a-fA-F][0-9a-fA-F_]*)' + r'[pP][+\-]?[0-9][0-9_]*[fFdD]?', Number.Float), + (r'0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?', Number.Hex), + (r'0[bB][01][01_]*[lL]?', Number.Bin), + (r'0[0-7_]+[lL]?', Number.Oct), + (r'0|[1-9][0-9_]*[lL]?', Number.Integer), (r'[~^*!%&\[\]<>|+=/?-]', Operator), (r'[{}();:.,]', Punctuation), (r'\n', Text) @@ -645,14 +645,14 @@ class IokeLexer(RegexLexer): ], 'slashRegexp': [ - (r'(?<!\\)/[im-psux]*', String.Regex, '#pop'), + (r'(?<!\\)/[im-psux]*', String.Regex, '#pop'), include('interpolatableText'), (r'\\/', String.Regex), (r'[^/]', String.Regex) ], 'squareRegexp': [ - (r'(?<!\\)][im-psux]*', String.Regex, '#pop'), + (r'(?<!\\)][im-psux]*', String.Regex, '#pop'), include('interpolatableText'), (r'\\]', String.Regex), (r'[^\]]', String.Regex) @@ -880,7 +880,7 @@ class ClojureLexer(RegexLexer): # TODO / should divide keywords/symbols into namespace/rest # but that's hard, so just pretend / is part of the name - valid_name = r'(?!#)[\w!$%*+<=>?/.#|-]+' + valid_name = r'(?!#)[\w!$%*+<=>?/.#|-]+' tokens = { 'root': [ @@ -1096,13 +1096,13 @@ class KotlinLexer(RegexLexer): '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*') - kt_space_name = ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + - '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', + kt_space_name = ('@?[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + + '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc', 'Cf', 'Mn', 'Mc', 'Zs') + r'\'~!%^&*()+=|\[\]:;,.<>/\?-]*') - kt_id = '(' + kt_name + '|`' + kt_space_name + '`)' - + kt_id = '(' + kt_name + '|`' + kt_space_name + '`)' + modifiers = (r'actual|abstract|annotation|companion|const|crossinline|' r'data|enum|expect|external|final|infix|inline|inner|' r'internal|lateinit|noinline|open|operator|override|private|' @@ -1112,7 +1112,7 @@ class KotlinLexer(RegexLexer): 'root': [ # Whitespaces (r'[^\S\n]+', Text), - (r'\s+', Text), + (r'\s+', Text), (r'\\\n', Text), # line continuation (r'\n', Text), # Comments @@ -1182,16 +1182,16 @@ class KotlinLexer(RegexLexer): (r'(:)(\s+)(' + kt_id + ')', bygroups(Punctuation, Text, Name)), (r'<', Operator, 'generic'), (r'\)', Punctuation, '#pop') - ], + ], 'function': [ (r'<', Operator, 'generic'), (r'' + kt_id + r'(\.)' + kt_id, bygroups(Name, Punctuation, Name.Function), '#pop'), (kt_id, Name.Function, '#pop') ], - 'generic': [ + 'generic': [ (r'(>)(\s*)', bygroups(Operator, Text), '#pop'), (r':', Punctuation), - (r'(reified|out|in)\b', Keyword), + (r'(reified|out|in)\b', Keyword), (r',', Punctuation), (r'\s+', Text), (kt_id, Name) @@ -1229,7 +1229,7 @@ class KotlinLexer(RegexLexer): (r'\{', Punctuation, 'scope'), (r'\}', Punctuation, '#pop'), include('root') - ] + ] } @@ -1427,7 +1427,7 @@ class GoloLexer(RegexLexer): (r'-?\d[\d_]*L', Number.Integer.Long), (r'-?\d[\d_]*', Number.Integer), - (r'`?[a-zA-Z_][\w$]*', Name), + (r'`?[a-zA-Z_][\w$]*', Name), (r'@[a-zA-Z_][\w$.]*', Name.Decorator), (r'"""', String, combined('stringescape', 'triplestring')), @@ -1740,9 +1740,9 @@ class JasminLexer(RegexLexer): re.MULTILINE): score += 0.6 return min(score, 1.0) - - -class SarlLexer(RegexLexer): + + +class SarlLexer(RegexLexer): """ For `SARL <http://www.sarl.io>`_ source code. diff --git a/contrib/python/Pygments/py3/pygments/lexers/lisp.py b/contrib/python/Pygments/py3/pygments/lexers/lisp.py index 802bf94a86..5628e336ca 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/lisp.py +++ b/contrib/python/Pygments/py3/pygments/lexers/lisp.py @@ -17,8 +17,8 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ from pygments.lexers.python import PythonLexer __all__ = ['SchemeLexer', 'CommonLispLexer', 'HyLexer', 'RacketLexer', - 'NewLispLexer', 'EmacsLispLexer', 'ShenLexer', 'CPSALexer', - 'XtlangLexer', 'FennelLexer'] + 'NewLispLexer', 'EmacsLispLexer', 'ShenLexer', 'CPSALexer', + 'XtlangLexer', 'FennelLexer'] class SchemeLexer(RegexLexer): @@ -157,7 +157,7 @@ class SchemeLexer(RegexLexer): (r"(?<=#\()" + valid_name, Name.Variable, '#pop'), # highlight the builtins - (r"(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins), + (r"(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins), Name.Builtin, '#pop'), @@ -346,7 +346,7 @@ class CommonLispLexer(RegexLexer): (r'#\d+#', Operator), # read-time comment - (r'#+nil' + terminated + r'\s*\(', Comment.Preproc, 'commented-form'), + (r'#+nil' + terminated + r'\s*\(', Comment.Preproc, 'commented-form'), # read-time conditional (r'#[+-]', Operator), @@ -358,7 +358,7 @@ class CommonLispLexer(RegexLexer): (r'(t|nil)' + terminated, Name.Constant), # functions and variables - (r'\*' + symbol + r'\*', Name.Variable.Global), + (r'\*' + symbol + r'\*', Name.Variable.Global), (symbol, Name.Variable), # parentheses @@ -1274,7 +1274,7 @@ class RacketLexer(RegexLexer): _opening_parenthesis = r'[([{]' _closing_parenthesis = r'[)\]}]' _delimiters = r'()[\]{}",\'`;\s' - _symbol = r'(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters + _symbol = r'(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters _exact_decimal_prefix = r'(?:#e)?(?:#d)?(?:#e)?' _exponent = r'(?:[defls][-+]?\d+)' _inexact_simple_no_hashes = r'(?:\d+(?:/\d+|\.\d*)?|\.\d+)' @@ -1326,16 +1326,16 @@ class RacketLexer(RegexLexer): (_inexact_simple, _delimiters), Number.Float, '#pop'), # #b - (r'(?iu)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'), + (r'(?iu)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'), # #o - (r'(?iu)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'), + (r'(?iu)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'), # #x - (r'(?iu)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'), + (r'(?iu)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'), # #i is always inexact, i.e. float - (r'(?iu)(#d)?#i%s' % _symbol, Number.Float, '#pop'), + (r'(?iu)(#d)?#i%s' % _symbol, Number.Float, '#pop'), # Strings and characters (r'#?"', String.Double, ('#pop', 'string')), @@ -1348,7 +1348,7 @@ class RacketLexer(RegexLexer): (r'#(true|false|[tTfF])', Name.Constant, '#pop'), # Keyword argument names (e.g. #:keyword) - (r'(?u)#:%s' % _symbol, Keyword.Declaration, '#pop'), + (r'(?u)#:%s' % _symbol, Keyword.Declaration, '#pop'), # Reader extensions (r'(#lang |#!)(\S+)', @@ -1425,14 +1425,14 @@ class RacketLexer(RegexLexer): class NewLispLexer(RegexLexer): """ - For `newLISP. <http://www.newlisp.org/>`_ source code (version 10.3.0). + For `newLISP. <http://www.newlisp.org/>`_ source code (version 10.3.0). .. versionadded:: 1.5 """ name = 'NewLisp' aliases = ['newlisp'] - filenames = ['*.lsp', '*.nl', '*.kif'] + filenames = ['*.lsp', '*.nl', '*.kif'] mimetypes = ['text/x-newlisp', 'application/x-newlisp'] flags = re.IGNORECASE | re.MULTILINE | re.UNICODE @@ -2180,7 +2180,7 @@ class EmacsLispLexer(RegexLexer): (r'(t|nil)' + terminated, Name.Constant), # functions and variables - (r'\*' + symbol + r'\*', Name.Variable.Global), + (r'\*' + symbol + r'\*', Name.Variable.Global), (symbol, Name.Variable), # parentheses @@ -2210,52 +2210,52 @@ class ShenLexer(RegexLexer): filenames = ['*.shen'] mimetypes = ['text/x-shen', 'application/x-shen'] - DECLARATIONS = ( - 'datatype', 'define', 'defmacro', 'defprolog', 'defcc', - 'synonyms', 'declare', 'package', 'type', 'function', - ) - - SPECIAL_FORMS = ( - 'lambda', 'get', 'let', 'if', 'cases', 'cond', 'put', 'time', 'freeze', - 'value', 'load', '$', 'protect', 'or', 'and', 'not', 'do', 'output', - 'prolog?', 'trap-error', 'error', 'make-string', '/.', 'set', '@p', - '@s', '@v', - ) - - BUILTINS = ( - '==', '=', '*', '+', '-', '/', '<', '>', '>=', '<=', '<-address', - '<-vector', 'abort', 'absvector', 'absvector?', 'address->', 'adjoin', - 'append', 'arity', 'assoc', 'bind', 'boolean?', 'bound?', 'call', 'cd', - 'close', 'cn', 'compile', 'concat', 'cons', 'cons?', 'cut', 'destroy', - 'difference', 'element?', 'empty?', 'enable-type-theory', - 'error-to-string', 'eval', 'eval-kl', 'exception', 'explode', 'external', - 'fail', 'fail-if', 'file', 'findall', 'fix', 'fst', 'fwhen', 'gensym', - 'get-time', 'hash', 'hd', 'hdstr', 'hdv', 'head', 'identical', - 'implementation', 'in', 'include', 'include-all-but', 'inferences', - 'input', 'input+', 'integer?', 'intern', 'intersection', 'is', 'kill', - 'language', 'length', 'limit', 'lineread', 'loaded', 'macro', 'macroexpand', - 'map', 'mapcan', 'maxinferences', 'mode', 'n->string', 'nl', 'nth', 'null', - 'number?', 'occurrences', 'occurs-check', 'open', 'os', 'out', 'port', - 'porters', 'pos', 'pr', 'preclude', 'preclude-all-but', 'print', 'profile', - 'profile-results', 'ps', 'quit', 'read', 'read+', 'read-byte', 'read-file', - 'read-file-as-bytelist', 'read-file-as-string', 'read-from-string', - 'release', 'remove', 'return', 'reverse', 'run', 'save', 'set', - 'simple-error', 'snd', 'specialise', 'spy', 'step', 'stinput', 'stoutput', - 'str', 'string->n', 'string->symbol', 'string?', 'subst', 'symbol?', - 'systemf', 'tail', 'tc', 'tc?', 'thaw', 'tl', 'tlstr', 'tlv', 'track', - 'tuple?', 'undefmacro', 'unify', 'unify!', 'union', 'unprofile', - 'unspecialise', 'untrack', 'variable?', 'vector', 'vector->', 'vector?', - 'verified', 'version', 'warn', 'when', 'write-byte', 'write-to-file', - 'y-or-n?', - ) - - BUILTINS_ANYWHERE = ('where', 'skip', '>>', '_', '!', '<e>', '<!>') + DECLARATIONS = ( + 'datatype', 'define', 'defmacro', 'defprolog', 'defcc', + 'synonyms', 'declare', 'package', 'type', 'function', + ) + + SPECIAL_FORMS = ( + 'lambda', 'get', 'let', 'if', 'cases', 'cond', 'put', 'time', 'freeze', + 'value', 'load', '$', 'protect', 'or', 'and', 'not', 'do', 'output', + 'prolog?', 'trap-error', 'error', 'make-string', '/.', 'set', '@p', + '@s', '@v', + ) + + BUILTINS = ( + '==', '=', '*', '+', '-', '/', '<', '>', '>=', '<=', '<-address', + '<-vector', 'abort', 'absvector', 'absvector?', 'address->', 'adjoin', + 'append', 'arity', 'assoc', 'bind', 'boolean?', 'bound?', 'call', 'cd', + 'close', 'cn', 'compile', 'concat', 'cons', 'cons?', 'cut', 'destroy', + 'difference', 'element?', 'empty?', 'enable-type-theory', + 'error-to-string', 'eval', 'eval-kl', 'exception', 'explode', 'external', + 'fail', 'fail-if', 'file', 'findall', 'fix', 'fst', 'fwhen', 'gensym', + 'get-time', 'hash', 'hd', 'hdstr', 'hdv', 'head', 'identical', + 'implementation', 'in', 'include', 'include-all-but', 'inferences', + 'input', 'input+', 'integer?', 'intern', 'intersection', 'is', 'kill', + 'language', 'length', 'limit', 'lineread', 'loaded', 'macro', 'macroexpand', + 'map', 'mapcan', 'maxinferences', 'mode', 'n->string', 'nl', 'nth', 'null', + 'number?', 'occurrences', 'occurs-check', 'open', 'os', 'out', 'port', + 'porters', 'pos', 'pr', 'preclude', 'preclude-all-but', 'print', 'profile', + 'profile-results', 'ps', 'quit', 'read', 'read+', 'read-byte', 'read-file', + 'read-file-as-bytelist', 'read-file-as-string', 'read-from-string', + 'release', 'remove', 'return', 'reverse', 'run', 'save', 'set', + 'simple-error', 'snd', 'specialise', 'spy', 'step', 'stinput', 'stoutput', + 'str', 'string->n', 'string->symbol', 'string?', 'subst', 'symbol?', + 'systemf', 'tail', 'tc', 'tc?', 'thaw', 'tl', 'tlstr', 'tlv', 'track', + 'tuple?', 'undefmacro', 'unify', 'unify!', 'union', 'unprofile', + 'unspecialise', 'untrack', 'variable?', 'vector', 'vector->', 'vector?', + 'verified', 'version', 'warn', 'when', 'write-byte', 'write-to-file', + 'y-or-n?', + ) + + BUILTINS_ANYWHERE = ('where', 'skip', '>>', '_', '!', '<e>', '<!>') MAPPINGS = {s: Keyword for s in DECLARATIONS} MAPPINGS.update((s, Name.Builtin) for s in BUILTINS) MAPPINGS.update((s, Keyword) for s in SPECIAL_FORMS) - valid_symbol_chars = r'[\w!$%*+,<=>?/.\'@&#:-]' + valid_symbol_chars = r'[\w!$%*+,<=>?/.\'@&#:-]' valid_name = '%s+' % valid_symbol_chars symbol_name = r'[a-z!$%%*+,<=>?/.\'@&#_-]%s*' % valid_symbol_chars variable = r'[A-Z]%s*' % valid_symbol_chars @@ -2351,13 +2351,13 @@ class ShenLexer(RegexLexer): token = Name.Function if token == Literal else token yield index, token, value - return + return def _process_signature(self, tokens): for index, token, value in tokens: if token == Literal and value == '}': yield index, Punctuation, value - return + return elif token in (Literal, Name.Function): token = Name.Variable if value.istitle() else Keyword.Type yield index, token, value @@ -2389,7 +2389,7 @@ class CPSALexer(RegexLexer): # valid names for identifiers # well, names can only not consist fully of numbers # but this should be good enough for now - valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+' + valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+' tokens = { 'root': [ @@ -2410,7 +2410,7 @@ class CPSALexer(RegexLexer): # strings, symbols and characters (r'"(\\\\|\\[^\\]|[^"\\])*"', String), (r"'" + valid_name, String.Symbol), - (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), + (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), # constants (r'(#t|#f)', Name.Constant), @@ -2439,226 +2439,226 @@ class CPSALexer(RegexLexer): (r'(\[|\])', Punctuation), ], } - - -class XtlangLexer(RegexLexer): - """An xtlang lexer for the `Extempore programming environment - <http://extempore.moso.com.au>`_. - - This is a mixture of Scheme and xtlang, really. Keyword lists are - taken from the Extempore Emacs mode - (https://github.com/extemporelang/extempore-emacs-mode) - - .. versionadded:: 2.2 - """ - name = 'xtlang' - aliases = ['extempore'] - filenames = ['*.xtm'] - mimetypes = [] - - common_keywords = ( - 'lambda', 'define', 'if', 'else', 'cond', 'and', - 'or', 'let', 'begin', 'set!', 'map', 'for-each', - ) - scheme_keywords = ( - 'do', 'delay', 'quasiquote', 'unquote', 'unquote-splicing', 'eval', - 'case', 'let*', 'letrec', 'quote', - ) - xtlang_bind_keywords = ( - 'bind-func', 'bind-val', 'bind-lib', 'bind-type', 'bind-alias', - 'bind-poly', 'bind-dylib', 'bind-lib-func', 'bind-lib-val', - ) - xtlang_keywords = ( - 'letz', 'memzone', 'cast', 'convert', 'dotimes', 'doloop', - ) - common_functions = ( - '*', '+', '-', '/', '<', '<=', '=', '>', '>=', '%', 'abs', 'acos', - 'angle', 'append', 'apply', 'asin', 'assoc', 'assq', 'assv', - 'atan', 'boolean?', 'caaaar', 'caaadr', 'caaar', 'caadar', - 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr', 'cadar', - 'caddar', 'cadddr', 'caddr', 'cadr', 'car', 'cdaaar', - 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar', - 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', - 'cddr', 'cdr', 'ceiling', 'cons', 'cos', 'floor', 'length', - 'list', 'log', 'max', 'member', 'min', 'modulo', 'not', - 'reverse', 'round', 'sin', 'sqrt', 'substring', 'tan', - 'println', 'random', 'null?', 'callback', 'now', - ) - scheme_functions = ( - 'call-with-current-continuation', 'call-with-input-file', - 'call-with-output-file', 'call-with-values', 'call/cc', - 'char->integer', 'char-alphabetic?', 'char-ci<=?', 'char-ci<?', - 'char-ci=?', 'char-ci>=?', 'char-ci>?', 'char-downcase', - 'char-lower-case?', 'char-numeric?', 'char-ready?', - 'char-upcase', 'char-upper-case?', 'char-whitespace?', - 'char<=?', 'char<?', 'char=?', 'char>=?', 'char>?', 'char?', - 'close-input-port', 'close-output-port', 'complex?', - 'current-input-port', 'current-output-port', 'denominator', - 'display', 'dynamic-wind', 'eof-object?', 'eq?', 'equal?', - 'eqv?', 'even?', 'exact->inexact', 'exact?', 'exp', 'expt', - 'force', 'gcd', 'imag-part', 'inexact->exact', 'inexact?', - 'input-port?', 'integer->char', 'integer?', - 'interaction-environment', 'lcm', 'list->string', - 'list->vector', 'list-ref', 'list-tail', 'list?', 'load', - 'magnitude', 'make-polar', 'make-rectangular', 'make-string', - 'make-vector', 'memq', 'memv', 'negative?', 'newline', - 'null-environment', 'number->string', 'number?', - 'numerator', 'odd?', 'open-input-file', 'open-output-file', - 'output-port?', 'pair?', 'peek-char', 'port?', 'positive?', - 'procedure?', 'quotient', 'rational?', 'rationalize', 'read', - 'read-char', 'real-part', 'real?', - 'remainder', 'scheme-report-environment', 'set-car!', 'set-cdr!', - 'string', 'string->list', 'string->number', 'string->symbol', - 'string-append', 'string-ci<=?', 'string-ci<?', 'string-ci=?', - 'string-ci>=?', 'string-ci>?', 'string-copy', 'string-fill!', - 'string-length', 'string-ref', 'string-set!', 'string<=?', - 'string<?', 'string=?', 'string>=?', 'string>?', 'string?', - 'symbol->string', 'symbol?', 'transcript-off', 'transcript-on', - 'truncate', 'values', 'vector', 'vector->list', 'vector-fill!', - 'vector-length', 'vector?', - 'with-input-from-file', 'with-output-to-file', 'write', - 'write-char', 'zero?', - ) - xtlang_functions = ( - 'toString', 'afill!', 'pfill!', 'tfill!', 'tbind', 'vfill!', - 'array-fill!', 'pointer-fill!', 'tuple-fill!', 'vector-fill!', 'free', - 'array', 'tuple', 'list', '~', 'cset!', 'cref', '&', 'bor', - 'ang-names', '<<', '>>', 'nil', 'printf', 'sprintf', 'null', 'now', - 'pset!', 'pref-ptr', 'vset!', 'vref', 'aset!', 'aref', 'aref-ptr', - 'tset!', 'tref', 'tref-ptr', 'salloc', 'halloc', 'zalloc', 'alloc', - 'schedule', 'exp', 'log', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', - 'sqrt', 'expt', 'floor', 'ceiling', 'truncate', 'round', - 'llvm_printf', 'push_zone', 'pop_zone', 'memzone', 'callback', - 'llvm_sprintf', 'make-array', 'array-set!', 'array-ref', - 'array-ref-ptr', 'pointer-set!', 'pointer-ref', 'pointer-ref-ptr', - 'stack-alloc', 'heap-alloc', 'zone-alloc', 'make-tuple', 'tuple-set!', - 'tuple-ref', 'tuple-ref-ptr', 'closure-set!', 'closure-ref', 'pref', - 'pdref', 'impc_null', 'bitcast', 'void', 'ifret', 'ret->', 'clrun->', - 'make-env-zone', 'make-env', '<>', 'dtof', 'ftod', 'i1tof', - 'i1tod', 'i1toi8', 'i1toi32', 'i1toi64', 'i8tof', 'i8tod', - 'i8toi1', 'i8toi32', 'i8toi64', 'i32tof', 'i32tod', 'i32toi1', - 'i32toi8', 'i32toi64', 'i64tof', 'i64tod', 'i64toi1', - 'i64toi8', 'i64toi32', - ) - - # valid names for Scheme identifiers (names cannot consist fully - # of numbers, but this should be good enough for now) - valid_scheme_name = r'[\w!$%&*+,/:<=>?@^~|-]+' - - # valid characters in xtlang names & types - valid_xtlang_name = r'[\w.!-]+' - valid_xtlang_type = r'[]{}[\w<>,*/|!-]+' - - tokens = { - # keep track of when we're exiting the xtlang form - 'xtlang': [ - (r'\(', Punctuation, '#push'), - (r'\)', Punctuation, '#pop'), - - (r'(?<=bind-func\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-val\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-type\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-alias\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-poly\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-lib\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-dylib\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-lib-func\s)' + valid_xtlang_name, Name.Function), - (r'(?<=bind-lib-val\s)' + valid_xtlang_name, Name.Function), - - # type annotations - (r':' + valid_xtlang_type, Keyword.Type), - - # types - (r'(<' + valid_xtlang_type + r'>|\|' + valid_xtlang_type + r'\||/' + - valid_xtlang_type + r'/|' + valid_xtlang_type + r'\*)\**', - Keyword.Type), - - # keywords - (words(xtlang_keywords, prefix=r'(?<=\()'), Keyword), - - # builtins - (words(xtlang_functions, prefix=r'(?<=\()'), Name.Function), - - include('common'), - - # variables - (valid_xtlang_name, Name.Variable), - ], - 'scheme': [ - # quoted symbols - (r"'" + valid_scheme_name, String.Symbol), - - # char literals - (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), - - # special operators - (r"('|#|`|,@|,|\.)", Operator), - - # keywords - (words(scheme_keywords, prefix=r'(?<=\()'), Keyword), - - # builtins - (words(scheme_functions, prefix=r'(?<=\()'), Name.Function), - - include('common'), - - # variables - (valid_scheme_name, Name.Variable), - ], - # common to both xtlang and Scheme - 'common': [ - # comments - (r';.*$', Comment.Single), - - # whitespaces - usually not relevant - (r'\s+', Text), - - # numbers - (r'-?\d+\.\d+', Number.Float), - (r'-?\d+', Number.Integer), - - # binary/oct/hex literals - (r'(#b|#o|#x)[\d.]+', Number), - - # strings + + +class XtlangLexer(RegexLexer): + """An xtlang lexer for the `Extempore programming environment + <http://extempore.moso.com.au>`_. + + This is a mixture of Scheme and xtlang, really. Keyword lists are + taken from the Extempore Emacs mode + (https://github.com/extemporelang/extempore-emacs-mode) + + .. versionadded:: 2.2 + """ + name = 'xtlang' + aliases = ['extempore'] + filenames = ['*.xtm'] + mimetypes = [] + + common_keywords = ( + 'lambda', 'define', 'if', 'else', 'cond', 'and', + 'or', 'let', 'begin', 'set!', 'map', 'for-each', + ) + scheme_keywords = ( + 'do', 'delay', 'quasiquote', 'unquote', 'unquote-splicing', 'eval', + 'case', 'let*', 'letrec', 'quote', + ) + xtlang_bind_keywords = ( + 'bind-func', 'bind-val', 'bind-lib', 'bind-type', 'bind-alias', + 'bind-poly', 'bind-dylib', 'bind-lib-func', 'bind-lib-val', + ) + xtlang_keywords = ( + 'letz', 'memzone', 'cast', 'convert', 'dotimes', 'doloop', + ) + common_functions = ( + '*', '+', '-', '/', '<', '<=', '=', '>', '>=', '%', 'abs', 'acos', + 'angle', 'append', 'apply', 'asin', 'assoc', 'assq', 'assv', + 'atan', 'boolean?', 'caaaar', 'caaadr', 'caaar', 'caadar', + 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr', 'cadar', + 'caddar', 'cadddr', 'caddr', 'cadr', 'car', 'cdaaar', + 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar', + 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', + 'cddr', 'cdr', 'ceiling', 'cons', 'cos', 'floor', 'length', + 'list', 'log', 'max', 'member', 'min', 'modulo', 'not', + 'reverse', 'round', 'sin', 'sqrt', 'substring', 'tan', + 'println', 'random', 'null?', 'callback', 'now', + ) + scheme_functions = ( + 'call-with-current-continuation', 'call-with-input-file', + 'call-with-output-file', 'call-with-values', 'call/cc', + 'char->integer', 'char-alphabetic?', 'char-ci<=?', 'char-ci<?', + 'char-ci=?', 'char-ci>=?', 'char-ci>?', 'char-downcase', + 'char-lower-case?', 'char-numeric?', 'char-ready?', + 'char-upcase', 'char-upper-case?', 'char-whitespace?', + 'char<=?', 'char<?', 'char=?', 'char>=?', 'char>?', 'char?', + 'close-input-port', 'close-output-port', 'complex?', + 'current-input-port', 'current-output-port', 'denominator', + 'display', 'dynamic-wind', 'eof-object?', 'eq?', 'equal?', + 'eqv?', 'even?', 'exact->inexact', 'exact?', 'exp', 'expt', + 'force', 'gcd', 'imag-part', 'inexact->exact', 'inexact?', + 'input-port?', 'integer->char', 'integer?', + 'interaction-environment', 'lcm', 'list->string', + 'list->vector', 'list-ref', 'list-tail', 'list?', 'load', + 'magnitude', 'make-polar', 'make-rectangular', 'make-string', + 'make-vector', 'memq', 'memv', 'negative?', 'newline', + 'null-environment', 'number->string', 'number?', + 'numerator', 'odd?', 'open-input-file', 'open-output-file', + 'output-port?', 'pair?', 'peek-char', 'port?', 'positive?', + 'procedure?', 'quotient', 'rational?', 'rationalize', 'read', + 'read-char', 'real-part', 'real?', + 'remainder', 'scheme-report-environment', 'set-car!', 'set-cdr!', + 'string', 'string->list', 'string->number', 'string->symbol', + 'string-append', 'string-ci<=?', 'string-ci<?', 'string-ci=?', + 'string-ci>=?', 'string-ci>?', 'string-copy', 'string-fill!', + 'string-length', 'string-ref', 'string-set!', 'string<=?', + 'string<?', 'string=?', 'string>=?', 'string>?', 'string?', + 'symbol->string', 'symbol?', 'transcript-off', 'transcript-on', + 'truncate', 'values', 'vector', 'vector->list', 'vector-fill!', + 'vector-length', 'vector?', + 'with-input-from-file', 'with-output-to-file', 'write', + 'write-char', 'zero?', + ) + xtlang_functions = ( + 'toString', 'afill!', 'pfill!', 'tfill!', 'tbind', 'vfill!', + 'array-fill!', 'pointer-fill!', 'tuple-fill!', 'vector-fill!', 'free', + 'array', 'tuple', 'list', '~', 'cset!', 'cref', '&', 'bor', + 'ang-names', '<<', '>>', 'nil', 'printf', 'sprintf', 'null', 'now', + 'pset!', 'pref-ptr', 'vset!', 'vref', 'aset!', 'aref', 'aref-ptr', + 'tset!', 'tref', 'tref-ptr', 'salloc', 'halloc', 'zalloc', 'alloc', + 'schedule', 'exp', 'log', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', + 'sqrt', 'expt', 'floor', 'ceiling', 'truncate', 'round', + 'llvm_printf', 'push_zone', 'pop_zone', 'memzone', 'callback', + 'llvm_sprintf', 'make-array', 'array-set!', 'array-ref', + 'array-ref-ptr', 'pointer-set!', 'pointer-ref', 'pointer-ref-ptr', + 'stack-alloc', 'heap-alloc', 'zone-alloc', 'make-tuple', 'tuple-set!', + 'tuple-ref', 'tuple-ref-ptr', 'closure-set!', 'closure-ref', 'pref', + 'pdref', 'impc_null', 'bitcast', 'void', 'ifret', 'ret->', 'clrun->', + 'make-env-zone', 'make-env', '<>', 'dtof', 'ftod', 'i1tof', + 'i1tod', 'i1toi8', 'i1toi32', 'i1toi64', 'i8tof', 'i8tod', + 'i8toi1', 'i8toi32', 'i8toi64', 'i32tof', 'i32tod', 'i32toi1', + 'i32toi8', 'i32toi64', 'i64tof', 'i64tod', 'i64toi1', + 'i64toi8', 'i64toi32', + ) + + # valid names for Scheme identifiers (names cannot consist fully + # of numbers, but this should be good enough for now) + valid_scheme_name = r'[\w!$%&*+,/:<=>?@^~|-]+' + + # valid characters in xtlang names & types + valid_xtlang_name = r'[\w.!-]+' + valid_xtlang_type = r'[]{}[\w<>,*/|!-]+' + + tokens = { + # keep track of when we're exiting the xtlang form + 'xtlang': [ + (r'\(', Punctuation, '#push'), + (r'\)', Punctuation, '#pop'), + + (r'(?<=bind-func\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-val\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-type\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-alias\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-poly\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-lib\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-dylib\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-lib-func\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-lib-val\s)' + valid_xtlang_name, Name.Function), + + # type annotations + (r':' + valid_xtlang_type, Keyword.Type), + + # types + (r'(<' + valid_xtlang_type + r'>|\|' + valid_xtlang_type + r'\||/' + + valid_xtlang_type + r'/|' + valid_xtlang_type + r'\*)\**', + Keyword.Type), + + # keywords + (words(xtlang_keywords, prefix=r'(?<=\()'), Keyword), + + # builtins + (words(xtlang_functions, prefix=r'(?<=\()'), Name.Function), + + include('common'), + + # variables + (valid_xtlang_name, Name.Variable), + ], + 'scheme': [ + # quoted symbols + (r"'" + valid_scheme_name, String.Symbol), + + # char literals + (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), + + # special operators + (r"('|#|`|,@|,|\.)", Operator), + + # keywords + (words(scheme_keywords, prefix=r'(?<=\()'), Keyword), + + # builtins + (words(scheme_functions, prefix=r'(?<=\()'), Name.Function), + + include('common'), + + # variables + (valid_scheme_name, Name.Variable), + ], + # common to both xtlang and Scheme + 'common': [ + # comments + (r';.*$', Comment.Single), + + # whitespaces - usually not relevant + (r'\s+', Text), + + # numbers + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + + # binary/oct/hex literals + (r'(#b|#o|#x)[\d.]+', Number), + + # strings (r'"(\\\\|\\[^\\]|[^"\\])*"', String), - - # true/false constants - (r'(#t|#f)', Name.Constant), - - # keywords - (words(common_keywords, prefix=r'(?<=\()'), Keyword), - - # builtins - (words(common_functions, prefix=r'(?<=\()'), Name.Function), - - # the famous parentheses! - (r'(\(|\))', Punctuation), - ], - 'root': [ - # go into xtlang mode - (words(xtlang_bind_keywords, prefix=r'(?<=\()', suffix=r'\b'), - Keyword, 'xtlang'), - - include('scheme') - ], - } - - -class FennelLexer(RegexLexer): - """A lexer for the `Fennel programming language <https://fennel-lang.org>`_. - - Fennel compiles to Lua, so all the Lua builtins are recognized as well - as the special forms that are particular to the Fennel compiler. - - .. versionadded:: 2.3 - """ - name = 'Fennel' - aliases = ['fennel', 'fnl'] - filenames = ['*.fnl'] - + + # true/false constants + (r'(#t|#f)', Name.Constant), + + # keywords + (words(common_keywords, prefix=r'(?<=\()'), Keyword), + + # builtins + (words(common_functions, prefix=r'(?<=\()'), Name.Function), + + # the famous parentheses! + (r'(\(|\))', Punctuation), + ], + 'root': [ + # go into xtlang mode + (words(xtlang_bind_keywords, prefix=r'(?<=\()', suffix=r'\b'), + Keyword, 'xtlang'), + + include('scheme') + ], + } + + +class FennelLexer(RegexLexer): + """A lexer for the `Fennel programming language <https://fennel-lang.org>`_. + + Fennel compiles to Lua, so all the Lua builtins are recognized as well + as the special forms that are particular to the Fennel compiler. + + .. versionadded:: 2.3 + """ + name = 'Fennel' + aliases = ['fennel', 'fnl'] + filenames = ['*.fnl'] + # this list is current as of Fennel version 0.10.0. - special_forms = ( + special_forms = ( '#', '%', '*', '+', '-', '->', '->>', '-?>', '-?>>', '.', '..', '/', '//', ':', '<', '<=', '=', '>', '>=', '?.', '^', 'accumulate', 'and', 'band', 'bnot', 'bor', 'bxor', 'collect', 'comment', 'do', 'doc', @@ -2667,13 +2667,13 @@ class FennelLexer(RegexLexer): 'macrodebug', 'match', 'not', 'not=', 'or', 'partial', 'pick-args', 'pick-values', 'quote', 'require-macros', 'rshift', 'set', 'set-forcibly!', 'tset', 'values', 'when', 'while', 'with-open', '~=' - ) - + ) + declarations = ( 'fn', 'global', 'lambda', 'local', 'macro', 'macros', 'var', 'λ' ) - builtins = ( + builtins = ( '_G', '_VERSION', 'arg', 'assert', 'bit32', 'collectgarbage', 'coroutine', 'debug', 'dofile', 'error', 'getfenv', 'getmetatable', 'io', 'ipairs', 'load', 'loadfile', 'loadstring', @@ -2681,47 +2681,47 @@ class FennelLexer(RegexLexer): 'rawequal', 'rawget', 'rawlen', 'rawset', 'require', 'select', 'setfenv', 'setmetatable', 'string', 'table', 'tonumber', 'tostring', 'type', 'unpack', 'xpcall' - ) - + ) + # based on the scheme definition, but disallowing leading digits and # commas, and @ is not allowed. valid_name = r'[a-zA-Z_!$%&*+/:<=>?^~|-][\w!$%&*+/:<=>?^~|\.-]*' - - tokens = { - 'root': [ - # the only comment form is a semicolon; goes to the end of the line - (r';.*$', Comment.Single), - - (r'[,\s]+', Text), - (r'-?\d+\.\d+', Number.Float), - (r'-?\d+', Number.Integer), - + + tokens = { + 'root': [ + # the only comment form is a semicolon; goes to the end of the line + (r';.*$', Comment.Single), + + (r'[,\s]+', Text), + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), - + (r'(true|false|nil)', Name.Constant), - # these are technically strings, but it's worth visually - # distinguishing them because their intent is different - # from regular strings. - (r':' + valid_name, String.Symbol), - - # special forms are keywords - (words(special_forms, suffix=' '), Keyword), + # these are technically strings, but it's worth visually + # distinguishing them because their intent is different + # from regular strings. + (r':' + valid_name, String.Symbol), + + # special forms are keywords + (words(special_forms, suffix=' '), Keyword), # these are ... even more special! (words(declarations, suffix=' '), Keyword.Declaration), - # lua standard library are builtins - (words(builtins, suffix=' '), Name.Builtin), - # special-case the vararg symbol - (r'\.\.\.', Name.Variable), - # regular identifiers - (valid_name, Name.Variable), - - # all your normal paired delimiters for your programming enjoyment - (r'(\(|\))', Punctuation), - (r'(\[|\])', Punctuation), - (r'(\{|\})', Punctuation), + # lua standard library are builtins + (words(builtins, suffix=' '), Name.Builtin), + # special-case the vararg symbol + (r'\.\.\.', Name.Variable), + # regular identifiers + (valid_name, Name.Variable), + + # all your normal paired delimiters for your programming enjoyment + (r'(\(|\))', Punctuation), + (r'(\[|\])', Punctuation), + (r'(\{|\})', Punctuation), # the # symbol is shorthand for a lambda function (r'#', Punctuation), - ] - } + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/make.py b/contrib/python/Pygments/py3/pygments/lexers/make.py index 7479a10cdf..3e317e819e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/make.py +++ b/contrib/python/Pygments/py3/pygments/lexers/make.py @@ -88,7 +88,7 @@ class BaseMakefileLexer(RegexLexer): bygroups(Keyword, Text), 'export'), (r'(?:un)?export\s+', Keyword), # assignment - (r'([\w${}().-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)', + (r'([\w${}().-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)', bygroups(Name.Variable, Text, Operator, Text, using(BashLexer))), # strings (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), @@ -100,8 +100,8 @@ class BaseMakefileLexer(RegexLexer): (r'\$\(', Keyword, 'expansion'), ], 'expansion': [ - (r'[^\w$().-]+', Text), - (r'[\w.-]+', Name.Variable), + (r'[^\w$().-]+', Text), + (r'[\w.-]+', Name.Variable), (r'\$', Keyword), (r'\(', Keyword, '#push'), (r'\)', Keyword, '#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/markup.py b/contrib/python/Pygments/py3/pygments/lexers/markup.py index 15b280961a..e1a8429ef0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/markup.py +++ b/contrib/python/Pygments/py3/pygments/lexers/markup.py @@ -494,49 +494,49 @@ class MozPreprocCssLexer(DelegatingLexer): def __init__(self, **options): super().__init__(CssLexer, MozPreprocPercentLexer, **options) - -class MarkdownLexer(RegexLexer): - """ - For `Markdown <https://help.github.com/categories/writing-on-github/>`_ markup. - - .. versionadded:: 2.2 - """ + +class MarkdownLexer(RegexLexer): + """ + For `Markdown <https://help.github.com/categories/writing-on-github/>`_ markup. + + .. versionadded:: 2.2 + """ name = 'Markdown' aliases = ['markdown', 'md'] filenames = ['*.md', '*.markdown'] - mimetypes = ["text/x-markdown"] - flags = re.MULTILINE - - def _handle_codeblock(self, match): - """ - match args: 1:backticks, 2:lang_name, 3:newline, 4:code, 5:backticks - """ - from pygments.lexers import get_lexer_by_name - - # section header + mimetypes = ["text/x-markdown"] + flags = re.MULTILINE + + def _handle_codeblock(self, match): + """ + match args: 1:backticks, 2:lang_name, 3:newline, 4:code, 5:backticks + """ + from pygments.lexers import get_lexer_by_name + + # section header yield match.start(1), String.Backtick, match.group(1) yield match.start(2), String.Backtick, match.group(2) yield match.start(3), Text , match.group(3) - - # lookup lexer if wanted and existing - lexer = None - if self.handlecodeblocks: - try: - lexer = get_lexer_by_name( match.group(2).strip() ) - except ClassNotFound: - pass - code = match.group(4) - - # no lexer for this language. handle it like it was a code block - if lexer is None: - yield match.start(4), String, code - else: + + # lookup lexer if wanted and existing + lexer = None + if self.handlecodeblocks: + try: + lexer = get_lexer_by_name( match.group(2).strip() ) + except ClassNotFound: + pass + code = match.group(4) + + # no lexer for this language. handle it like it was a code block + if lexer is None: + yield match.start(4), String, code + else: yield from do_insertions([], lexer.get_tokens_unprocessed(code)) - + yield match.start(5), String.Backtick, match.group(5) - - tokens = { - 'root': [ + + tokens = { + 'root': [ # heading with '#' prefix (atx-style) (r'(^#[^#].+)(\n)', bygroups(Generic.Heading, Text)), # subheading with '#' prefix (atx-style) @@ -545,27 +545,27 @@ class MarkdownLexer(RegexLexer): (r'^(.+)(\n)(=+)(\n)', bygroups(Generic.Heading, Text, Generic.Heading, Text)), # subheading with '-' underlines (Setext-style) (r'^(.+)(\n)(-+)(\n)', bygroups(Generic.Subheading, Text, Generic.Subheading, Text)), - # task list - (r'^(\s*)([*-] )(\[[ xX]\])( .+\n)', - bygroups(Text, Keyword, Keyword, using(this, state='inline'))), + # task list + (r'^(\s*)([*-] )(\[[ xX]\])( .+\n)', + bygroups(Text, Keyword, Keyword, using(this, state='inline'))), # bulleted list - (r'^(\s*)([*-])(\s)(.+\n)', - bygroups(Text, Keyword, Text, using(this, state='inline'))), + (r'^(\s*)([*-])(\s)(.+\n)', + bygroups(Text, Keyword, Text, using(this, state='inline'))), # numbered list - (r'^(\s*)([0-9]+\.)( .+\n)', - bygroups(Text, Keyword, using(this, state='inline'))), - # quote - (r'^(\s*>\s)(.+\n)', bygroups(Keyword, Generic.Emph)), + (r'^(\s*)([0-9]+\.)( .+\n)', + bygroups(Text, Keyword, using(this, state='inline'))), + # quote + (r'^(\s*>\s)(.+\n)', bygroups(Keyword, Generic.Emph)), # code block fenced by 3 backticks (r'^(\s*```\n[\w\W]*?^\s*```$\n)', String.Backtick), - # code block with language + # code block with language (r'^(\s*```)(\w+)(\n)([\w\W]*?)(^\s*```$\n)', _handle_codeblock), - - include('inline'), - ], - 'inline': [ - # escape - (r'\\.', Text), + + include('inline'), + ], + 'inline': [ + # escape + (r'\\.', Text), # inline code (r'([^`]?)(`[^`\n]+`)', bygroups(Text, String.Backtick)), # warning: the following rules eat outer tags. @@ -578,30 +578,30 @@ class MarkdownLexer(RegexLexer): (r'([^\*]?)(\*[^* \n][^*\n]*\*)', bygroups(Text, Generic.Emph)), # italics fenced by '_' (r'([^_]?)(_[^_ \n][^_\n]*_)', bygroups(Text, Generic.Emph)), - # strikethrough + # strikethrough (r'([^~]?)(~~[^~ \n][^~\n]*~~)', bygroups(Text, Generic.Deleted)), - # mentions and topics (twitter and github stuff) - (r'[@#][\w/:]+', Name.Entity), - # (image?) links eg: ![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png) + # mentions and topics (twitter and github stuff) + (r'[@#][\w/:]+', Name.Entity), + # (image?) links eg: ![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png) (r'(!?\[)([^]]+)(\])(\()([^)]+)(\))', bygroups(Text, Name.Tag, Text, Text, Name.Attribute, Text)), - # reference-style links, e.g.: - # [an example][id] - # [id]: http://example.com/ + # reference-style links, e.g.: + # [an example][id] + # [id]: http://example.com/ (r'(\[)([^]]+)(\])(\[)([^]]*)(\])', bygroups(Text, Name.Tag, Text, Text, Name.Label, Text)), (r'^(\s*\[)([^]]*)(\]:\s*)(.+)', bygroups(Text, Name.Label, Text, Name.Attribute)), - - # general text, must come last! - (r'[^\\\s]+', Text), - (r'.', Text), - ], - } - - def __init__(self, **options): - self.handlecodeblocks = get_bool_opt(options, 'handlecodeblocks', True) - RegexLexer.__init__(self, **options) + + # general text, must come last! + (r'[^\\\s]+', Text), + (r'.', Text), + ], + } + + def __init__(self, **options): + self.handlecodeblocks = get_bool_opt(options, 'handlecodeblocks', True) + RegexLexer.__init__(self, **options) class TiddlyWiki5Lexer(RegexLexer): diff --git a/contrib/python/Pygments/py3/pygments/lexers/ml.py b/contrib/python/Pygments/py3/pygments/lexers/ml.py index d5c225e68a..60bd8b9dbc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ml.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ml.py @@ -42,7 +42,7 @@ class SMLLexer(RegexLexer): symbolicid_reserved = { # Core - ':', r'\|', '=', '=>', '->', '#', + ':', r'\|', '=', '=>', '->', '#', # Modules ':>', } diff --git a/contrib/python/Pygments/py3/pygments/lexers/modeling.py b/contrib/python/Pygments/py3/pygments/lexers/modeling.py index d7d0a160e6..b00a7f10b3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/modeling.py +++ b/contrib/python/Pygments/py3/pygments/lexers/modeling.py @@ -12,7 +12,7 @@ import re from pygments.lexer import RegexLexer, include, bygroups, using, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Whitespace + Number, Punctuation, Whitespace from pygments.lexers.html import HtmlLexer from pygments.lexers import _stan_builtins @@ -283,8 +283,8 @@ class StanLexer(RegexLexer): """Pygments Lexer for Stan models. The Stan modeling language is specified in the *Stan Modeling Language - User's Guide and Reference Manual, v2.17.0*, - `pdf <https://github.com/stan-dev/stan/releases/download/v2.17.0/stan-reference-2.17.0.pdf>`__. + User's Guide and Reference Manual, v2.17.0*, + `pdf <https://github.com/stan-dev/stan/releases/download/v2.17.0/stan-reference-2.17.0.pdf>`__. .. versionadded:: 1.6 """ @@ -315,26 +315,26 @@ class StanLexer(RegexLexer): 'parameters', r'transformed\s+parameters', 'model', r'generated\s+quantities')), bygroups(Keyword.Namespace, Text, Punctuation)), - # target keyword - (r'target\s*\+=', Keyword), + # target keyword + (r'target\s*\+=', Keyword), # Reserved Words (r'(%s)\b' % r'|'.join(_stan_builtins.KEYWORDS), Keyword), # Truncation (r'T(?=\s*\[)', Keyword), # Data types (r'(%s)\b' % r'|'.join(_stan_builtins.TYPES), Keyword.Type), - # < should be punctuation, but elsewhere I can't tell if it is in - # a range constraint - (r'(<)(\s*)(upper|lower)(\s*)(=)', - bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)), - (r'(,)(\s*)(upper)(\s*)(=)', - bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)), + # < should be punctuation, but elsewhere I can't tell if it is in + # a range constraint + (r'(<)(\s*)(upper|lower)(\s*)(=)', + bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)), + (r'(,)(\s*)(upper)(\s*)(=)', + bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)), # Punctuation - (r"[;,\[\]()]", Punctuation), + (r"[;,\[\]()]", Punctuation), # Builtin - (r'(%s)(?=\s*\()' % '|'.join(_stan_builtins.FUNCTIONS), Name.Builtin), - (r'(~)(\s*)(%s)(?=\s*\()' % '|'.join(_stan_builtins.DISTRIBUTIONS), - bygroups(Operator, Whitespace, Name.Builtin)), + (r'(%s)(?=\s*\()' % '|'.join(_stan_builtins.FUNCTIONS), Name.Builtin), + (r'(~)(\s*)(%s)(?=\s*\()' % '|'.join(_stan_builtins.DISTRIBUTIONS), + bygroups(Operator, Whitespace, Name.Builtin)), # Special names ending in __, like lp__ (r'[A-Za-z]\w*__\b', Name.Builtin.Pseudo), (r'(%s)\b' % r'|'.join(_stan_builtins.RESERVED), Keyword.Reserved), @@ -343,18 +343,18 @@ class StanLexer(RegexLexer): # Regular variable names (r'[A-Za-z]\w*\b', Name), # Real Literals - (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float), - (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float), + (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float), + (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float), # Integer Literals - (r'[0-9]+', Number.Integer), + (r'[0-9]+', Number.Integer), # Assignment operators - (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator), + (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator), # Infix, prefix and postfix operators (and = ) - (r"\+|-|\.?\*|\.?/|\\|'|\^|!=?|<=?|>=?|\|\||&&|%|\?|:", Operator), + (r"\+|-|\.?\*|\.?/|\\|'|\^|!=?|<=?|>=?|\|\||&&|%|\?|:", Operator), # Block delimiters (r'[{}]', Punctuation), - # Distribution | - (r'\|', Punctuation) + # Distribution | + (r'\|', Punctuation) ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/modula2.py b/contrib/python/Pygments/py3/pygments/lexers/modula2.py index 5ecf78db5d..cad2f4fd40 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/modula2.py +++ b/contrib/python/Pygments/py3/pygments/lexers/modula2.py @@ -289,7 +289,7 @@ class Modula2Lexer(RegexLexer): ], 'unigraph_punctuation': [ # Common Punctuation - (r'[()\[\]{},.:;|]', Punctuation), + (r'[()\[\]{},.:;|]', Punctuation), # Case Label Separator Synonym (r'!', Punctuation), # ISO # Blueprint Punctuation diff --git a/contrib/python/Pygments/py3/pygments/lexers/monte.py b/contrib/python/Pygments/py3/pygments/lexers/monte.py index d3615d83c5..4cd83241dd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/monte.py +++ b/contrib/python/Pygments/py3/pygments/lexers/monte.py @@ -1,203 +1,203 @@ -""" - pygments.lexers.monte - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for the Monte programming language. - +""" + pygments.lexers.monte + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Monte programming language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.token import Comment, Error, Keyword, Name, Number, Operator, \ - Punctuation, String, Whitespace -from pygments.lexer import RegexLexer, include, words - -__all__ = ['MonteLexer'] - - -# `var` handled separately -# `interface` handled separately -_declarations = ['bind', 'def', 'fn', 'object'] -_methods = ['method', 'to'] -_keywords = [ - 'as', 'break', 'catch', 'continue', 'else', 'escape', 'exit', 'exports', - 'extends', 'finally', 'for', 'guards', 'if', 'implements', 'import', - 'in', 'match', 'meta', 'pass', 'return', 'switch', 'try', 'via', 'when', - 'while', -] -_operators = [ - # Unary - '~', '!', - # Binary - '+', '-', '*', '/', '%', '**', '&', '|', '^', '<<', '>>', - # Binary augmented - '+=', '-=', '*=', '/=', '%=', '**=', '&=', '|=', '^=', '<<=', '>>=', - # Comparison - '==', '!=', '<', '<=', '>', '>=', '<=>', - # Patterns and assignment - ':=', '?', '=~', '!~', '=>', - # Calls and sends - '.', '<-', '->', -] -_escape_pattern = ( - r'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|' - r'\\["\'\\bftnr])') -# _char = _escape_chars + [('.', String.Char)] -_identifier = r'[_a-zA-Z]\w*' - -_constants = [ - # Void constants - 'null', - # Bool constants - 'false', 'true', - # Double constants - 'Infinity', 'NaN', - # Special objects - 'M', 'Ref', 'throw', 'traceln', -] - -_guards = [ - 'Any', 'Binding', 'Bool', 'Bytes', 'Char', 'DeepFrozen', 'Double', - 'Empty', 'Int', 'List', 'Map', 'Near', 'NullOk', 'Same', 'Selfless', - 'Set', 'Str', 'SubrangeGuard', 'Transparent', 'Void', -] - -_safeScope = [ - '_accumulateList', '_accumulateMap', '_auditedBy', '_bind', - '_booleanFlow', '_comparer', '_equalizer', '_iterForever', '_loop', - '_makeBytes', '_makeDouble', '_makeFinalSlot', '_makeInt', '_makeList', - '_makeMap', '_makeMessageDesc', '_makeOrderedSpace', '_makeParamDesc', - '_makeProtocolDesc', '_makeSourceSpan', '_makeString', '_makeVarSlot', - '_makeVerbFacet', '_mapExtract', '_matchSame', '_quasiMatcher', - '_slotToBinding', '_splitList', '_suchThat', '_switchFailed', - '_validateFor', 'b__quasiParser', 'eval', 'import', 'm__quasiParser', - 'makeBrandPair', 'makeLazySlot', 'safeScope', 'simple__quasiParser', -] - - -class MonteLexer(RegexLexer): - """ - Lexer for the `Monte <https://monte.readthedocs.io/>`_ programming language. - - .. versionadded:: 2.2 - """ - name = 'Monte' - aliases = ['monte'] - filenames = ['*.mt'] - - tokens = { - 'root': [ - # Comments - (r'#[^\n]*\n', Comment), - - # Docstrings - # Apologies for the non-greedy matcher here. - (r'/\*\*.*?\*/', String.Doc), - - # `var` declarations - (r'\bvar\b', Keyword.Declaration, 'var'), - - # `interface` declarations - (r'\binterface\b', Keyword.Declaration, 'interface'), - - # method declarations - (words(_methods, prefix='\\b', suffix='\\b'), - Keyword, 'method'), - - # All other declarations - (words(_declarations, prefix='\\b', suffix='\\b'), - Keyword.Declaration), - - # Keywords - (words(_keywords, prefix='\\b', suffix='\\b'), Keyword), - - # Literals - ('[+-]?0x[_0-9a-fA-F]+', Number.Hex), - (r'[+-]?[_0-9]+\.[_0-9]*([eE][+-]?[_0-9]+)?', Number.Float), - ('[+-]?[_0-9]+', Number.Integer), - ("'", String.Double, 'char'), - ('"', String.Double, 'string'), - - # Quasiliterals - ('`', String.Backtick, 'ql'), - - # Operators - (words(_operators), Operator), - - # Verb operators - (_identifier + '=', Operator.Word), - - # Safe scope constants - (words(_constants, prefix='\\b', suffix='\\b'), - Keyword.Pseudo), - - # Safe scope guards - (words(_guards, prefix='\\b', suffix='\\b'), Keyword.Type), - - # All other safe scope names - (words(_safeScope, prefix='\\b', suffix='\\b'), - Name.Builtin), - - # Identifiers - (_identifier, Name), - - # Punctuation - (r'\(|\)|\{|\}|\[|\]|:|,', Punctuation), - - # Whitespace - (' +', Whitespace), - - # Definite lexer errors - ('=', Error), - ], - 'char': [ - # It is definitely an error to have a char of width == 0. - ("'", Error, 'root'), - (_escape_pattern, String.Escape, 'charEnd'), - ('.', String.Char, 'charEnd'), - ], - 'charEnd': [ - ("'", String.Char, '#pop:2'), - # It is definitely an error to have a char of width > 1. - ('.', Error), - ], - # The state of things coming into an interface. - 'interface': [ - (' +', Whitespace), - (_identifier, Name.Class, '#pop'), - include('root'), - ], - # The state of things coming into a method. - 'method': [ - (' +', Whitespace), - (_identifier, Name.Function, '#pop'), - include('root'), - ], - 'string': [ - ('"', String.Double, 'root'), - (_escape_pattern, String.Escape), - (r'\n', String.Double), - ('.', String.Double), - ], - 'ql': [ - ('`', String.Backtick, 'root'), - (r'\$' + _escape_pattern, String.Escape), - (r'\$\$', String.Escape), - (r'@@', String.Escape), - (r'\$\{', String.Interpol, 'qlNest'), - (r'@\{', String.Interpol, 'qlNest'), - (r'\$' + _identifier, Name), - ('@' + _identifier, Name), - ('.', String.Backtick), - ], - 'qlNest': [ - (r'\}', String.Interpol, '#pop'), - include('root'), - ], - # The state of things immediately following `var`. - 'var': [ - (' +', Whitespace), - (_identifier, Name.Variable, '#pop'), - include('root'), - ], - } + :license: BSD, see LICENSE for details. +""" + +from pygments.token import Comment, Error, Keyword, Name, Number, Operator, \ + Punctuation, String, Whitespace +from pygments.lexer import RegexLexer, include, words + +__all__ = ['MonteLexer'] + + +# `var` handled separately +# `interface` handled separately +_declarations = ['bind', 'def', 'fn', 'object'] +_methods = ['method', 'to'] +_keywords = [ + 'as', 'break', 'catch', 'continue', 'else', 'escape', 'exit', 'exports', + 'extends', 'finally', 'for', 'guards', 'if', 'implements', 'import', + 'in', 'match', 'meta', 'pass', 'return', 'switch', 'try', 'via', 'when', + 'while', +] +_operators = [ + # Unary + '~', '!', + # Binary + '+', '-', '*', '/', '%', '**', '&', '|', '^', '<<', '>>', + # Binary augmented + '+=', '-=', '*=', '/=', '%=', '**=', '&=', '|=', '^=', '<<=', '>>=', + # Comparison + '==', '!=', '<', '<=', '>', '>=', '<=>', + # Patterns and assignment + ':=', '?', '=~', '!~', '=>', + # Calls and sends + '.', '<-', '->', +] +_escape_pattern = ( + r'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|' + r'\\["\'\\bftnr])') +# _char = _escape_chars + [('.', String.Char)] +_identifier = r'[_a-zA-Z]\w*' + +_constants = [ + # Void constants + 'null', + # Bool constants + 'false', 'true', + # Double constants + 'Infinity', 'NaN', + # Special objects + 'M', 'Ref', 'throw', 'traceln', +] + +_guards = [ + 'Any', 'Binding', 'Bool', 'Bytes', 'Char', 'DeepFrozen', 'Double', + 'Empty', 'Int', 'List', 'Map', 'Near', 'NullOk', 'Same', 'Selfless', + 'Set', 'Str', 'SubrangeGuard', 'Transparent', 'Void', +] + +_safeScope = [ + '_accumulateList', '_accumulateMap', '_auditedBy', '_bind', + '_booleanFlow', '_comparer', '_equalizer', '_iterForever', '_loop', + '_makeBytes', '_makeDouble', '_makeFinalSlot', '_makeInt', '_makeList', + '_makeMap', '_makeMessageDesc', '_makeOrderedSpace', '_makeParamDesc', + '_makeProtocolDesc', '_makeSourceSpan', '_makeString', '_makeVarSlot', + '_makeVerbFacet', '_mapExtract', '_matchSame', '_quasiMatcher', + '_slotToBinding', '_splitList', '_suchThat', '_switchFailed', + '_validateFor', 'b__quasiParser', 'eval', 'import', 'm__quasiParser', + 'makeBrandPair', 'makeLazySlot', 'safeScope', 'simple__quasiParser', +] + + +class MonteLexer(RegexLexer): + """ + Lexer for the `Monte <https://monte.readthedocs.io/>`_ programming language. + + .. versionadded:: 2.2 + """ + name = 'Monte' + aliases = ['monte'] + filenames = ['*.mt'] + + tokens = { + 'root': [ + # Comments + (r'#[^\n]*\n', Comment), + + # Docstrings + # Apologies for the non-greedy matcher here. + (r'/\*\*.*?\*/', String.Doc), + + # `var` declarations + (r'\bvar\b', Keyword.Declaration, 'var'), + + # `interface` declarations + (r'\binterface\b', Keyword.Declaration, 'interface'), + + # method declarations + (words(_methods, prefix='\\b', suffix='\\b'), + Keyword, 'method'), + + # All other declarations + (words(_declarations, prefix='\\b', suffix='\\b'), + Keyword.Declaration), + + # Keywords + (words(_keywords, prefix='\\b', suffix='\\b'), Keyword), + + # Literals + ('[+-]?0x[_0-9a-fA-F]+', Number.Hex), + (r'[+-]?[_0-9]+\.[_0-9]*([eE][+-]?[_0-9]+)?', Number.Float), + ('[+-]?[_0-9]+', Number.Integer), + ("'", String.Double, 'char'), + ('"', String.Double, 'string'), + + # Quasiliterals + ('`', String.Backtick, 'ql'), + + # Operators + (words(_operators), Operator), + + # Verb operators + (_identifier + '=', Operator.Word), + + # Safe scope constants + (words(_constants, prefix='\\b', suffix='\\b'), + Keyword.Pseudo), + + # Safe scope guards + (words(_guards, prefix='\\b', suffix='\\b'), Keyword.Type), + + # All other safe scope names + (words(_safeScope, prefix='\\b', suffix='\\b'), + Name.Builtin), + + # Identifiers + (_identifier, Name), + + # Punctuation + (r'\(|\)|\{|\}|\[|\]|:|,', Punctuation), + + # Whitespace + (' +', Whitespace), + + # Definite lexer errors + ('=', Error), + ], + 'char': [ + # It is definitely an error to have a char of width == 0. + ("'", Error, 'root'), + (_escape_pattern, String.Escape, 'charEnd'), + ('.', String.Char, 'charEnd'), + ], + 'charEnd': [ + ("'", String.Char, '#pop:2'), + # It is definitely an error to have a char of width > 1. + ('.', Error), + ], + # The state of things coming into an interface. + 'interface': [ + (' +', Whitespace), + (_identifier, Name.Class, '#pop'), + include('root'), + ], + # The state of things coming into a method. + 'method': [ + (' +', Whitespace), + (_identifier, Name.Function, '#pop'), + include('root'), + ], + 'string': [ + ('"', String.Double, 'root'), + (_escape_pattern, String.Escape), + (r'\n', String.Double), + ('.', String.Double), + ], + 'ql': [ + ('`', String.Backtick, 'root'), + (r'\$' + _escape_pattern, String.Escape), + (r'\$\$', String.Escape), + (r'@@', String.Escape), + (r'\$\{', String.Interpol, 'qlNest'), + (r'@\{', String.Interpol, 'qlNest'), + (r'\$' + _identifier, Name), + ('@' + _identifier, Name), + ('.', String.Backtick), + ], + 'qlNest': [ + (r'\}', String.Interpol, '#pop'), + include('root'), + ], + # The state of things immediately following `var`. + 'var': [ + (' +', Whitespace), + (_identifier, Name.Variable, '#pop'), + include('root'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/ncl.py b/contrib/python/Pygments/py3/pygments/lexers/ncl.py index 3dfbb87bf7..f9df40bdeb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ncl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ncl.py @@ -1,893 +1,893 @@ -""" - pygments.lexers.ncl - ~~~~~~~~~~~~~~~~~~~ - - Lexers for NCAR Command Language. - +""" + pygments.lexers.ncl + ~~~~~~~~~~~~~~~~~~~ + + Lexers for NCAR Command Language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, include, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation - -__all__ = ['NCLLexer'] - - -class NCLLexer(RegexLexer): - """ - Lexer for NCL code. - - .. versionadded:: 2.2 - """ - name = 'NCL' - aliases = ['ncl'] - filenames = ['*.ncl'] - mimetypes = ['text/ncl'] - flags = re.MULTILINE - - tokens = { - 'root': [ - (r';.*\n', Comment), - include('strings'), - include('core'), - (r'[a-zA-Z_]\w*', Name), - include('nums'), - (r'[\s]+', Text), - ], - 'core': [ - # Statements - (words(( - 'begin', 'break', 'continue', 'create', 'defaultapp', 'do', - 'else', 'end', 'external', 'exit', 'True', 'False', 'file', 'function', - 'getvalues', 'graphic', 'group', 'if', 'list', 'load', 'local', - 'new', '_Missing', 'Missing', 'noparent', 'procedure', - 'quit', 'QUIT', 'Quit', 'record', 'return', 'setvalues', 'stop', - 'then', 'while'), prefix=r'\b', suffix=r'\s*\b'), - Keyword), - - # Data Types - (words(( - 'ubyte', 'uint', 'uint64', 'ulong', 'string', 'byte', - 'character', 'double', 'float', 'integer', 'int64', 'logical', - 'long', 'short', 'ushort', 'enumeric', 'numeric', 'snumeric'), - prefix=r'\b', suffix=r'\s*\b'), - Keyword.Type), - - # Operators - (r'[\%^*+\-/<>]', Operator), - - # punctuation: - (r'[\[\]():@$!&|.,\\{}]', Punctuation), - (r'[=:]', Punctuation), - - # Intrinsics - (words(( - 'abs', 'acos', 'addfile', 'addfiles', 'all', 'angmom_atm', 'any', - 'area_conserve_remap', 'area_hi2lores', 'area_poly_sphere', - 'asciiread', 'asciiwrite', 'asin', 'atan', 'atan2', 'attsetvalues', - 'avg', 'betainc', 'bin_avg', 'bin_sum', 'bw_bandpass_filter', - 'cancor', 'cbinread', 'cbinwrite', 'cd_calendar', 'cd_inv_calendar', - 'cdfbin_p', 'cdfbin_pr', 'cdfbin_s', 'cdfbin_xn', 'cdfchi_p', - 'cdfchi_x', 'cdfgam_p', 'cdfgam_x', 'cdfnor_p', 'cdfnor_x', - 'cdft_p', 'cdft_t', 'ceil', 'center_finite_diff', - 'center_finite_diff_n', 'cfftb', 'cfftf', 'cfftf_frq_reorder', - 'charactertodouble', 'charactertofloat', 'charactertointeger', - 'charactertolong', 'charactertoshort', 'charactertostring', - 'chartodouble', 'chartofloat', 'chartoint', 'chartointeger', - 'chartolong', 'chartoshort', 'chartostring', 'chiinv', 'clear', - 'color_index_to_rgba', 'conform', 'conform_dims', 'cos', 'cosh', - 'count_unique_values', 'covcorm', 'covcorm_xy', 'craybinnumrec', - 'craybinrecread', 'create_graphic', 'csa1', 'csa1d', 'csa1s', - 'csa1x', 'csa1xd', 'csa1xs', 'csa2', 'csa2d', 'csa2l', 'csa2ld', - 'csa2ls', 'csa2lx', 'csa2lxd', 'csa2lxs', 'csa2s', 'csa2x', - 'csa2xd', 'csa2xs', 'csa3', 'csa3d', 'csa3l', 'csa3ld', 'csa3ls', - 'csa3lx', 'csa3lxd', 'csa3lxs', 'csa3s', 'csa3x', 'csa3xd', - 'csa3xs', 'csc2s', 'csgetp', 'css2c', 'cssetp', 'cssgrid', 'csstri', - 'csvoro', 'cumsum', 'cz2ccm', 'datatondc', 'day_of_week', - 'day_of_year', 'days_in_month', 'default_fillvalue', 'delete', - 'depth_to_pres', 'destroy', 'determinant', 'dewtemp_trh', - 'dgeevx_lapack', 'dim_acumrun_n', 'dim_avg', 'dim_avg_n', - 'dim_avg_wgt', 'dim_avg_wgt_n', 'dim_cumsum', 'dim_cumsum_n', - 'dim_gamfit_n', 'dim_gbits', 'dim_max', 'dim_max_n', 'dim_median', - 'dim_median_n', 'dim_min', 'dim_min_n', 'dim_num', 'dim_num_n', - 'dim_numrun_n', 'dim_pqsort', 'dim_pqsort_n', 'dim_product', - 'dim_product_n', 'dim_rmsd', 'dim_rmsd_n', 'dim_rmvmean', - 'dim_rmvmean_n', 'dim_rmvmed', 'dim_rmvmed_n', 'dim_spi_n', - 'dim_standardize', 'dim_standardize_n', 'dim_stat4', 'dim_stat4_n', - 'dim_stddev', 'dim_stddev_n', 'dim_sum', 'dim_sum_n', 'dim_sum_wgt', - 'dim_sum_wgt_n', 'dim_variance', 'dim_variance_n', 'dimsizes', - 'doubletobyte', 'doubletochar', 'doubletocharacter', - 'doubletofloat', 'doubletoint', 'doubletointeger', 'doubletolong', - 'doubletoshort', 'dpres_hybrid_ccm', 'dpres_plevel', 'draw', - 'draw_color_palette', 'dsgetp', 'dsgrid2', 'dsgrid2d', 'dsgrid2s', - 'dsgrid3', 'dsgrid3d', 'dsgrid3s', 'dspnt2', 'dspnt2d', 'dspnt2s', - 'dspnt3', 'dspnt3d', 'dspnt3s', 'dssetp', 'dtrend', 'dtrend_msg', - 'dtrend_msg_n', 'dtrend_n', 'dtrend_quadratic', - 'dtrend_quadratic_msg_n', 'dv2uvf', 'dv2uvg', 'dz_height', - 'echo_off', 'echo_on', 'eof2data', 'eof_varimax', 'eofcor', - 'eofcor_pcmsg', 'eofcor_ts', 'eofcov', 'eofcov_pcmsg', 'eofcov_ts', - 'eofunc', 'eofunc_ts', 'eofunc_varimax', 'equiv_sample_size', 'erf', - 'erfc', 'esacr', 'esacv', 'esccr', 'esccv', 'escorc', 'escorc_n', - 'escovc', 'exit', 'exp', 'exp_tapersh', 'exp_tapersh_wgts', - 'exp_tapershC', 'ezfftb', 'ezfftb_n', 'ezfftf', 'ezfftf_n', - 'f2fosh', 'f2foshv', 'f2fsh', 'f2fshv', 'f2gsh', 'f2gshv', 'fabs', - 'fbindirread', 'fbindirwrite', 'fbinnumrec', 'fbinread', - 'fbinrecread', 'fbinrecwrite', 'fbinwrite', 'fft2db', 'fft2df', - 'fftshift', 'fileattdef', 'filechunkdimdef', 'filedimdef', - 'fileexists', 'filegrpdef', 'filevarattdef', 'filevarchunkdef', - 'filevarcompressleveldef', 'filevardef', 'filevardimsizes', - 'filwgts_lancos', 'filwgts_lanczos', 'filwgts_normal', - 'floattobyte', 'floattochar', 'floattocharacter', 'floattoint', - 'floattointeger', 'floattolong', 'floattoshort', 'floor', - 'fluxEddy', 'fo2fsh', 'fo2fshv', 'fourier_info', 'frame', 'fspan', - 'ftcurv', 'ftcurvd', 'ftcurvi', 'ftcurvp', 'ftcurvpi', 'ftcurvps', - 'ftcurvs', 'ftest', 'ftgetp', 'ftkurv', 'ftkurvd', 'ftkurvp', - 'ftkurvpd', 'ftsetp', 'ftsurf', 'g2fsh', 'g2fshv', 'g2gsh', - 'g2gshv', 'gamma', 'gammainc', 'gaus', 'gaus_lobat', - 'gaus_lobat_wgt', 'gc_aangle', 'gc_clkwise', 'gc_dangle', - 'gc_inout', 'gc_latlon', 'gc_onarc', 'gc_pnt2gc', 'gc_qarea', - 'gc_tarea', 'generate_2d_array', 'get_color_index', - 'get_color_rgba', 'get_cpu_time', 'get_isolines', 'get_ncl_version', - 'get_script_name', 'get_script_prefix_name', 'get_sphere_radius', - 'get_unique_values', 'getbitsone', 'getenv', 'getfiledimsizes', - 'getfilegrpnames', 'getfilepath', 'getfilevaratts', - 'getfilevarchunkdimsizes', 'getfilevardims', 'getfilevardimsizes', - 'getfilevarnames', 'getfilevartypes', 'getvaratts', 'getvardims', - 'gradsf', 'gradsg', 'greg2jul', 'grid2triple', 'hlsrgb', 'hsvrgb', - 'hydro', 'hyi2hyo', 'idsfft', 'igradsf', 'igradsg', 'ilapsf', - 'ilapsg', 'ilapvf', 'ilapvg', 'ind', 'ind_resolve', 'int2p', - 'int2p_n', 'integertobyte', 'integertochar', 'integertocharacter', - 'integertoshort', 'inttobyte', 'inttochar', 'inttoshort', - 'inverse_matrix', 'isatt', 'isbigendian', 'isbyte', 'ischar', - 'iscoord', 'isdefined', 'isdim', 'isdimnamed', 'isdouble', - 'isenumeric', 'isfile', 'isfilepresent', 'isfilevar', - 'isfilevaratt', 'isfilevarcoord', 'isfilevardim', 'isfloat', - 'isfunc', 'isgraphic', 'isint', 'isint64', 'isinteger', - 'isleapyear', 'islogical', 'islong', 'ismissing', 'isnan_ieee', - 'isnumeric', 'ispan', 'isproc', 'isshort', 'issnumeric', 'isstring', - 'isubyte', 'isuint', 'isuint64', 'isulong', 'isunlimited', - 'isunsigned', 'isushort', 'isvar', 'jul2greg', 'kmeans_as136', - 'kolsm2_n', 'kron_product', 'lapsf', 'lapsg', 'lapvf', 'lapvg', - 'latlon2utm', 'lclvl', 'lderuvf', 'lderuvg', 'linint1', 'linint1_n', - 'linint2', 'linint2_points', 'linmsg', 'linmsg_n', 'linrood_latwgt', - 'linrood_wgt', 'list_files', 'list_filevars', 'list_hlus', - 'list_procfuncs', 'list_vars', 'ListAppend', 'ListCount', - 'ListGetType', 'ListIndex', 'ListIndexFromName', 'ListPop', - 'ListPush', 'ListSetType', 'loadscript', 'local_max', 'local_min', - 'log', 'log10', 'longtobyte', 'longtochar', 'longtocharacter', - 'longtoint', 'longtointeger', 'longtoshort', 'lspoly', 'lspoly_n', - 'mask', 'max', 'maxind', 'min', 'minind', 'mixed_layer_depth', - 'mixhum_ptd', 'mixhum_ptrh', 'mjo_cross_coh2pha', - 'mjo_cross_segment', 'moc_globe_atl', 'monthday', 'natgrid', - 'natgridd', 'natgrids', 'ncargpath', 'ncargversion', 'ndctodata', - 'ndtooned', 'new', 'NewList', 'ngezlogo', 'nggcog', 'nggetp', - 'nglogo', 'ngsetp', 'NhlAddAnnotation', 'NhlAddData', - 'NhlAddOverlay', 'NhlAddPrimitive', 'NhlAppGetDefaultParentId', - 'NhlChangeWorkstation', 'NhlClassName', 'NhlClearWorkstation', - 'NhlDataPolygon', 'NhlDataPolyline', 'NhlDataPolymarker', - 'NhlDataToNDC', 'NhlDestroy', 'NhlDraw', 'NhlFrame', 'NhlFreeColor', - 'NhlGetBB', 'NhlGetClassResources', 'NhlGetErrorObjectId', - 'NhlGetNamedColorIndex', 'NhlGetParentId', - 'NhlGetParentWorkstation', 'NhlGetWorkspaceObjectId', - 'NhlIsAllocatedColor', 'NhlIsApp', 'NhlIsDataComm', 'NhlIsDataItem', - 'NhlIsDataSpec', 'NhlIsTransform', 'NhlIsView', 'NhlIsWorkstation', - 'NhlName', 'NhlNDCPolygon', 'NhlNDCPolyline', 'NhlNDCPolymarker', - 'NhlNDCToData', 'NhlNewColor', 'NhlNewDashPattern', 'NhlNewMarker', - 'NhlPalGetDefined', 'NhlRemoveAnnotation', 'NhlRemoveData', - 'NhlRemoveOverlay', 'NhlRemovePrimitive', 'NhlSetColor', - 'NhlSetDashPattern', 'NhlSetMarker', 'NhlUpdateData', - 'NhlUpdateWorkstation', 'nice_mnmxintvl', 'nngetaspectd', - 'nngetaspects', 'nngetp', 'nngetsloped', 'nngetslopes', 'nngetwts', - 'nngetwtsd', 'nnpnt', 'nnpntd', 'nnpntend', 'nnpntendd', - 'nnpntinit', 'nnpntinitd', 'nnpntinits', 'nnpnts', 'nnsetp', 'num', - 'obj_anal_ic', 'omega_ccm', 'onedtond', 'overlay', 'paleo_outline', - 'pdfxy_bin', 'poisson_grid_fill', 'pop_remap', 'potmp_insitu_ocn', - 'prcwater_dp', 'pres2hybrid', 'pres_hybrid_ccm', 'pres_sigma', - 'print', 'print_table', 'printFileVarSummary', 'printVarSummary', - 'product', 'pslec', 'pslhor', 'pslhyp', 'qsort', 'rand', - 'random_chi', 'random_gamma', 'random_normal', 'random_setallseed', - 'random_uniform', 'rcm2points', 'rcm2rgrid', 'rdsstoi', - 'read_colormap_file', 'reg_multlin', 'regcoef', 'regCoef_n', - 'regline', 'relhum', 'replace_ieeenan', 'reshape', 'reshape_ind', - 'rgba_to_color_index', 'rgbhls', 'rgbhsv', 'rgbyiq', 'rgrid2rcm', - 'rhomb_trunc', 'rip_cape_2d', 'rip_cape_3d', 'round', 'rtest', - 'runave', 'runave_n', 'set_default_fillvalue', 'set_sphere_radius', - 'setfileoption', 'sfvp2uvf', 'sfvp2uvg', 'shaec', 'shagc', - 'shgetnp', 'shgetp', 'shgrid', 'shorttobyte', 'shorttochar', - 'shorttocharacter', 'show_ascii', 'shsec', 'shsetp', 'shsgc', - 'shsgc_R42', 'sigma2hybrid', 'simpeq', 'simpne', 'sin', - 'sindex_yrmo', 'sinh', 'sizeof', 'sleep', 'smth9', 'snindex_yrmo', - 'solve_linsys', 'span_color_indexes', 'span_color_rgba', - 'sparse_matrix_mult', 'spcorr', 'spcorr_n', 'specx_anal', - 'specxy_anal', 'spei', 'sprintf', 'sprinti', 'sqrt', 'sqsort', - 'srand', 'stat2', 'stat4', 'stat_medrng', 'stat_trim', - 'status_exit', 'stdatmus_p2tdz', 'stdatmus_z2tdp', 'stddev', - 'str_capital', 'str_concat', 'str_fields_count', 'str_get_cols', - 'str_get_dq', 'str_get_field', 'str_get_nl', 'str_get_sq', - 'str_get_tab', 'str_index_of_substr', 'str_insert', 'str_is_blank', - 'str_join', 'str_left_strip', 'str_lower', 'str_match', - 'str_match_ic', 'str_match_ic_regex', 'str_match_ind', - 'str_match_ind_ic', 'str_match_ind_ic_regex', 'str_match_ind_regex', - 'str_match_regex', 'str_right_strip', 'str_split', - 'str_split_by_length', 'str_split_csv', 'str_squeeze', 'str_strip', - 'str_sub_str', 'str_switch', 'str_upper', 'stringtochar', - 'stringtocharacter', 'stringtodouble', 'stringtofloat', - 'stringtoint', 'stringtointeger', 'stringtolong', 'stringtoshort', - 'strlen', 'student_t', 'sum', 'svd_lapack', 'svdcov', 'svdcov_sv', - 'svdstd', 'svdstd_sv', 'system', 'systemfunc', 'tan', 'tanh', - 'taper', 'taper_n', 'tdclrs', 'tdctri', 'tdcudp', 'tdcurv', - 'tddtri', 'tdez2d', 'tdez3d', 'tdgetp', 'tdgrds', 'tdgrid', - 'tdgtrs', 'tdinit', 'tditri', 'tdlbla', 'tdlblp', 'tdlbls', - 'tdline', 'tdlndp', 'tdlnpa', 'tdlpdp', 'tdmtri', 'tdotri', - 'tdpara', 'tdplch', 'tdprpa', 'tdprpi', 'tdprpt', 'tdsetp', - 'tdsort', 'tdstri', 'tdstrs', 'tdttri', 'thornthwaite', 'tobyte', - 'tochar', 'todouble', 'tofloat', 'toint', 'toint64', 'tointeger', - 'tolong', 'toshort', 'tosigned', 'tostring', 'tostring_with_format', - 'totype', 'toubyte', 'touint', 'touint64', 'toulong', 'tounsigned', - 'toushort', 'trend_manken', 'tri_trunc', 'triple2grid', - 'triple2grid2d', 'trop_wmo', 'ttest', 'typeof', 'undef', - 'unique_string', 'update', 'ushorttoint', 'ut_calendar', - 'ut_inv_calendar', 'utm2latlon', 'uv2dv_cfd', 'uv2dvf', 'uv2dvg', - 'uv2sfvpf', 'uv2sfvpg', 'uv2vr_cfd', 'uv2vrdvf', 'uv2vrdvg', - 'uv2vrf', 'uv2vrg', 'v5d_close', 'v5d_create', 'v5d_setLowLev', - 'v5d_setUnits', 'v5d_write', 'v5d_write_var', 'variance', 'vhaec', - 'vhagc', 'vhsec', 'vhsgc', 'vibeta', 'vinth2p', 'vinth2p_ecmwf', - 'vinth2p_ecmwf_nodes', 'vinth2p_nodes', 'vintp2p_ecmwf', 'vr2uvf', - 'vr2uvg', 'vrdv2uvf', 'vrdv2uvg', 'wavelet', 'wavelet_default', - 'weibull', 'wgt_area_smooth', 'wgt_areaave', 'wgt_areaave2', - 'wgt_arearmse', 'wgt_arearmse2', 'wgt_areasum2', 'wgt_runave', - 'wgt_runave_n', 'wgt_vert_avg_beta', 'wgt_volave', 'wgt_volave_ccm', - 'wgt_volrmse', 'wgt_volrmse_ccm', 'where', 'wk_smooth121', 'wmbarb', - 'wmbarbmap', 'wmdrft', 'wmgetp', 'wmlabs', 'wmsetp', 'wmstnm', - 'wmvect', 'wmvectmap', 'wmvlbl', 'wrf_avo', 'wrf_cape_2d', - 'wrf_cape_3d', 'wrf_dbz', 'wrf_eth', 'wrf_helicity', 'wrf_ij_to_ll', - 'wrf_interp_1d', 'wrf_interp_2d_xy', 'wrf_interp_3d_z', - 'wrf_latlon_to_ij', 'wrf_ll_to_ij', 'wrf_omega', 'wrf_pvo', - 'wrf_rh', 'wrf_slp', 'wrf_smooth_2d', 'wrf_td', 'wrf_tk', - 'wrf_updraft_helicity', 'wrf_uvmet', 'wrf_virtual_temp', - 'wrf_wetbulb', 'wrf_wps_close_int', 'wrf_wps_open_int', - 'wrf_wps_rddata_int', 'wrf_wps_rdhead_int', 'wrf_wps_read_int', - 'wrf_wps_write_int', 'write_matrix', 'write_table', 'yiqrgb', - 'z2geouv', 'zonal_mpsi', 'addfiles_GetVar', 'advect_variable', - 'area_conserve_remap_Wrap', 'area_hi2lores_Wrap', - 'array_append_record', 'assignFillValue', 'byte2flt', - 'byte2flt_hdf', 'calcDayAnomTLL', 'calcMonAnomLLLT', - 'calcMonAnomLLT', 'calcMonAnomTLL', 'calcMonAnomTLLL', - 'calculate_monthly_values', 'cd_convert', 'changeCase', - 'changeCaseChar', 'clmDayTLL', 'clmDayTLLL', 'clmMon2clmDay', - 'clmMonLLLT', 'clmMonLLT', 'clmMonTLL', 'clmMonTLLL', 'closest_val', - 'copy_VarAtts', 'copy_VarCoords', 'copy_VarCoords_1', - 'copy_VarCoords_2', 'copy_VarMeta', 'copyatt', 'crossp3', - 'cshstringtolist', 'cssgrid_Wrap', 'dble2flt', 'decimalPlaces', - 'delete_VarAtts', 'dim_avg_n_Wrap', 'dim_avg_wgt_n_Wrap', - 'dim_avg_wgt_Wrap', 'dim_avg_Wrap', 'dim_cumsum_n_Wrap', - 'dim_cumsum_Wrap', 'dim_max_n_Wrap', 'dim_min_n_Wrap', - 'dim_rmsd_n_Wrap', 'dim_rmsd_Wrap', 'dim_rmvmean_n_Wrap', - 'dim_rmvmean_Wrap', 'dim_rmvmed_n_Wrap', 'dim_rmvmed_Wrap', - 'dim_standardize_n_Wrap', 'dim_standardize_Wrap', - 'dim_stddev_n_Wrap', 'dim_stddev_Wrap', 'dim_sum_n_Wrap', - 'dim_sum_wgt_n_Wrap', 'dim_sum_wgt_Wrap', 'dim_sum_Wrap', - 'dim_variance_n_Wrap', 'dim_variance_Wrap', 'dpres_plevel_Wrap', - 'dtrend_leftdim', 'dv2uvF_Wrap', 'dv2uvG_Wrap', 'eof_north', - 'eofcor_Wrap', 'eofcov_Wrap', 'eofunc_north', 'eofunc_ts_Wrap', - 'eofunc_varimax_reorder', 'eofunc_varimax_Wrap', 'eofunc_Wrap', - 'epsZero', 'f2fosh_Wrap', 'f2foshv_Wrap', 'f2fsh_Wrap', - 'f2fshv_Wrap', 'f2gsh_Wrap', 'f2gshv_Wrap', 'fbindirSwap', - 'fbinseqSwap1', 'fbinseqSwap2', 'flt2dble', 'flt2string', - 'fo2fsh_Wrap', 'fo2fshv_Wrap', 'g2fsh_Wrap', 'g2fshv_Wrap', - 'g2gsh_Wrap', 'g2gshv_Wrap', 'generate_resample_indices', - 'generate_sample_indices', 'generate_unique_indices', - 'genNormalDist', 'get1Dindex', 'get1Dindex_Collapse', - 'get1Dindex_Exclude', 'get_file_suffix', 'GetFillColor', - 'GetFillColorIndex', 'getFillValue', 'getind_latlon2d', - 'getVarDimNames', 'getVarFillValue', 'grib_stime2itime', - 'hyi2hyo_Wrap', 'ilapsF_Wrap', 'ilapsG_Wrap', 'ind_nearest_coord', - 'indStrSubset', 'int2dble', 'int2flt', 'int2p_n_Wrap', 'int2p_Wrap', - 'isMonotonic', 'isStrSubset', 'latGau', 'latGauWgt', 'latGlobeF', - 'latGlobeFo', 'latRegWgt', 'linint1_n_Wrap', 'linint1_Wrap', - 'linint2_points_Wrap', 'linint2_Wrap', 'local_max_1d', - 'local_min_1d', 'lonFlip', 'lonGlobeF', 'lonGlobeFo', 'lonPivot', - 'merge_levels_sfc', 'mod', 'month_to_annual', - 'month_to_annual_weighted', 'month_to_season', 'month_to_season12', - 'month_to_seasonN', 'monthly_total_to_daily_mean', 'nameDim', - 'natgrid_Wrap', 'NewCosWeight', 'niceLatLon2D', 'NormCosWgtGlobe', - 'numAsciiCol', 'numAsciiRow', 'numeric2int', - 'obj_anal_ic_deprecated', 'obj_anal_ic_Wrap', 'omega_ccm_driver', - 'omega_to_w', 'oneDtostring', 'pack_values', 'pattern_cor', 'pdfx', - 'pdfxy', 'pdfxy_conform', 'pot_temp', 'pot_vort_hybrid', - 'pot_vort_isobaric', 'pres2hybrid_Wrap', 'print_clock', - 'printMinMax', 'quadroots', 'rcm2points_Wrap', 'rcm2rgrid_Wrap', - 'readAsciiHead', 'readAsciiTable', 'reg_multlin_stats', - 'region_ind', 'regline_stats', 'relhum_ttd', 'replaceSingleChar', - 'RGBtoCmap', 'rgrid2rcm_Wrap', 'rho_mwjf', 'rm_single_dims', - 'rmAnnCycle1D', 'rmInsufData', 'rmMonAnnCycLLLT', 'rmMonAnnCycLLT', - 'rmMonAnnCycTLL', 'runave_n_Wrap', 'runave_Wrap', 'short2flt', - 'short2flt_hdf', 'shsgc_R42_Wrap', 'sign_f90', 'sign_matlab', - 'smth9_Wrap', 'smthClmDayTLL', 'smthClmDayTLLL', 'SqrtCosWeight', - 'stat_dispersion', 'static_stability', 'stdMonLLLT', 'stdMonLLT', - 'stdMonTLL', 'stdMonTLLL', 'symMinMaxPlt', 'table_attach_columns', - 'table_attach_rows', 'time_to_newtime', 'transpose', - 'triple2grid_Wrap', 'ut_convert', 'uv2dvF_Wrap', 'uv2dvG_Wrap', - 'uv2vrF_Wrap', 'uv2vrG_Wrap', 'vr2uvF_Wrap', 'vr2uvG_Wrap', - 'w_to_omega', 'wallClockElapseTime', 'wave_number_spc', - 'wgt_areaave_Wrap', 'wgt_runave_leftdim', 'wgt_runave_n_Wrap', - 'wgt_runave_Wrap', 'wgt_vertical_n', 'wind_component', - 'wind_direction', 'yyyyddd_to_yyyymmdd', 'yyyymm_time', - 'yyyymm_to_yyyyfrac', 'yyyymmdd_time', 'yyyymmdd_to_yyyyddd', - 'yyyymmdd_to_yyyyfrac', 'yyyymmddhh_time', 'yyyymmddhh_to_yyyyfrac', - 'zonal_mpsi_Wrap', 'zonalAve', 'calendar_decode2', 'cd_string', - 'kf_filter', 'run_cor', 'time_axis_labels', 'ut_string', - 'wrf_contour', 'wrf_map', 'wrf_map_overlay', 'wrf_map_overlays', - 'wrf_map_resources', 'wrf_map_zoom', 'wrf_overlay', 'wrf_overlays', - 'wrf_user_getvar', 'wrf_user_ij_to_ll', 'wrf_user_intrp2d', - 'wrf_user_intrp3d', 'wrf_user_latlon_to_ij', 'wrf_user_list_times', - 'wrf_user_ll_to_ij', 'wrf_user_unstagger', 'wrf_user_vert_interp', - 'wrf_vector', 'gsn_add_annotation', 'gsn_add_polygon', - 'gsn_add_polyline', 'gsn_add_polymarker', - 'gsn_add_shapefile_polygons', 'gsn_add_shapefile_polylines', - 'gsn_add_shapefile_polymarkers', 'gsn_add_text', 'gsn_attach_plots', - 'gsn_blank_plot', 'gsn_contour', 'gsn_contour_map', - 'gsn_contour_shade', 'gsn_coordinates', 'gsn_create_labelbar', - 'gsn_create_legend', 'gsn_create_text', - 'gsn_csm_attach_zonal_means', 'gsn_csm_blank_plot', - 'gsn_csm_contour', 'gsn_csm_contour_map', 'gsn_csm_contour_map_ce', - 'gsn_csm_contour_map_overlay', 'gsn_csm_contour_map_polar', - 'gsn_csm_hov', 'gsn_csm_lat_time', 'gsn_csm_map', 'gsn_csm_map_ce', - 'gsn_csm_map_polar', 'gsn_csm_pres_hgt', - 'gsn_csm_pres_hgt_streamline', 'gsn_csm_pres_hgt_vector', - 'gsn_csm_streamline', 'gsn_csm_streamline_contour_map', - 'gsn_csm_streamline_contour_map_ce', - 'gsn_csm_streamline_contour_map_polar', 'gsn_csm_streamline_map', - 'gsn_csm_streamline_map_ce', 'gsn_csm_streamline_map_polar', - 'gsn_csm_streamline_scalar', 'gsn_csm_streamline_scalar_map', - 'gsn_csm_streamline_scalar_map_ce', - 'gsn_csm_streamline_scalar_map_polar', 'gsn_csm_time_lat', - 'gsn_csm_vector', 'gsn_csm_vector_map', 'gsn_csm_vector_map_ce', - 'gsn_csm_vector_map_polar', 'gsn_csm_vector_scalar', - 'gsn_csm_vector_scalar_map', 'gsn_csm_vector_scalar_map_ce', - 'gsn_csm_vector_scalar_map_polar', 'gsn_csm_x2y', 'gsn_csm_x2y2', - 'gsn_csm_xy', 'gsn_csm_xy2', 'gsn_csm_xy3', 'gsn_csm_y', - 'gsn_define_colormap', 'gsn_draw_colormap', 'gsn_draw_named_colors', - 'gsn_histogram', 'gsn_labelbar_ndc', 'gsn_legend_ndc', 'gsn_map', - 'gsn_merge_colormaps', 'gsn_open_wks', 'gsn_panel', 'gsn_polygon', - 'gsn_polygon_ndc', 'gsn_polyline', 'gsn_polyline_ndc', - 'gsn_polymarker', 'gsn_polymarker_ndc', 'gsn_retrieve_colormap', - 'gsn_reverse_colormap', 'gsn_streamline', 'gsn_streamline_map', - 'gsn_streamline_scalar', 'gsn_streamline_scalar_map', 'gsn_table', - 'gsn_text', 'gsn_text_ndc', 'gsn_vector', 'gsn_vector_map', - 'gsn_vector_scalar', 'gsn_vector_scalar_map', 'gsn_xy', 'gsn_y', - 'hsv2rgb', 'maximize_output', 'namedcolor2rgb', 'namedcolor2rgba', - 'reset_device_coordinates', 'span_named_colors'), prefix=r'\b'), - Name.Builtin), - - # Resources - (words(( - 'amDataXF', 'amDataYF', 'amJust', 'amOn', 'amOrthogonalPosF', - 'amParallelPosF', 'amResizeNotify', 'amSide', 'amTrackData', - 'amViewId', 'amZone', 'appDefaultParent', 'appFileSuffix', - 'appResources', 'appSysDir', 'appUsrDir', 'caCopyArrays', - 'caXArray', 'caXCast', 'caXMaxV', 'caXMinV', 'caXMissingV', - 'caYArray', 'caYCast', 'caYMaxV', 'caYMinV', 'caYMissingV', - 'cnCellFillEdgeColor', 'cnCellFillMissingValEdgeColor', - 'cnConpackParams', 'cnConstFEnableFill', 'cnConstFLabelAngleF', - 'cnConstFLabelBackgroundColor', 'cnConstFLabelConstantSpacingF', - 'cnConstFLabelFont', 'cnConstFLabelFontAspectF', - 'cnConstFLabelFontColor', 'cnConstFLabelFontHeightF', - 'cnConstFLabelFontQuality', 'cnConstFLabelFontThicknessF', - 'cnConstFLabelFormat', 'cnConstFLabelFuncCode', 'cnConstFLabelJust', - 'cnConstFLabelOn', 'cnConstFLabelOrthogonalPosF', - 'cnConstFLabelParallelPosF', 'cnConstFLabelPerimColor', - 'cnConstFLabelPerimOn', 'cnConstFLabelPerimSpaceF', - 'cnConstFLabelPerimThicknessF', 'cnConstFLabelSide', - 'cnConstFLabelString', 'cnConstFLabelTextDirection', - 'cnConstFLabelZone', 'cnConstFUseInfoLabelRes', - 'cnExplicitLabelBarLabelsOn', 'cnExplicitLegendLabelsOn', - 'cnExplicitLineLabelsOn', 'cnFillBackgroundColor', 'cnFillColor', - 'cnFillColors', 'cnFillDotSizeF', 'cnFillDrawOrder', 'cnFillMode', - 'cnFillOn', 'cnFillOpacityF', 'cnFillPalette', 'cnFillPattern', - 'cnFillPatterns', 'cnFillScaleF', 'cnFillScales', 'cnFixFillBleed', - 'cnGridBoundFillColor', 'cnGridBoundFillPattern', - 'cnGridBoundFillScaleF', 'cnGridBoundPerimColor', - 'cnGridBoundPerimDashPattern', 'cnGridBoundPerimOn', - 'cnGridBoundPerimThicknessF', 'cnHighLabelAngleF', - 'cnHighLabelBackgroundColor', 'cnHighLabelConstantSpacingF', - 'cnHighLabelCount', 'cnHighLabelFont', 'cnHighLabelFontAspectF', - 'cnHighLabelFontColor', 'cnHighLabelFontHeightF', - 'cnHighLabelFontQuality', 'cnHighLabelFontThicknessF', - 'cnHighLabelFormat', 'cnHighLabelFuncCode', 'cnHighLabelPerimColor', - 'cnHighLabelPerimOn', 'cnHighLabelPerimSpaceF', - 'cnHighLabelPerimThicknessF', 'cnHighLabelString', 'cnHighLabelsOn', - 'cnHighLowLabelOverlapMode', 'cnHighUseLineLabelRes', - 'cnInfoLabelAngleF', 'cnInfoLabelBackgroundColor', - 'cnInfoLabelConstantSpacingF', 'cnInfoLabelFont', - 'cnInfoLabelFontAspectF', 'cnInfoLabelFontColor', - 'cnInfoLabelFontHeightF', 'cnInfoLabelFontQuality', - 'cnInfoLabelFontThicknessF', 'cnInfoLabelFormat', - 'cnInfoLabelFuncCode', 'cnInfoLabelJust', 'cnInfoLabelOn', - 'cnInfoLabelOrthogonalPosF', 'cnInfoLabelParallelPosF', - 'cnInfoLabelPerimColor', 'cnInfoLabelPerimOn', - 'cnInfoLabelPerimSpaceF', 'cnInfoLabelPerimThicknessF', - 'cnInfoLabelSide', 'cnInfoLabelString', 'cnInfoLabelTextDirection', - 'cnInfoLabelZone', 'cnLabelBarEndLabelsOn', 'cnLabelBarEndStyle', - 'cnLabelDrawOrder', 'cnLabelMasking', 'cnLabelScaleFactorF', - 'cnLabelScaleValueF', 'cnLabelScalingMode', 'cnLegendLevelFlags', - 'cnLevelCount', 'cnLevelFlag', 'cnLevelFlags', 'cnLevelSelectionMode', - 'cnLevelSpacingF', 'cnLevels', 'cnLineColor', 'cnLineColors', - 'cnLineDashPattern', 'cnLineDashPatterns', 'cnLineDashSegLenF', - 'cnLineDrawOrder', 'cnLineLabelAngleF', 'cnLineLabelBackgroundColor', - 'cnLineLabelConstantSpacingF', 'cnLineLabelCount', - 'cnLineLabelDensityF', 'cnLineLabelFont', 'cnLineLabelFontAspectF', - 'cnLineLabelFontColor', 'cnLineLabelFontColors', - 'cnLineLabelFontHeightF', 'cnLineLabelFontQuality', - 'cnLineLabelFontThicknessF', 'cnLineLabelFormat', - 'cnLineLabelFuncCode', 'cnLineLabelInterval', 'cnLineLabelPerimColor', - 'cnLineLabelPerimOn', 'cnLineLabelPerimSpaceF', - 'cnLineLabelPerimThicknessF', 'cnLineLabelPlacementMode', - 'cnLineLabelStrings', 'cnLineLabelsOn', 'cnLinePalette', - 'cnLineThicknessF', 'cnLineThicknesses', 'cnLinesOn', - 'cnLowLabelAngleF', 'cnLowLabelBackgroundColor', - 'cnLowLabelConstantSpacingF', 'cnLowLabelCount', 'cnLowLabelFont', - 'cnLowLabelFontAspectF', 'cnLowLabelFontColor', - 'cnLowLabelFontHeightF', 'cnLowLabelFontQuality', - 'cnLowLabelFontThicknessF', 'cnLowLabelFormat', 'cnLowLabelFuncCode', - 'cnLowLabelPerimColor', 'cnLowLabelPerimOn', 'cnLowLabelPerimSpaceF', - 'cnLowLabelPerimThicknessF', 'cnLowLabelString', 'cnLowLabelsOn', - 'cnLowUseHighLabelRes', 'cnMaxDataValueFormat', 'cnMaxLevelCount', - 'cnMaxLevelValF', 'cnMaxPointDistanceF', 'cnMinLevelValF', - 'cnMissingValFillColor', 'cnMissingValFillPattern', - 'cnMissingValFillScaleF', 'cnMissingValPerimColor', - 'cnMissingValPerimDashPattern', 'cnMissingValPerimGridBoundOn', - 'cnMissingValPerimOn', 'cnMissingValPerimThicknessF', - 'cnMonoFillColor', 'cnMonoFillPattern', 'cnMonoFillScale', - 'cnMonoLevelFlag', 'cnMonoLineColor', 'cnMonoLineDashPattern', - 'cnMonoLineLabelFontColor', 'cnMonoLineThickness', 'cnNoDataLabelOn', - 'cnNoDataLabelString', 'cnOutOfRangeFillColor', - 'cnOutOfRangeFillPattern', 'cnOutOfRangeFillScaleF', - 'cnOutOfRangePerimColor', 'cnOutOfRangePerimDashPattern', - 'cnOutOfRangePerimOn', 'cnOutOfRangePerimThicknessF', - 'cnRasterCellSizeF', 'cnRasterMinCellSizeF', 'cnRasterModeOn', - 'cnRasterSampleFactorF', 'cnRasterSmoothingOn', 'cnScalarFieldData', - 'cnSmoothingDistanceF', 'cnSmoothingOn', 'cnSmoothingTensionF', - 'cnSpanFillPalette', 'cnSpanLinePalette', 'ctCopyTables', - 'ctXElementSize', 'ctXMaxV', 'ctXMinV', 'ctXMissingV', 'ctXTable', - 'ctXTableLengths', 'ctXTableType', 'ctYElementSize', 'ctYMaxV', - 'ctYMinV', 'ctYMissingV', 'ctYTable', 'ctYTableLengths', - 'ctYTableType', 'dcDelayCompute', 'errBuffer', - 'errFileName', 'errFilePtr', 'errLevel', 'errPrint', 'errUnitNumber', - 'gsClipOn', 'gsColors', 'gsEdgeColor', 'gsEdgeDashPattern', - 'gsEdgeDashSegLenF', 'gsEdgeThicknessF', 'gsEdgesOn', - 'gsFillBackgroundColor', 'gsFillColor', 'gsFillDotSizeF', - 'gsFillIndex', 'gsFillLineThicknessF', 'gsFillOpacityF', - 'gsFillScaleF', 'gsFont', 'gsFontAspectF', 'gsFontColor', - 'gsFontHeightF', 'gsFontOpacityF', 'gsFontQuality', - 'gsFontThicknessF', 'gsLineColor', 'gsLineDashPattern', - 'gsLineDashSegLenF', 'gsLineLabelConstantSpacingF', 'gsLineLabelFont', - 'gsLineLabelFontAspectF', 'gsLineLabelFontColor', - 'gsLineLabelFontHeightF', 'gsLineLabelFontQuality', - 'gsLineLabelFontThicknessF', 'gsLineLabelFuncCode', - 'gsLineLabelString', 'gsLineOpacityF', 'gsLineThicknessF', - 'gsMarkerColor', 'gsMarkerIndex', 'gsMarkerOpacityF', 'gsMarkerSizeF', - 'gsMarkerThicknessF', 'gsSegments', 'gsTextAngleF', - 'gsTextConstantSpacingF', 'gsTextDirection', 'gsTextFuncCode', - 'gsTextJustification', 'gsnAboveYRefLineBarColors', - 'gsnAboveYRefLineBarFillScales', 'gsnAboveYRefLineBarPatterns', - 'gsnAboveYRefLineColor', 'gsnAddCyclic', 'gsnAttachBorderOn', - 'gsnAttachPlotsXAxis', 'gsnBelowYRefLineBarColors', - 'gsnBelowYRefLineBarFillScales', 'gsnBelowYRefLineBarPatterns', - 'gsnBelowYRefLineColor', 'gsnBoxMargin', 'gsnCenterString', - 'gsnCenterStringFontColor', 'gsnCenterStringFontHeightF', - 'gsnCenterStringFuncCode', 'gsnCenterStringOrthogonalPosF', - 'gsnCenterStringParallelPosF', 'gsnContourLineThicknessesScale', - 'gsnContourNegLineDashPattern', 'gsnContourPosLineDashPattern', - 'gsnContourZeroLineThicknessF', 'gsnDebugWriteFileName', 'gsnDraw', - 'gsnFrame', 'gsnHistogramBarWidthPercent', 'gsnHistogramBinIntervals', - 'gsnHistogramBinMissing', 'gsnHistogramBinWidth', - 'gsnHistogramClassIntervals', 'gsnHistogramCompare', - 'gsnHistogramComputePercentages', - 'gsnHistogramComputePercentagesNoMissing', - 'gsnHistogramDiscreteBinValues', 'gsnHistogramDiscreteClassValues', - 'gsnHistogramHorizontal', 'gsnHistogramMinMaxBinsOn', - 'gsnHistogramNumberOfBins', 'gsnHistogramPercentSign', - 'gsnHistogramSelectNiceIntervals', 'gsnLeftString', - 'gsnLeftStringFontColor', 'gsnLeftStringFontHeightF', - 'gsnLeftStringFuncCode', 'gsnLeftStringOrthogonalPosF', - 'gsnLeftStringParallelPosF', 'gsnMajorLatSpacing', - 'gsnMajorLonSpacing', 'gsnMaskLambertConformal', - 'gsnMaskLambertConformalOutlineOn', 'gsnMaximize', - 'gsnMinorLatSpacing', 'gsnMinorLonSpacing', 'gsnPanelBottom', - 'gsnPanelCenter', 'gsnPanelDebug', 'gsnPanelFigureStrings', - 'gsnPanelFigureStringsBackgroundFillColor', - 'gsnPanelFigureStringsFontHeightF', 'gsnPanelFigureStringsJust', - 'gsnPanelFigureStringsPerimOn', 'gsnPanelLabelBar', 'gsnPanelLeft', - 'gsnPanelMainFont', 'gsnPanelMainFontColor', - 'gsnPanelMainFontHeightF', 'gsnPanelMainString', 'gsnPanelRight', - 'gsnPanelRowSpec', 'gsnPanelScalePlotIndex', 'gsnPanelTop', - 'gsnPanelXF', 'gsnPanelXWhiteSpacePercent', 'gsnPanelYF', - 'gsnPanelYWhiteSpacePercent', 'gsnPaperHeight', 'gsnPaperMargin', - 'gsnPaperOrientation', 'gsnPaperWidth', 'gsnPolar', - 'gsnPolarLabelDistance', 'gsnPolarLabelFont', - 'gsnPolarLabelFontHeightF', 'gsnPolarLabelSpacing', 'gsnPolarTime', - 'gsnPolarUT', 'gsnRightString', 'gsnRightStringFontColor', - 'gsnRightStringFontHeightF', 'gsnRightStringFuncCode', - 'gsnRightStringOrthogonalPosF', 'gsnRightStringParallelPosF', - 'gsnScalarContour', 'gsnScale', 'gsnShape', 'gsnSpreadColorEnd', - 'gsnSpreadColorStart', 'gsnSpreadColors', 'gsnStringFont', - 'gsnStringFontColor', 'gsnStringFontHeightF', 'gsnStringFuncCode', - 'gsnTickMarksOn', 'gsnXAxisIrregular2Linear', 'gsnXAxisIrregular2Log', - 'gsnXRefLine', 'gsnXRefLineColor', 'gsnXRefLineDashPattern', - 'gsnXRefLineThicknessF', 'gsnXYAboveFillColors', 'gsnXYBarChart', - 'gsnXYBarChartBarWidth', 'gsnXYBarChartColors', - 'gsnXYBarChartColors2', 'gsnXYBarChartFillDotSizeF', - 'gsnXYBarChartFillLineThicknessF', 'gsnXYBarChartFillOpacityF', - 'gsnXYBarChartFillScaleF', 'gsnXYBarChartOutlineOnly', - 'gsnXYBarChartOutlineThicknessF', 'gsnXYBarChartPatterns', - 'gsnXYBarChartPatterns2', 'gsnXYBelowFillColors', 'gsnXYFillColors', - 'gsnXYFillOpacities', 'gsnXYLeftFillColors', 'gsnXYRightFillColors', - 'gsnYAxisIrregular2Linear', 'gsnYAxisIrregular2Log', 'gsnYRefLine', - 'gsnYRefLineColor', 'gsnYRefLineColors', 'gsnYRefLineDashPattern', - 'gsnYRefLineDashPatterns', 'gsnYRefLineThicknessF', - 'gsnYRefLineThicknesses', 'gsnZonalMean', 'gsnZonalMeanXMaxF', - 'gsnZonalMeanXMinF', 'gsnZonalMeanYRefLine', 'lbAutoManage', - 'lbBottomMarginF', 'lbBoxCount', 'lbBoxEndCapStyle', 'lbBoxFractions', - 'lbBoxLineColor', 'lbBoxLineDashPattern', 'lbBoxLineDashSegLenF', - 'lbBoxLineThicknessF', 'lbBoxLinesOn', 'lbBoxMajorExtentF', - 'lbBoxMinorExtentF', 'lbBoxSeparatorLinesOn', 'lbBoxSizing', - 'lbFillBackground', 'lbFillColor', 'lbFillColors', 'lbFillDotSizeF', - 'lbFillLineThicknessF', 'lbFillPattern', 'lbFillPatterns', - 'lbFillScaleF', 'lbFillScales', 'lbJustification', 'lbLabelAlignment', - 'lbLabelAngleF', 'lbLabelAutoStride', 'lbLabelBarOn', - 'lbLabelConstantSpacingF', 'lbLabelDirection', 'lbLabelFont', - 'lbLabelFontAspectF', 'lbLabelFontColor', 'lbLabelFontHeightF', - 'lbLabelFontQuality', 'lbLabelFontThicknessF', 'lbLabelFuncCode', - 'lbLabelJust', 'lbLabelOffsetF', 'lbLabelPosition', 'lbLabelStride', - 'lbLabelStrings', 'lbLabelsOn', 'lbLeftMarginF', 'lbMaxLabelLenF', - 'lbMinLabelSpacingF', 'lbMonoFillColor', 'lbMonoFillPattern', - 'lbMonoFillScale', 'lbOrientation', 'lbPerimColor', - 'lbPerimDashPattern', 'lbPerimDashSegLenF', 'lbPerimFill', - 'lbPerimFillColor', 'lbPerimOn', 'lbPerimThicknessF', - 'lbRasterFillOn', 'lbRightMarginF', 'lbTitleAngleF', - 'lbTitleConstantSpacingF', 'lbTitleDirection', 'lbTitleExtentF', - 'lbTitleFont', 'lbTitleFontAspectF', 'lbTitleFontColor', - 'lbTitleFontHeightF', 'lbTitleFontQuality', 'lbTitleFontThicknessF', - 'lbTitleFuncCode', 'lbTitleJust', 'lbTitleOffsetF', 'lbTitleOn', - 'lbTitlePosition', 'lbTitleString', 'lbTopMarginF', 'lgAutoManage', - 'lgBottomMarginF', 'lgBoxBackground', 'lgBoxLineColor', - 'lgBoxLineDashPattern', 'lgBoxLineDashSegLenF', 'lgBoxLineThicknessF', - 'lgBoxLinesOn', 'lgBoxMajorExtentF', 'lgBoxMinorExtentF', - 'lgDashIndex', 'lgDashIndexes', 'lgItemCount', 'lgItemOrder', - 'lgItemPlacement', 'lgItemPositions', 'lgItemType', 'lgItemTypes', - 'lgJustification', 'lgLabelAlignment', 'lgLabelAngleF', - 'lgLabelAutoStride', 'lgLabelConstantSpacingF', 'lgLabelDirection', - 'lgLabelFont', 'lgLabelFontAspectF', 'lgLabelFontColor', - 'lgLabelFontHeightF', 'lgLabelFontQuality', 'lgLabelFontThicknessF', - 'lgLabelFuncCode', 'lgLabelJust', 'lgLabelOffsetF', 'lgLabelPosition', - 'lgLabelStride', 'lgLabelStrings', 'lgLabelsOn', 'lgLeftMarginF', - 'lgLegendOn', 'lgLineColor', 'lgLineColors', 'lgLineDashSegLenF', - 'lgLineDashSegLens', 'lgLineLabelConstantSpacingF', 'lgLineLabelFont', - 'lgLineLabelFontAspectF', 'lgLineLabelFontColor', - 'lgLineLabelFontColors', 'lgLineLabelFontHeightF', - 'lgLineLabelFontHeights', 'lgLineLabelFontQuality', - 'lgLineLabelFontThicknessF', 'lgLineLabelFuncCode', - 'lgLineLabelStrings', 'lgLineLabelsOn', 'lgLineThicknessF', - 'lgLineThicknesses', 'lgMarkerColor', 'lgMarkerColors', - 'lgMarkerIndex', 'lgMarkerIndexes', 'lgMarkerSizeF', 'lgMarkerSizes', - 'lgMarkerThicknessF', 'lgMarkerThicknesses', 'lgMonoDashIndex', - 'lgMonoItemType', 'lgMonoLineColor', 'lgMonoLineDashSegLen', - 'lgMonoLineLabelFontColor', 'lgMonoLineLabelFontHeight', - 'lgMonoLineThickness', 'lgMonoMarkerColor', 'lgMonoMarkerIndex', - 'lgMonoMarkerSize', 'lgMonoMarkerThickness', 'lgOrientation', - 'lgPerimColor', 'lgPerimDashPattern', 'lgPerimDashSegLenF', - 'lgPerimFill', 'lgPerimFillColor', 'lgPerimOn', 'lgPerimThicknessF', - 'lgRightMarginF', 'lgTitleAngleF', 'lgTitleConstantSpacingF', - 'lgTitleDirection', 'lgTitleExtentF', 'lgTitleFont', - 'lgTitleFontAspectF', 'lgTitleFontColor', 'lgTitleFontHeightF', - 'lgTitleFontQuality', 'lgTitleFontThicknessF', 'lgTitleFuncCode', - 'lgTitleJust', 'lgTitleOffsetF', 'lgTitleOn', 'lgTitlePosition', - 'lgTitleString', 'lgTopMarginF', 'mpAreaGroupCount', - 'mpAreaMaskingOn', 'mpAreaNames', 'mpAreaTypes', 'mpBottomAngleF', - 'mpBottomMapPosF', 'mpBottomNDCF', 'mpBottomNPCF', - 'mpBottomPointLatF', 'mpBottomPointLonF', 'mpBottomWindowF', - 'mpCenterLatF', 'mpCenterLonF', 'mpCenterRotF', 'mpCountyLineColor', - 'mpCountyLineDashPattern', 'mpCountyLineDashSegLenF', - 'mpCountyLineThicknessF', 'mpDataBaseVersion', 'mpDataResolution', - 'mpDataSetName', 'mpDefaultFillColor', 'mpDefaultFillPattern', - 'mpDefaultFillScaleF', 'mpDynamicAreaGroups', 'mpEllipticalBoundary', - 'mpFillAreaSpecifiers', 'mpFillBoundarySets', 'mpFillColor', - 'mpFillColors', 'mpFillColors-default', 'mpFillDotSizeF', - 'mpFillDrawOrder', 'mpFillOn', 'mpFillPatternBackground', - 'mpFillPattern', 'mpFillPatterns', 'mpFillPatterns-default', - 'mpFillScaleF', 'mpFillScales', 'mpFillScales-default', - 'mpFixedAreaGroups', 'mpGeophysicalLineColor', - 'mpGeophysicalLineDashPattern', 'mpGeophysicalLineDashSegLenF', - 'mpGeophysicalLineThicknessF', 'mpGreatCircleLinesOn', - 'mpGridAndLimbDrawOrder', 'mpGridAndLimbOn', 'mpGridLatSpacingF', - 'mpGridLineColor', 'mpGridLineDashPattern', 'mpGridLineDashSegLenF', - 'mpGridLineThicknessF', 'mpGridLonSpacingF', 'mpGridMaskMode', - 'mpGridMaxLatF', 'mpGridPolarLonSpacingF', 'mpGridSpacingF', - 'mpInlandWaterFillColor', 'mpInlandWaterFillPattern', - 'mpInlandWaterFillScaleF', 'mpLabelDrawOrder', 'mpLabelFontColor', - 'mpLabelFontHeightF', 'mpLabelsOn', 'mpLambertMeridianF', - 'mpLambertParallel1F', 'mpLambertParallel2F', 'mpLandFillColor', - 'mpLandFillPattern', 'mpLandFillScaleF', 'mpLeftAngleF', - 'mpLeftCornerLatF', 'mpLeftCornerLonF', 'mpLeftMapPosF', - 'mpLeftNDCF', 'mpLeftNPCF', 'mpLeftPointLatF', - 'mpLeftPointLonF', 'mpLeftWindowF', 'mpLimbLineColor', - 'mpLimbLineDashPattern', 'mpLimbLineDashSegLenF', - 'mpLimbLineThicknessF', 'mpLimitMode', 'mpMaskAreaSpecifiers', - 'mpMaskOutlineSpecifiers', 'mpMaxLatF', 'mpMaxLonF', - 'mpMinLatF', 'mpMinLonF', 'mpMonoFillColor', 'mpMonoFillPattern', - 'mpMonoFillScale', 'mpNationalLineColor', 'mpNationalLineDashPattern', - 'mpNationalLineThicknessF', 'mpOceanFillColor', 'mpOceanFillPattern', - 'mpOceanFillScaleF', 'mpOutlineBoundarySets', 'mpOutlineDrawOrder', - 'mpOutlineMaskingOn', 'mpOutlineOn', 'mpOutlineSpecifiers', - 'mpPerimDrawOrder', 'mpPerimLineColor', 'mpPerimLineDashPattern', - 'mpPerimLineDashSegLenF', 'mpPerimLineThicknessF', 'mpPerimOn', - 'mpPolyMode', 'mpProjection', 'mpProvincialLineColor', - 'mpProvincialLineDashPattern', 'mpProvincialLineDashSegLenF', - 'mpProvincialLineThicknessF', 'mpRelativeCenterLat', - 'mpRelativeCenterLon', 'mpRightAngleF', 'mpRightCornerLatF', - 'mpRightCornerLonF', 'mpRightMapPosF', 'mpRightNDCF', - 'mpRightNPCF', 'mpRightPointLatF', 'mpRightPointLonF', - 'mpRightWindowF', 'mpSatelliteAngle1F', 'mpSatelliteAngle2F', - 'mpSatelliteDistF', 'mpShapeMode', 'mpSpecifiedFillColors', - 'mpSpecifiedFillDirectIndexing', 'mpSpecifiedFillPatterns', - 'mpSpecifiedFillPriority', 'mpSpecifiedFillScales', - 'mpTopAngleF', 'mpTopMapPosF', 'mpTopNDCF', 'mpTopNPCF', - 'mpTopPointLatF', 'mpTopPointLonF', 'mpTopWindowF', - 'mpUSStateLineColor', 'mpUSStateLineDashPattern', - 'mpUSStateLineDashSegLenF', 'mpUSStateLineThicknessF', - 'pmAnnoManagers', 'pmAnnoViews', 'pmLabelBarDisplayMode', - 'pmLabelBarHeightF', 'pmLabelBarKeepAspect', 'pmLabelBarOrthogonalPosF', - 'pmLabelBarParallelPosF', 'pmLabelBarSide', 'pmLabelBarWidthF', - 'pmLabelBarZone', 'pmLegendDisplayMode', 'pmLegendHeightF', - 'pmLegendKeepAspect', 'pmLegendOrthogonalPosF', - 'pmLegendParallelPosF', 'pmLegendSide', 'pmLegendWidthF', - 'pmLegendZone', 'pmOverlaySequenceIds', 'pmTickMarkDisplayMode', - 'pmTickMarkZone', 'pmTitleDisplayMode', 'pmTitleZone', - 'prGraphicStyle', 'prPolyType', 'prXArray', 'prYArray', - 'sfCopyData', 'sfDataArray', 'sfDataMaxV', 'sfDataMinV', - 'sfElementNodes', 'sfExchangeDimensions', 'sfFirstNodeIndex', - 'sfMissingValueV', 'sfXArray', 'sfXCActualEndF', 'sfXCActualStartF', - 'sfXCEndIndex', 'sfXCEndSubsetV', 'sfXCEndV', 'sfXCStartIndex', - 'sfXCStartSubsetV', 'sfXCStartV', 'sfXCStride', 'sfXCellBounds', - 'sfYArray', 'sfYCActualEndF', 'sfYCActualStartF', 'sfYCEndIndex', - 'sfYCEndSubsetV', 'sfYCEndV', 'sfYCStartIndex', 'sfYCStartSubsetV', - 'sfYCStartV', 'sfYCStride', 'sfYCellBounds', 'stArrowLengthF', - 'stArrowStride', 'stCrossoverCheckCount', - 'stExplicitLabelBarLabelsOn', 'stLabelBarEndLabelsOn', - 'stLabelFormat', 'stLengthCheckCount', 'stLevelColors', - 'stLevelCount', 'stLevelPalette', 'stLevelSelectionMode', - 'stLevelSpacingF', 'stLevels', 'stLineColor', 'stLineOpacityF', - 'stLineStartStride', 'stLineThicknessF', 'stMapDirection', - 'stMaxLevelCount', 'stMaxLevelValF', 'stMinArrowSpacingF', - 'stMinDistanceF', 'stMinLevelValF', 'stMinLineSpacingF', - 'stMinStepFactorF', 'stMonoLineColor', 'stNoDataLabelOn', - 'stNoDataLabelString', 'stScalarFieldData', 'stScalarMissingValColor', - 'stSpanLevelPalette', 'stStepSizeF', 'stStreamlineDrawOrder', - 'stUseScalarArray', 'stVectorFieldData', 'stZeroFLabelAngleF', - 'stZeroFLabelBackgroundColor', 'stZeroFLabelConstantSpacingF', - 'stZeroFLabelFont', 'stZeroFLabelFontAspectF', - 'stZeroFLabelFontColor', 'stZeroFLabelFontHeightF', - 'stZeroFLabelFontQuality', 'stZeroFLabelFontThicknessF', - 'stZeroFLabelFuncCode', 'stZeroFLabelJust', 'stZeroFLabelOn', - 'stZeroFLabelOrthogonalPosF', 'stZeroFLabelParallelPosF', - 'stZeroFLabelPerimColor', 'stZeroFLabelPerimOn', - 'stZeroFLabelPerimSpaceF', 'stZeroFLabelPerimThicknessF', - 'stZeroFLabelSide', 'stZeroFLabelString', 'stZeroFLabelTextDirection', - 'stZeroFLabelZone', 'tfDoNDCOverlay', 'tfPlotManagerOn', - 'tfPolyDrawList', 'tfPolyDrawOrder', 'tiDeltaF', 'tiMainAngleF', - 'tiMainConstantSpacingF', 'tiMainDirection', 'tiMainFont', - 'tiMainFontAspectF', 'tiMainFontColor', 'tiMainFontHeightF', - 'tiMainFontQuality', 'tiMainFontThicknessF', 'tiMainFuncCode', - 'tiMainJust', 'tiMainOffsetXF', 'tiMainOffsetYF', 'tiMainOn', - 'tiMainPosition', 'tiMainSide', 'tiMainString', 'tiUseMainAttributes', - 'tiXAxisAngleF', 'tiXAxisConstantSpacingF', 'tiXAxisDirection', - 'tiXAxisFont', 'tiXAxisFontAspectF', 'tiXAxisFontColor', - 'tiXAxisFontHeightF', 'tiXAxisFontQuality', 'tiXAxisFontThicknessF', - 'tiXAxisFuncCode', 'tiXAxisJust', 'tiXAxisOffsetXF', - 'tiXAxisOffsetYF', 'tiXAxisOn', 'tiXAxisPosition', 'tiXAxisSide', - 'tiXAxisString', 'tiYAxisAngleF', 'tiYAxisConstantSpacingF', - 'tiYAxisDirection', 'tiYAxisFont', 'tiYAxisFontAspectF', - 'tiYAxisFontColor', 'tiYAxisFontHeightF', 'tiYAxisFontQuality', - 'tiYAxisFontThicknessF', 'tiYAxisFuncCode', 'tiYAxisJust', - 'tiYAxisOffsetXF', 'tiYAxisOffsetYF', 'tiYAxisOn', 'tiYAxisPosition', - 'tiYAxisSide', 'tiYAxisString', 'tmBorderLineColor', - 'tmBorderThicknessF', 'tmEqualizeXYSizes', 'tmLabelAutoStride', - 'tmSciNoteCutoff', 'tmXBAutoPrecision', 'tmXBBorderOn', - 'tmXBDataLeftF', 'tmXBDataRightF', 'tmXBFormat', 'tmXBIrrTensionF', - 'tmXBIrregularPoints', 'tmXBLabelAngleF', 'tmXBLabelConstantSpacingF', - 'tmXBLabelDeltaF', 'tmXBLabelDirection', 'tmXBLabelFont', - 'tmXBLabelFontAspectF', 'tmXBLabelFontColor', 'tmXBLabelFontHeightF', - 'tmXBLabelFontQuality', 'tmXBLabelFontThicknessF', - 'tmXBLabelFuncCode', 'tmXBLabelJust', 'tmXBLabelStride', 'tmXBLabels', - 'tmXBLabelsOn', 'tmXBMajorLengthF', 'tmXBMajorLineColor', - 'tmXBMajorOutwardLengthF', 'tmXBMajorThicknessF', 'tmXBMaxLabelLenF', - 'tmXBMaxTicks', 'tmXBMinLabelSpacingF', 'tmXBMinorLengthF', - 'tmXBMinorLineColor', 'tmXBMinorOn', 'tmXBMinorOutwardLengthF', - 'tmXBMinorPerMajor', 'tmXBMinorThicknessF', 'tmXBMinorValues', - 'tmXBMode', 'tmXBOn', 'tmXBPrecision', 'tmXBStyle', 'tmXBTickEndF', - 'tmXBTickSpacingF', 'tmXBTickStartF', 'tmXBValues', 'tmXMajorGrid', - 'tmXMajorGridLineColor', 'tmXMajorGridLineDashPattern', - 'tmXMajorGridThicknessF', 'tmXMinorGrid', 'tmXMinorGridLineColor', - 'tmXMinorGridLineDashPattern', 'tmXMinorGridThicknessF', - 'tmXTAutoPrecision', 'tmXTBorderOn', 'tmXTDataLeftF', - 'tmXTDataRightF', 'tmXTFormat', 'tmXTIrrTensionF', - 'tmXTIrregularPoints', 'tmXTLabelAngleF', 'tmXTLabelConstantSpacingF', - 'tmXTLabelDeltaF', 'tmXTLabelDirection', 'tmXTLabelFont', - 'tmXTLabelFontAspectF', 'tmXTLabelFontColor', 'tmXTLabelFontHeightF', - 'tmXTLabelFontQuality', 'tmXTLabelFontThicknessF', - 'tmXTLabelFuncCode', 'tmXTLabelJust', 'tmXTLabelStride', 'tmXTLabels', - 'tmXTLabelsOn', 'tmXTMajorLengthF', 'tmXTMajorLineColor', - 'tmXTMajorOutwardLengthF', 'tmXTMajorThicknessF', 'tmXTMaxLabelLenF', - 'tmXTMaxTicks', 'tmXTMinLabelSpacingF', 'tmXTMinorLengthF', - 'tmXTMinorLineColor', 'tmXTMinorOn', 'tmXTMinorOutwardLengthF', - 'tmXTMinorPerMajor', 'tmXTMinorThicknessF', 'tmXTMinorValues', - 'tmXTMode', 'tmXTOn', 'tmXTPrecision', 'tmXTStyle', 'tmXTTickEndF', - 'tmXTTickSpacingF', 'tmXTTickStartF', 'tmXTValues', 'tmXUseBottom', - 'tmYLAutoPrecision', 'tmYLBorderOn', 'tmYLDataBottomF', - 'tmYLDataTopF', 'tmYLFormat', 'tmYLIrrTensionF', - 'tmYLIrregularPoints', 'tmYLLabelAngleF', 'tmYLLabelConstantSpacingF', - 'tmYLLabelDeltaF', 'tmYLLabelDirection', 'tmYLLabelFont', - 'tmYLLabelFontAspectF', 'tmYLLabelFontColor', 'tmYLLabelFontHeightF', - 'tmYLLabelFontQuality', 'tmYLLabelFontThicknessF', - 'tmYLLabelFuncCode', 'tmYLLabelJust', 'tmYLLabelStride', 'tmYLLabels', - 'tmYLLabelsOn', 'tmYLMajorLengthF', 'tmYLMajorLineColor', - 'tmYLMajorOutwardLengthF', 'tmYLMajorThicknessF', 'tmYLMaxLabelLenF', - 'tmYLMaxTicks', 'tmYLMinLabelSpacingF', 'tmYLMinorLengthF', - 'tmYLMinorLineColor', 'tmYLMinorOn', 'tmYLMinorOutwardLengthF', - 'tmYLMinorPerMajor', 'tmYLMinorThicknessF', 'tmYLMinorValues', - 'tmYLMode', 'tmYLOn', 'tmYLPrecision', 'tmYLStyle', 'tmYLTickEndF', - 'tmYLTickSpacingF', 'tmYLTickStartF', 'tmYLValues', 'tmYMajorGrid', - 'tmYMajorGridLineColor', 'tmYMajorGridLineDashPattern', - 'tmYMajorGridThicknessF', 'tmYMinorGrid', 'tmYMinorGridLineColor', - 'tmYMinorGridLineDashPattern', 'tmYMinorGridThicknessF', - 'tmYRAutoPrecision', 'tmYRBorderOn', 'tmYRDataBottomF', - 'tmYRDataTopF', 'tmYRFormat', 'tmYRIrrTensionF', - 'tmYRIrregularPoints', 'tmYRLabelAngleF', 'tmYRLabelConstantSpacingF', - 'tmYRLabelDeltaF', 'tmYRLabelDirection', 'tmYRLabelFont', - 'tmYRLabelFontAspectF', 'tmYRLabelFontColor', 'tmYRLabelFontHeightF', - 'tmYRLabelFontQuality', 'tmYRLabelFontThicknessF', - 'tmYRLabelFuncCode', 'tmYRLabelJust', 'tmYRLabelStride', 'tmYRLabels', - 'tmYRLabelsOn', 'tmYRMajorLengthF', 'tmYRMajorLineColor', - 'tmYRMajorOutwardLengthF', 'tmYRMajorThicknessF', 'tmYRMaxLabelLenF', - 'tmYRMaxTicks', 'tmYRMinLabelSpacingF', 'tmYRMinorLengthF', - 'tmYRMinorLineColor', 'tmYRMinorOn', 'tmYRMinorOutwardLengthF', - 'tmYRMinorPerMajor', 'tmYRMinorThicknessF', 'tmYRMinorValues', - 'tmYRMode', 'tmYROn', 'tmYRPrecision', 'tmYRStyle', 'tmYRTickEndF', - 'tmYRTickSpacingF', 'tmYRTickStartF', 'tmYRValues', 'tmYUseLeft', - 'trGridType', 'trLineInterpolationOn', - 'trXAxisType', 'trXCoordPoints', 'trXInterPoints', 'trXLog', - 'trXMaxF', 'trXMinF', 'trXReverse', 'trXSamples', 'trXTensionF', - 'trYAxisType', 'trYCoordPoints', 'trYInterPoints', 'trYLog', - 'trYMaxF', 'trYMinF', 'trYReverse', 'trYSamples', 'trYTensionF', - 'txAngleF', 'txBackgroundFillColor', 'txConstantSpacingF', 'txDirection', - 'txFont', 'HLU-Fonts', 'txFontAspectF', 'txFontColor', - 'txFontHeightF', 'txFontOpacityF', 'txFontQuality', - 'txFontThicknessF', 'txFuncCode', 'txJust', 'txPerimColor', - 'txPerimDashLengthF', 'txPerimDashPattern', 'txPerimOn', - 'txPerimSpaceF', 'txPerimThicknessF', 'txPosXF', 'txPosYF', - 'txString', 'vcExplicitLabelBarLabelsOn', 'vcFillArrowEdgeColor', - 'vcFillArrowEdgeThicknessF', 'vcFillArrowFillColor', - 'vcFillArrowHeadInteriorXF', 'vcFillArrowHeadMinFracXF', - 'vcFillArrowHeadMinFracYF', 'vcFillArrowHeadXF', 'vcFillArrowHeadYF', - 'vcFillArrowMinFracWidthF', 'vcFillArrowWidthF', 'vcFillArrowsOn', - 'vcFillOverEdge', 'vcGlyphOpacityF', 'vcGlyphStyle', - 'vcLabelBarEndLabelsOn', 'vcLabelFontColor', 'vcLabelFontHeightF', - 'vcLabelsOn', 'vcLabelsUseVectorColor', 'vcLevelColors', - 'vcLevelCount', 'vcLevelPalette', 'vcLevelSelectionMode', - 'vcLevelSpacingF', 'vcLevels', 'vcLineArrowColor', - 'vcLineArrowHeadMaxSizeF', 'vcLineArrowHeadMinSizeF', - 'vcLineArrowThicknessF', 'vcMagnitudeFormat', - 'vcMagnitudeScaleFactorF', 'vcMagnitudeScaleValueF', - 'vcMagnitudeScalingMode', 'vcMapDirection', 'vcMaxLevelCount', - 'vcMaxLevelValF', 'vcMaxMagnitudeF', 'vcMinAnnoAngleF', - 'vcMinAnnoArrowAngleF', 'vcMinAnnoArrowEdgeColor', - 'vcMinAnnoArrowFillColor', 'vcMinAnnoArrowLineColor', - 'vcMinAnnoArrowMinOffsetF', 'vcMinAnnoArrowSpaceF', - 'vcMinAnnoArrowUseVecColor', 'vcMinAnnoBackgroundColor', - 'vcMinAnnoConstantSpacingF', 'vcMinAnnoExplicitMagnitudeF', - 'vcMinAnnoFont', 'vcMinAnnoFontAspectF', 'vcMinAnnoFontColor', - 'vcMinAnnoFontHeightF', 'vcMinAnnoFontQuality', - 'vcMinAnnoFontThicknessF', 'vcMinAnnoFuncCode', 'vcMinAnnoJust', - 'vcMinAnnoOn', 'vcMinAnnoOrientation', 'vcMinAnnoOrthogonalPosF', - 'vcMinAnnoParallelPosF', 'vcMinAnnoPerimColor', 'vcMinAnnoPerimOn', - 'vcMinAnnoPerimSpaceF', 'vcMinAnnoPerimThicknessF', 'vcMinAnnoSide', - 'vcMinAnnoString1', 'vcMinAnnoString1On', 'vcMinAnnoString2', - 'vcMinAnnoString2On', 'vcMinAnnoTextDirection', 'vcMinAnnoZone', - 'vcMinDistanceF', 'vcMinFracLengthF', 'vcMinLevelValF', - 'vcMinMagnitudeF', 'vcMonoFillArrowEdgeColor', - 'vcMonoFillArrowFillColor', 'vcMonoLineArrowColor', - 'vcMonoWindBarbColor', 'vcNoDataLabelOn', 'vcNoDataLabelString', - 'vcPositionMode', 'vcRefAnnoAngleF', 'vcRefAnnoArrowAngleF', - 'vcRefAnnoArrowEdgeColor', 'vcRefAnnoArrowFillColor', - 'vcRefAnnoArrowLineColor', 'vcRefAnnoArrowMinOffsetF', - 'vcRefAnnoArrowSpaceF', 'vcRefAnnoArrowUseVecColor', - 'vcRefAnnoBackgroundColor', 'vcRefAnnoConstantSpacingF', - 'vcRefAnnoExplicitMagnitudeF', 'vcRefAnnoFont', - 'vcRefAnnoFontAspectF', 'vcRefAnnoFontColor', 'vcRefAnnoFontHeightF', - 'vcRefAnnoFontQuality', 'vcRefAnnoFontThicknessF', - 'vcRefAnnoFuncCode', 'vcRefAnnoJust', 'vcRefAnnoOn', - 'vcRefAnnoOrientation', 'vcRefAnnoOrthogonalPosF', - 'vcRefAnnoParallelPosF', 'vcRefAnnoPerimColor', 'vcRefAnnoPerimOn', - 'vcRefAnnoPerimSpaceF', 'vcRefAnnoPerimThicknessF', 'vcRefAnnoSide', - 'vcRefAnnoString1', 'vcRefAnnoString1On', 'vcRefAnnoString2', - 'vcRefAnnoString2On', 'vcRefAnnoTextDirection', 'vcRefAnnoZone', - 'vcRefLengthF', 'vcRefMagnitudeF', 'vcScalarFieldData', - 'vcScalarMissingValColor', 'vcScalarValueFormat', - 'vcScalarValueScaleFactorF', 'vcScalarValueScaleValueF', - 'vcScalarValueScalingMode', 'vcSpanLevelPalette', 'vcUseRefAnnoRes', - 'vcUseScalarArray', 'vcVectorDrawOrder', 'vcVectorFieldData', - 'vcWindBarbCalmCircleSizeF', 'vcWindBarbColor', - 'vcWindBarbLineThicknessF', 'vcWindBarbScaleFactorF', - 'vcWindBarbTickAngleF', 'vcWindBarbTickLengthF', - 'vcWindBarbTickSpacingF', 'vcZeroFLabelAngleF', - 'vcZeroFLabelBackgroundColor', 'vcZeroFLabelConstantSpacingF', - 'vcZeroFLabelFont', 'vcZeroFLabelFontAspectF', - 'vcZeroFLabelFontColor', 'vcZeroFLabelFontHeightF', - 'vcZeroFLabelFontQuality', 'vcZeroFLabelFontThicknessF', - 'vcZeroFLabelFuncCode', 'vcZeroFLabelJust', 'vcZeroFLabelOn', - 'vcZeroFLabelOrthogonalPosF', 'vcZeroFLabelParallelPosF', - 'vcZeroFLabelPerimColor', 'vcZeroFLabelPerimOn', - 'vcZeroFLabelPerimSpaceF', 'vcZeroFLabelPerimThicknessF', - 'vcZeroFLabelSide', 'vcZeroFLabelString', 'vcZeroFLabelTextDirection', - 'vcZeroFLabelZone', 'vfCopyData', 'vfDataArray', - 'vfExchangeDimensions', 'vfExchangeUVData', 'vfMagMaxV', 'vfMagMinV', - 'vfMissingUValueV', 'vfMissingVValueV', 'vfPolarData', - 'vfSingleMissingValue', 'vfUDataArray', 'vfUMaxV', 'vfUMinV', - 'vfVDataArray', 'vfVMaxV', 'vfVMinV', 'vfXArray', 'vfXCActualEndF', - 'vfXCActualStartF', 'vfXCEndIndex', 'vfXCEndSubsetV', 'vfXCEndV', - 'vfXCStartIndex', 'vfXCStartSubsetV', 'vfXCStartV', 'vfXCStride', - 'vfYArray', 'vfYCActualEndF', 'vfYCActualStartF', 'vfYCEndIndex', - 'vfYCEndSubsetV', 'vfYCEndV', 'vfYCStartIndex', 'vfYCStartSubsetV', - 'vfYCStartV', 'vfYCStride', 'vpAnnoManagerId', 'vpClipOn', - 'vpHeightF', 'vpKeepAspect', 'vpOn', 'vpUseSegments', 'vpWidthF', - 'vpXF', 'vpYF', 'wkAntiAlias', 'wkBackgroundColor', 'wkBackgroundOpacityF', - 'wkColorMapLen', 'wkColorMap', 'wkColorModel', 'wkDashTableLength', - 'wkDefGraphicStyleId', 'wkDeviceLowerX', 'wkDeviceLowerY', - 'wkDeviceUpperX', 'wkDeviceUpperY', 'wkFileName', 'wkFillTableLength', - 'wkForegroundColor', 'wkFormat', 'wkFullBackground', 'wkGksWorkId', - 'wkHeight', 'wkMarkerTableLength', 'wkMetaName', 'wkOrientation', - 'wkPDFFileName', 'wkPDFFormat', 'wkPDFResolution', 'wkPSFileName', - 'wkPSFormat', 'wkPSResolution', 'wkPaperHeightF', 'wkPaperSize', - 'wkPaperWidthF', 'wkPause', 'wkTopLevelViews', 'wkViews', - 'wkVisualType', 'wkWidth', 'wkWindowId', 'wkXColorMode', 'wsCurrentSize', - 'wsMaximumSize', 'wsThresholdSize', 'xyComputeXMax', - 'xyComputeXMin', 'xyComputeYMax', 'xyComputeYMin', 'xyCoordData', - 'xyCoordDataSpec', 'xyCurveDrawOrder', 'xyDashPattern', - 'xyDashPatterns', 'xyExplicitLabels', 'xyExplicitLegendLabels', - 'xyLabelMode', 'xyLineColor', 'xyLineColors', 'xyLineDashSegLenF', - 'xyLineLabelConstantSpacingF', 'xyLineLabelFont', - 'xyLineLabelFontAspectF', 'xyLineLabelFontColor', - 'xyLineLabelFontColors', 'xyLineLabelFontHeightF', - 'xyLineLabelFontQuality', 'xyLineLabelFontThicknessF', - 'xyLineLabelFuncCode', 'xyLineThicknessF', 'xyLineThicknesses', - 'xyMarkLineMode', 'xyMarkLineModes', 'xyMarker', 'xyMarkerColor', - 'xyMarkerColors', 'xyMarkerSizeF', 'xyMarkerSizes', - 'xyMarkerThicknessF', 'xyMarkerThicknesses', 'xyMarkers', - 'xyMonoDashPattern', 'xyMonoLineColor', 'xyMonoLineLabelFontColor', - 'xyMonoLineThickness', 'xyMonoMarkLineMode', 'xyMonoMarker', - 'xyMonoMarkerColor', 'xyMonoMarkerSize', 'xyMonoMarkerThickness', - 'xyXIrrTensionF', 'xyXIrregularPoints', 'xyXStyle', 'xyYIrrTensionF', - 'xyYIrregularPoints', 'xyYStyle'), prefix=r'\b'), - Name.Builtin), - - # Booleans - (r'\.(True|False)\.', Name.Builtin), - # Comparing Operators - (r'\.(eq|ne|lt|le|gt|ge|not|and|or|xor)\.', Operator.Word), - ], - - 'strings': [ - (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double), - ], - - 'nums': [ - (r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer), - (r'[+-]?\d*\.\d+(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float), - (r'[+-]?\d+\.\d*(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float), - ], - } + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['NCLLexer'] + + +class NCLLexer(RegexLexer): + """ + Lexer for NCL code. + + .. versionadded:: 2.2 + """ + name = 'NCL' + aliases = ['ncl'] + filenames = ['*.ncl'] + mimetypes = ['text/ncl'] + flags = re.MULTILINE + + tokens = { + 'root': [ + (r';.*\n', Comment), + include('strings'), + include('core'), + (r'[a-zA-Z_]\w*', Name), + include('nums'), + (r'[\s]+', Text), + ], + 'core': [ + # Statements + (words(( + 'begin', 'break', 'continue', 'create', 'defaultapp', 'do', + 'else', 'end', 'external', 'exit', 'True', 'False', 'file', 'function', + 'getvalues', 'graphic', 'group', 'if', 'list', 'load', 'local', + 'new', '_Missing', 'Missing', 'noparent', 'procedure', + 'quit', 'QUIT', 'Quit', 'record', 'return', 'setvalues', 'stop', + 'then', 'while'), prefix=r'\b', suffix=r'\s*\b'), + Keyword), + + # Data Types + (words(( + 'ubyte', 'uint', 'uint64', 'ulong', 'string', 'byte', + 'character', 'double', 'float', 'integer', 'int64', 'logical', + 'long', 'short', 'ushort', 'enumeric', 'numeric', 'snumeric'), + prefix=r'\b', suffix=r'\s*\b'), + Keyword.Type), + + # Operators + (r'[\%^*+\-/<>]', Operator), + + # punctuation: + (r'[\[\]():@$!&|.,\\{}]', Punctuation), + (r'[=:]', Punctuation), + + # Intrinsics + (words(( + 'abs', 'acos', 'addfile', 'addfiles', 'all', 'angmom_atm', 'any', + 'area_conserve_remap', 'area_hi2lores', 'area_poly_sphere', + 'asciiread', 'asciiwrite', 'asin', 'atan', 'atan2', 'attsetvalues', + 'avg', 'betainc', 'bin_avg', 'bin_sum', 'bw_bandpass_filter', + 'cancor', 'cbinread', 'cbinwrite', 'cd_calendar', 'cd_inv_calendar', + 'cdfbin_p', 'cdfbin_pr', 'cdfbin_s', 'cdfbin_xn', 'cdfchi_p', + 'cdfchi_x', 'cdfgam_p', 'cdfgam_x', 'cdfnor_p', 'cdfnor_x', + 'cdft_p', 'cdft_t', 'ceil', 'center_finite_diff', + 'center_finite_diff_n', 'cfftb', 'cfftf', 'cfftf_frq_reorder', + 'charactertodouble', 'charactertofloat', 'charactertointeger', + 'charactertolong', 'charactertoshort', 'charactertostring', + 'chartodouble', 'chartofloat', 'chartoint', 'chartointeger', + 'chartolong', 'chartoshort', 'chartostring', 'chiinv', 'clear', + 'color_index_to_rgba', 'conform', 'conform_dims', 'cos', 'cosh', + 'count_unique_values', 'covcorm', 'covcorm_xy', 'craybinnumrec', + 'craybinrecread', 'create_graphic', 'csa1', 'csa1d', 'csa1s', + 'csa1x', 'csa1xd', 'csa1xs', 'csa2', 'csa2d', 'csa2l', 'csa2ld', + 'csa2ls', 'csa2lx', 'csa2lxd', 'csa2lxs', 'csa2s', 'csa2x', + 'csa2xd', 'csa2xs', 'csa3', 'csa3d', 'csa3l', 'csa3ld', 'csa3ls', + 'csa3lx', 'csa3lxd', 'csa3lxs', 'csa3s', 'csa3x', 'csa3xd', + 'csa3xs', 'csc2s', 'csgetp', 'css2c', 'cssetp', 'cssgrid', 'csstri', + 'csvoro', 'cumsum', 'cz2ccm', 'datatondc', 'day_of_week', + 'day_of_year', 'days_in_month', 'default_fillvalue', 'delete', + 'depth_to_pres', 'destroy', 'determinant', 'dewtemp_trh', + 'dgeevx_lapack', 'dim_acumrun_n', 'dim_avg', 'dim_avg_n', + 'dim_avg_wgt', 'dim_avg_wgt_n', 'dim_cumsum', 'dim_cumsum_n', + 'dim_gamfit_n', 'dim_gbits', 'dim_max', 'dim_max_n', 'dim_median', + 'dim_median_n', 'dim_min', 'dim_min_n', 'dim_num', 'dim_num_n', + 'dim_numrun_n', 'dim_pqsort', 'dim_pqsort_n', 'dim_product', + 'dim_product_n', 'dim_rmsd', 'dim_rmsd_n', 'dim_rmvmean', + 'dim_rmvmean_n', 'dim_rmvmed', 'dim_rmvmed_n', 'dim_spi_n', + 'dim_standardize', 'dim_standardize_n', 'dim_stat4', 'dim_stat4_n', + 'dim_stddev', 'dim_stddev_n', 'dim_sum', 'dim_sum_n', 'dim_sum_wgt', + 'dim_sum_wgt_n', 'dim_variance', 'dim_variance_n', 'dimsizes', + 'doubletobyte', 'doubletochar', 'doubletocharacter', + 'doubletofloat', 'doubletoint', 'doubletointeger', 'doubletolong', + 'doubletoshort', 'dpres_hybrid_ccm', 'dpres_plevel', 'draw', + 'draw_color_palette', 'dsgetp', 'dsgrid2', 'dsgrid2d', 'dsgrid2s', + 'dsgrid3', 'dsgrid3d', 'dsgrid3s', 'dspnt2', 'dspnt2d', 'dspnt2s', + 'dspnt3', 'dspnt3d', 'dspnt3s', 'dssetp', 'dtrend', 'dtrend_msg', + 'dtrend_msg_n', 'dtrend_n', 'dtrend_quadratic', + 'dtrend_quadratic_msg_n', 'dv2uvf', 'dv2uvg', 'dz_height', + 'echo_off', 'echo_on', 'eof2data', 'eof_varimax', 'eofcor', + 'eofcor_pcmsg', 'eofcor_ts', 'eofcov', 'eofcov_pcmsg', 'eofcov_ts', + 'eofunc', 'eofunc_ts', 'eofunc_varimax', 'equiv_sample_size', 'erf', + 'erfc', 'esacr', 'esacv', 'esccr', 'esccv', 'escorc', 'escorc_n', + 'escovc', 'exit', 'exp', 'exp_tapersh', 'exp_tapersh_wgts', + 'exp_tapershC', 'ezfftb', 'ezfftb_n', 'ezfftf', 'ezfftf_n', + 'f2fosh', 'f2foshv', 'f2fsh', 'f2fshv', 'f2gsh', 'f2gshv', 'fabs', + 'fbindirread', 'fbindirwrite', 'fbinnumrec', 'fbinread', + 'fbinrecread', 'fbinrecwrite', 'fbinwrite', 'fft2db', 'fft2df', + 'fftshift', 'fileattdef', 'filechunkdimdef', 'filedimdef', + 'fileexists', 'filegrpdef', 'filevarattdef', 'filevarchunkdef', + 'filevarcompressleveldef', 'filevardef', 'filevardimsizes', + 'filwgts_lancos', 'filwgts_lanczos', 'filwgts_normal', + 'floattobyte', 'floattochar', 'floattocharacter', 'floattoint', + 'floattointeger', 'floattolong', 'floattoshort', 'floor', + 'fluxEddy', 'fo2fsh', 'fo2fshv', 'fourier_info', 'frame', 'fspan', + 'ftcurv', 'ftcurvd', 'ftcurvi', 'ftcurvp', 'ftcurvpi', 'ftcurvps', + 'ftcurvs', 'ftest', 'ftgetp', 'ftkurv', 'ftkurvd', 'ftkurvp', + 'ftkurvpd', 'ftsetp', 'ftsurf', 'g2fsh', 'g2fshv', 'g2gsh', + 'g2gshv', 'gamma', 'gammainc', 'gaus', 'gaus_lobat', + 'gaus_lobat_wgt', 'gc_aangle', 'gc_clkwise', 'gc_dangle', + 'gc_inout', 'gc_latlon', 'gc_onarc', 'gc_pnt2gc', 'gc_qarea', + 'gc_tarea', 'generate_2d_array', 'get_color_index', + 'get_color_rgba', 'get_cpu_time', 'get_isolines', 'get_ncl_version', + 'get_script_name', 'get_script_prefix_name', 'get_sphere_radius', + 'get_unique_values', 'getbitsone', 'getenv', 'getfiledimsizes', + 'getfilegrpnames', 'getfilepath', 'getfilevaratts', + 'getfilevarchunkdimsizes', 'getfilevardims', 'getfilevardimsizes', + 'getfilevarnames', 'getfilevartypes', 'getvaratts', 'getvardims', + 'gradsf', 'gradsg', 'greg2jul', 'grid2triple', 'hlsrgb', 'hsvrgb', + 'hydro', 'hyi2hyo', 'idsfft', 'igradsf', 'igradsg', 'ilapsf', + 'ilapsg', 'ilapvf', 'ilapvg', 'ind', 'ind_resolve', 'int2p', + 'int2p_n', 'integertobyte', 'integertochar', 'integertocharacter', + 'integertoshort', 'inttobyte', 'inttochar', 'inttoshort', + 'inverse_matrix', 'isatt', 'isbigendian', 'isbyte', 'ischar', + 'iscoord', 'isdefined', 'isdim', 'isdimnamed', 'isdouble', + 'isenumeric', 'isfile', 'isfilepresent', 'isfilevar', + 'isfilevaratt', 'isfilevarcoord', 'isfilevardim', 'isfloat', + 'isfunc', 'isgraphic', 'isint', 'isint64', 'isinteger', + 'isleapyear', 'islogical', 'islong', 'ismissing', 'isnan_ieee', + 'isnumeric', 'ispan', 'isproc', 'isshort', 'issnumeric', 'isstring', + 'isubyte', 'isuint', 'isuint64', 'isulong', 'isunlimited', + 'isunsigned', 'isushort', 'isvar', 'jul2greg', 'kmeans_as136', + 'kolsm2_n', 'kron_product', 'lapsf', 'lapsg', 'lapvf', 'lapvg', + 'latlon2utm', 'lclvl', 'lderuvf', 'lderuvg', 'linint1', 'linint1_n', + 'linint2', 'linint2_points', 'linmsg', 'linmsg_n', 'linrood_latwgt', + 'linrood_wgt', 'list_files', 'list_filevars', 'list_hlus', + 'list_procfuncs', 'list_vars', 'ListAppend', 'ListCount', + 'ListGetType', 'ListIndex', 'ListIndexFromName', 'ListPop', + 'ListPush', 'ListSetType', 'loadscript', 'local_max', 'local_min', + 'log', 'log10', 'longtobyte', 'longtochar', 'longtocharacter', + 'longtoint', 'longtointeger', 'longtoshort', 'lspoly', 'lspoly_n', + 'mask', 'max', 'maxind', 'min', 'minind', 'mixed_layer_depth', + 'mixhum_ptd', 'mixhum_ptrh', 'mjo_cross_coh2pha', + 'mjo_cross_segment', 'moc_globe_atl', 'monthday', 'natgrid', + 'natgridd', 'natgrids', 'ncargpath', 'ncargversion', 'ndctodata', + 'ndtooned', 'new', 'NewList', 'ngezlogo', 'nggcog', 'nggetp', + 'nglogo', 'ngsetp', 'NhlAddAnnotation', 'NhlAddData', + 'NhlAddOverlay', 'NhlAddPrimitive', 'NhlAppGetDefaultParentId', + 'NhlChangeWorkstation', 'NhlClassName', 'NhlClearWorkstation', + 'NhlDataPolygon', 'NhlDataPolyline', 'NhlDataPolymarker', + 'NhlDataToNDC', 'NhlDestroy', 'NhlDraw', 'NhlFrame', 'NhlFreeColor', + 'NhlGetBB', 'NhlGetClassResources', 'NhlGetErrorObjectId', + 'NhlGetNamedColorIndex', 'NhlGetParentId', + 'NhlGetParentWorkstation', 'NhlGetWorkspaceObjectId', + 'NhlIsAllocatedColor', 'NhlIsApp', 'NhlIsDataComm', 'NhlIsDataItem', + 'NhlIsDataSpec', 'NhlIsTransform', 'NhlIsView', 'NhlIsWorkstation', + 'NhlName', 'NhlNDCPolygon', 'NhlNDCPolyline', 'NhlNDCPolymarker', + 'NhlNDCToData', 'NhlNewColor', 'NhlNewDashPattern', 'NhlNewMarker', + 'NhlPalGetDefined', 'NhlRemoveAnnotation', 'NhlRemoveData', + 'NhlRemoveOverlay', 'NhlRemovePrimitive', 'NhlSetColor', + 'NhlSetDashPattern', 'NhlSetMarker', 'NhlUpdateData', + 'NhlUpdateWorkstation', 'nice_mnmxintvl', 'nngetaspectd', + 'nngetaspects', 'nngetp', 'nngetsloped', 'nngetslopes', 'nngetwts', + 'nngetwtsd', 'nnpnt', 'nnpntd', 'nnpntend', 'nnpntendd', + 'nnpntinit', 'nnpntinitd', 'nnpntinits', 'nnpnts', 'nnsetp', 'num', + 'obj_anal_ic', 'omega_ccm', 'onedtond', 'overlay', 'paleo_outline', + 'pdfxy_bin', 'poisson_grid_fill', 'pop_remap', 'potmp_insitu_ocn', + 'prcwater_dp', 'pres2hybrid', 'pres_hybrid_ccm', 'pres_sigma', + 'print', 'print_table', 'printFileVarSummary', 'printVarSummary', + 'product', 'pslec', 'pslhor', 'pslhyp', 'qsort', 'rand', + 'random_chi', 'random_gamma', 'random_normal', 'random_setallseed', + 'random_uniform', 'rcm2points', 'rcm2rgrid', 'rdsstoi', + 'read_colormap_file', 'reg_multlin', 'regcoef', 'regCoef_n', + 'regline', 'relhum', 'replace_ieeenan', 'reshape', 'reshape_ind', + 'rgba_to_color_index', 'rgbhls', 'rgbhsv', 'rgbyiq', 'rgrid2rcm', + 'rhomb_trunc', 'rip_cape_2d', 'rip_cape_3d', 'round', 'rtest', + 'runave', 'runave_n', 'set_default_fillvalue', 'set_sphere_radius', + 'setfileoption', 'sfvp2uvf', 'sfvp2uvg', 'shaec', 'shagc', + 'shgetnp', 'shgetp', 'shgrid', 'shorttobyte', 'shorttochar', + 'shorttocharacter', 'show_ascii', 'shsec', 'shsetp', 'shsgc', + 'shsgc_R42', 'sigma2hybrid', 'simpeq', 'simpne', 'sin', + 'sindex_yrmo', 'sinh', 'sizeof', 'sleep', 'smth9', 'snindex_yrmo', + 'solve_linsys', 'span_color_indexes', 'span_color_rgba', + 'sparse_matrix_mult', 'spcorr', 'spcorr_n', 'specx_anal', + 'specxy_anal', 'spei', 'sprintf', 'sprinti', 'sqrt', 'sqsort', + 'srand', 'stat2', 'stat4', 'stat_medrng', 'stat_trim', + 'status_exit', 'stdatmus_p2tdz', 'stdatmus_z2tdp', 'stddev', + 'str_capital', 'str_concat', 'str_fields_count', 'str_get_cols', + 'str_get_dq', 'str_get_field', 'str_get_nl', 'str_get_sq', + 'str_get_tab', 'str_index_of_substr', 'str_insert', 'str_is_blank', + 'str_join', 'str_left_strip', 'str_lower', 'str_match', + 'str_match_ic', 'str_match_ic_regex', 'str_match_ind', + 'str_match_ind_ic', 'str_match_ind_ic_regex', 'str_match_ind_regex', + 'str_match_regex', 'str_right_strip', 'str_split', + 'str_split_by_length', 'str_split_csv', 'str_squeeze', 'str_strip', + 'str_sub_str', 'str_switch', 'str_upper', 'stringtochar', + 'stringtocharacter', 'stringtodouble', 'stringtofloat', + 'stringtoint', 'stringtointeger', 'stringtolong', 'stringtoshort', + 'strlen', 'student_t', 'sum', 'svd_lapack', 'svdcov', 'svdcov_sv', + 'svdstd', 'svdstd_sv', 'system', 'systemfunc', 'tan', 'tanh', + 'taper', 'taper_n', 'tdclrs', 'tdctri', 'tdcudp', 'tdcurv', + 'tddtri', 'tdez2d', 'tdez3d', 'tdgetp', 'tdgrds', 'tdgrid', + 'tdgtrs', 'tdinit', 'tditri', 'tdlbla', 'tdlblp', 'tdlbls', + 'tdline', 'tdlndp', 'tdlnpa', 'tdlpdp', 'tdmtri', 'tdotri', + 'tdpara', 'tdplch', 'tdprpa', 'tdprpi', 'tdprpt', 'tdsetp', + 'tdsort', 'tdstri', 'tdstrs', 'tdttri', 'thornthwaite', 'tobyte', + 'tochar', 'todouble', 'tofloat', 'toint', 'toint64', 'tointeger', + 'tolong', 'toshort', 'tosigned', 'tostring', 'tostring_with_format', + 'totype', 'toubyte', 'touint', 'touint64', 'toulong', 'tounsigned', + 'toushort', 'trend_manken', 'tri_trunc', 'triple2grid', + 'triple2grid2d', 'trop_wmo', 'ttest', 'typeof', 'undef', + 'unique_string', 'update', 'ushorttoint', 'ut_calendar', + 'ut_inv_calendar', 'utm2latlon', 'uv2dv_cfd', 'uv2dvf', 'uv2dvg', + 'uv2sfvpf', 'uv2sfvpg', 'uv2vr_cfd', 'uv2vrdvf', 'uv2vrdvg', + 'uv2vrf', 'uv2vrg', 'v5d_close', 'v5d_create', 'v5d_setLowLev', + 'v5d_setUnits', 'v5d_write', 'v5d_write_var', 'variance', 'vhaec', + 'vhagc', 'vhsec', 'vhsgc', 'vibeta', 'vinth2p', 'vinth2p_ecmwf', + 'vinth2p_ecmwf_nodes', 'vinth2p_nodes', 'vintp2p_ecmwf', 'vr2uvf', + 'vr2uvg', 'vrdv2uvf', 'vrdv2uvg', 'wavelet', 'wavelet_default', + 'weibull', 'wgt_area_smooth', 'wgt_areaave', 'wgt_areaave2', + 'wgt_arearmse', 'wgt_arearmse2', 'wgt_areasum2', 'wgt_runave', + 'wgt_runave_n', 'wgt_vert_avg_beta', 'wgt_volave', 'wgt_volave_ccm', + 'wgt_volrmse', 'wgt_volrmse_ccm', 'where', 'wk_smooth121', 'wmbarb', + 'wmbarbmap', 'wmdrft', 'wmgetp', 'wmlabs', 'wmsetp', 'wmstnm', + 'wmvect', 'wmvectmap', 'wmvlbl', 'wrf_avo', 'wrf_cape_2d', + 'wrf_cape_3d', 'wrf_dbz', 'wrf_eth', 'wrf_helicity', 'wrf_ij_to_ll', + 'wrf_interp_1d', 'wrf_interp_2d_xy', 'wrf_interp_3d_z', + 'wrf_latlon_to_ij', 'wrf_ll_to_ij', 'wrf_omega', 'wrf_pvo', + 'wrf_rh', 'wrf_slp', 'wrf_smooth_2d', 'wrf_td', 'wrf_tk', + 'wrf_updraft_helicity', 'wrf_uvmet', 'wrf_virtual_temp', + 'wrf_wetbulb', 'wrf_wps_close_int', 'wrf_wps_open_int', + 'wrf_wps_rddata_int', 'wrf_wps_rdhead_int', 'wrf_wps_read_int', + 'wrf_wps_write_int', 'write_matrix', 'write_table', 'yiqrgb', + 'z2geouv', 'zonal_mpsi', 'addfiles_GetVar', 'advect_variable', + 'area_conserve_remap_Wrap', 'area_hi2lores_Wrap', + 'array_append_record', 'assignFillValue', 'byte2flt', + 'byte2flt_hdf', 'calcDayAnomTLL', 'calcMonAnomLLLT', + 'calcMonAnomLLT', 'calcMonAnomTLL', 'calcMonAnomTLLL', + 'calculate_monthly_values', 'cd_convert', 'changeCase', + 'changeCaseChar', 'clmDayTLL', 'clmDayTLLL', 'clmMon2clmDay', + 'clmMonLLLT', 'clmMonLLT', 'clmMonTLL', 'clmMonTLLL', 'closest_val', + 'copy_VarAtts', 'copy_VarCoords', 'copy_VarCoords_1', + 'copy_VarCoords_2', 'copy_VarMeta', 'copyatt', 'crossp3', + 'cshstringtolist', 'cssgrid_Wrap', 'dble2flt', 'decimalPlaces', + 'delete_VarAtts', 'dim_avg_n_Wrap', 'dim_avg_wgt_n_Wrap', + 'dim_avg_wgt_Wrap', 'dim_avg_Wrap', 'dim_cumsum_n_Wrap', + 'dim_cumsum_Wrap', 'dim_max_n_Wrap', 'dim_min_n_Wrap', + 'dim_rmsd_n_Wrap', 'dim_rmsd_Wrap', 'dim_rmvmean_n_Wrap', + 'dim_rmvmean_Wrap', 'dim_rmvmed_n_Wrap', 'dim_rmvmed_Wrap', + 'dim_standardize_n_Wrap', 'dim_standardize_Wrap', + 'dim_stddev_n_Wrap', 'dim_stddev_Wrap', 'dim_sum_n_Wrap', + 'dim_sum_wgt_n_Wrap', 'dim_sum_wgt_Wrap', 'dim_sum_Wrap', + 'dim_variance_n_Wrap', 'dim_variance_Wrap', 'dpres_plevel_Wrap', + 'dtrend_leftdim', 'dv2uvF_Wrap', 'dv2uvG_Wrap', 'eof_north', + 'eofcor_Wrap', 'eofcov_Wrap', 'eofunc_north', 'eofunc_ts_Wrap', + 'eofunc_varimax_reorder', 'eofunc_varimax_Wrap', 'eofunc_Wrap', + 'epsZero', 'f2fosh_Wrap', 'f2foshv_Wrap', 'f2fsh_Wrap', + 'f2fshv_Wrap', 'f2gsh_Wrap', 'f2gshv_Wrap', 'fbindirSwap', + 'fbinseqSwap1', 'fbinseqSwap2', 'flt2dble', 'flt2string', + 'fo2fsh_Wrap', 'fo2fshv_Wrap', 'g2fsh_Wrap', 'g2fshv_Wrap', + 'g2gsh_Wrap', 'g2gshv_Wrap', 'generate_resample_indices', + 'generate_sample_indices', 'generate_unique_indices', + 'genNormalDist', 'get1Dindex', 'get1Dindex_Collapse', + 'get1Dindex_Exclude', 'get_file_suffix', 'GetFillColor', + 'GetFillColorIndex', 'getFillValue', 'getind_latlon2d', + 'getVarDimNames', 'getVarFillValue', 'grib_stime2itime', + 'hyi2hyo_Wrap', 'ilapsF_Wrap', 'ilapsG_Wrap', 'ind_nearest_coord', + 'indStrSubset', 'int2dble', 'int2flt', 'int2p_n_Wrap', 'int2p_Wrap', + 'isMonotonic', 'isStrSubset', 'latGau', 'latGauWgt', 'latGlobeF', + 'latGlobeFo', 'latRegWgt', 'linint1_n_Wrap', 'linint1_Wrap', + 'linint2_points_Wrap', 'linint2_Wrap', 'local_max_1d', + 'local_min_1d', 'lonFlip', 'lonGlobeF', 'lonGlobeFo', 'lonPivot', + 'merge_levels_sfc', 'mod', 'month_to_annual', + 'month_to_annual_weighted', 'month_to_season', 'month_to_season12', + 'month_to_seasonN', 'monthly_total_to_daily_mean', 'nameDim', + 'natgrid_Wrap', 'NewCosWeight', 'niceLatLon2D', 'NormCosWgtGlobe', + 'numAsciiCol', 'numAsciiRow', 'numeric2int', + 'obj_anal_ic_deprecated', 'obj_anal_ic_Wrap', 'omega_ccm_driver', + 'omega_to_w', 'oneDtostring', 'pack_values', 'pattern_cor', 'pdfx', + 'pdfxy', 'pdfxy_conform', 'pot_temp', 'pot_vort_hybrid', + 'pot_vort_isobaric', 'pres2hybrid_Wrap', 'print_clock', + 'printMinMax', 'quadroots', 'rcm2points_Wrap', 'rcm2rgrid_Wrap', + 'readAsciiHead', 'readAsciiTable', 'reg_multlin_stats', + 'region_ind', 'regline_stats', 'relhum_ttd', 'replaceSingleChar', + 'RGBtoCmap', 'rgrid2rcm_Wrap', 'rho_mwjf', 'rm_single_dims', + 'rmAnnCycle1D', 'rmInsufData', 'rmMonAnnCycLLLT', 'rmMonAnnCycLLT', + 'rmMonAnnCycTLL', 'runave_n_Wrap', 'runave_Wrap', 'short2flt', + 'short2flt_hdf', 'shsgc_R42_Wrap', 'sign_f90', 'sign_matlab', + 'smth9_Wrap', 'smthClmDayTLL', 'smthClmDayTLLL', 'SqrtCosWeight', + 'stat_dispersion', 'static_stability', 'stdMonLLLT', 'stdMonLLT', + 'stdMonTLL', 'stdMonTLLL', 'symMinMaxPlt', 'table_attach_columns', + 'table_attach_rows', 'time_to_newtime', 'transpose', + 'triple2grid_Wrap', 'ut_convert', 'uv2dvF_Wrap', 'uv2dvG_Wrap', + 'uv2vrF_Wrap', 'uv2vrG_Wrap', 'vr2uvF_Wrap', 'vr2uvG_Wrap', + 'w_to_omega', 'wallClockElapseTime', 'wave_number_spc', + 'wgt_areaave_Wrap', 'wgt_runave_leftdim', 'wgt_runave_n_Wrap', + 'wgt_runave_Wrap', 'wgt_vertical_n', 'wind_component', + 'wind_direction', 'yyyyddd_to_yyyymmdd', 'yyyymm_time', + 'yyyymm_to_yyyyfrac', 'yyyymmdd_time', 'yyyymmdd_to_yyyyddd', + 'yyyymmdd_to_yyyyfrac', 'yyyymmddhh_time', 'yyyymmddhh_to_yyyyfrac', + 'zonal_mpsi_Wrap', 'zonalAve', 'calendar_decode2', 'cd_string', + 'kf_filter', 'run_cor', 'time_axis_labels', 'ut_string', + 'wrf_contour', 'wrf_map', 'wrf_map_overlay', 'wrf_map_overlays', + 'wrf_map_resources', 'wrf_map_zoom', 'wrf_overlay', 'wrf_overlays', + 'wrf_user_getvar', 'wrf_user_ij_to_ll', 'wrf_user_intrp2d', + 'wrf_user_intrp3d', 'wrf_user_latlon_to_ij', 'wrf_user_list_times', + 'wrf_user_ll_to_ij', 'wrf_user_unstagger', 'wrf_user_vert_interp', + 'wrf_vector', 'gsn_add_annotation', 'gsn_add_polygon', + 'gsn_add_polyline', 'gsn_add_polymarker', + 'gsn_add_shapefile_polygons', 'gsn_add_shapefile_polylines', + 'gsn_add_shapefile_polymarkers', 'gsn_add_text', 'gsn_attach_plots', + 'gsn_blank_plot', 'gsn_contour', 'gsn_contour_map', + 'gsn_contour_shade', 'gsn_coordinates', 'gsn_create_labelbar', + 'gsn_create_legend', 'gsn_create_text', + 'gsn_csm_attach_zonal_means', 'gsn_csm_blank_plot', + 'gsn_csm_contour', 'gsn_csm_contour_map', 'gsn_csm_contour_map_ce', + 'gsn_csm_contour_map_overlay', 'gsn_csm_contour_map_polar', + 'gsn_csm_hov', 'gsn_csm_lat_time', 'gsn_csm_map', 'gsn_csm_map_ce', + 'gsn_csm_map_polar', 'gsn_csm_pres_hgt', + 'gsn_csm_pres_hgt_streamline', 'gsn_csm_pres_hgt_vector', + 'gsn_csm_streamline', 'gsn_csm_streamline_contour_map', + 'gsn_csm_streamline_contour_map_ce', + 'gsn_csm_streamline_contour_map_polar', 'gsn_csm_streamline_map', + 'gsn_csm_streamline_map_ce', 'gsn_csm_streamline_map_polar', + 'gsn_csm_streamline_scalar', 'gsn_csm_streamline_scalar_map', + 'gsn_csm_streamline_scalar_map_ce', + 'gsn_csm_streamline_scalar_map_polar', 'gsn_csm_time_lat', + 'gsn_csm_vector', 'gsn_csm_vector_map', 'gsn_csm_vector_map_ce', + 'gsn_csm_vector_map_polar', 'gsn_csm_vector_scalar', + 'gsn_csm_vector_scalar_map', 'gsn_csm_vector_scalar_map_ce', + 'gsn_csm_vector_scalar_map_polar', 'gsn_csm_x2y', 'gsn_csm_x2y2', + 'gsn_csm_xy', 'gsn_csm_xy2', 'gsn_csm_xy3', 'gsn_csm_y', + 'gsn_define_colormap', 'gsn_draw_colormap', 'gsn_draw_named_colors', + 'gsn_histogram', 'gsn_labelbar_ndc', 'gsn_legend_ndc', 'gsn_map', + 'gsn_merge_colormaps', 'gsn_open_wks', 'gsn_panel', 'gsn_polygon', + 'gsn_polygon_ndc', 'gsn_polyline', 'gsn_polyline_ndc', + 'gsn_polymarker', 'gsn_polymarker_ndc', 'gsn_retrieve_colormap', + 'gsn_reverse_colormap', 'gsn_streamline', 'gsn_streamline_map', + 'gsn_streamline_scalar', 'gsn_streamline_scalar_map', 'gsn_table', + 'gsn_text', 'gsn_text_ndc', 'gsn_vector', 'gsn_vector_map', + 'gsn_vector_scalar', 'gsn_vector_scalar_map', 'gsn_xy', 'gsn_y', + 'hsv2rgb', 'maximize_output', 'namedcolor2rgb', 'namedcolor2rgba', + 'reset_device_coordinates', 'span_named_colors'), prefix=r'\b'), + Name.Builtin), + + # Resources + (words(( + 'amDataXF', 'amDataYF', 'amJust', 'amOn', 'amOrthogonalPosF', + 'amParallelPosF', 'amResizeNotify', 'amSide', 'amTrackData', + 'amViewId', 'amZone', 'appDefaultParent', 'appFileSuffix', + 'appResources', 'appSysDir', 'appUsrDir', 'caCopyArrays', + 'caXArray', 'caXCast', 'caXMaxV', 'caXMinV', 'caXMissingV', + 'caYArray', 'caYCast', 'caYMaxV', 'caYMinV', 'caYMissingV', + 'cnCellFillEdgeColor', 'cnCellFillMissingValEdgeColor', + 'cnConpackParams', 'cnConstFEnableFill', 'cnConstFLabelAngleF', + 'cnConstFLabelBackgroundColor', 'cnConstFLabelConstantSpacingF', + 'cnConstFLabelFont', 'cnConstFLabelFontAspectF', + 'cnConstFLabelFontColor', 'cnConstFLabelFontHeightF', + 'cnConstFLabelFontQuality', 'cnConstFLabelFontThicknessF', + 'cnConstFLabelFormat', 'cnConstFLabelFuncCode', 'cnConstFLabelJust', + 'cnConstFLabelOn', 'cnConstFLabelOrthogonalPosF', + 'cnConstFLabelParallelPosF', 'cnConstFLabelPerimColor', + 'cnConstFLabelPerimOn', 'cnConstFLabelPerimSpaceF', + 'cnConstFLabelPerimThicknessF', 'cnConstFLabelSide', + 'cnConstFLabelString', 'cnConstFLabelTextDirection', + 'cnConstFLabelZone', 'cnConstFUseInfoLabelRes', + 'cnExplicitLabelBarLabelsOn', 'cnExplicitLegendLabelsOn', + 'cnExplicitLineLabelsOn', 'cnFillBackgroundColor', 'cnFillColor', + 'cnFillColors', 'cnFillDotSizeF', 'cnFillDrawOrder', 'cnFillMode', + 'cnFillOn', 'cnFillOpacityF', 'cnFillPalette', 'cnFillPattern', + 'cnFillPatterns', 'cnFillScaleF', 'cnFillScales', 'cnFixFillBleed', + 'cnGridBoundFillColor', 'cnGridBoundFillPattern', + 'cnGridBoundFillScaleF', 'cnGridBoundPerimColor', + 'cnGridBoundPerimDashPattern', 'cnGridBoundPerimOn', + 'cnGridBoundPerimThicknessF', 'cnHighLabelAngleF', + 'cnHighLabelBackgroundColor', 'cnHighLabelConstantSpacingF', + 'cnHighLabelCount', 'cnHighLabelFont', 'cnHighLabelFontAspectF', + 'cnHighLabelFontColor', 'cnHighLabelFontHeightF', + 'cnHighLabelFontQuality', 'cnHighLabelFontThicknessF', + 'cnHighLabelFormat', 'cnHighLabelFuncCode', 'cnHighLabelPerimColor', + 'cnHighLabelPerimOn', 'cnHighLabelPerimSpaceF', + 'cnHighLabelPerimThicknessF', 'cnHighLabelString', 'cnHighLabelsOn', + 'cnHighLowLabelOverlapMode', 'cnHighUseLineLabelRes', + 'cnInfoLabelAngleF', 'cnInfoLabelBackgroundColor', + 'cnInfoLabelConstantSpacingF', 'cnInfoLabelFont', + 'cnInfoLabelFontAspectF', 'cnInfoLabelFontColor', + 'cnInfoLabelFontHeightF', 'cnInfoLabelFontQuality', + 'cnInfoLabelFontThicknessF', 'cnInfoLabelFormat', + 'cnInfoLabelFuncCode', 'cnInfoLabelJust', 'cnInfoLabelOn', + 'cnInfoLabelOrthogonalPosF', 'cnInfoLabelParallelPosF', + 'cnInfoLabelPerimColor', 'cnInfoLabelPerimOn', + 'cnInfoLabelPerimSpaceF', 'cnInfoLabelPerimThicknessF', + 'cnInfoLabelSide', 'cnInfoLabelString', 'cnInfoLabelTextDirection', + 'cnInfoLabelZone', 'cnLabelBarEndLabelsOn', 'cnLabelBarEndStyle', + 'cnLabelDrawOrder', 'cnLabelMasking', 'cnLabelScaleFactorF', + 'cnLabelScaleValueF', 'cnLabelScalingMode', 'cnLegendLevelFlags', + 'cnLevelCount', 'cnLevelFlag', 'cnLevelFlags', 'cnLevelSelectionMode', + 'cnLevelSpacingF', 'cnLevels', 'cnLineColor', 'cnLineColors', + 'cnLineDashPattern', 'cnLineDashPatterns', 'cnLineDashSegLenF', + 'cnLineDrawOrder', 'cnLineLabelAngleF', 'cnLineLabelBackgroundColor', + 'cnLineLabelConstantSpacingF', 'cnLineLabelCount', + 'cnLineLabelDensityF', 'cnLineLabelFont', 'cnLineLabelFontAspectF', + 'cnLineLabelFontColor', 'cnLineLabelFontColors', + 'cnLineLabelFontHeightF', 'cnLineLabelFontQuality', + 'cnLineLabelFontThicknessF', 'cnLineLabelFormat', + 'cnLineLabelFuncCode', 'cnLineLabelInterval', 'cnLineLabelPerimColor', + 'cnLineLabelPerimOn', 'cnLineLabelPerimSpaceF', + 'cnLineLabelPerimThicknessF', 'cnLineLabelPlacementMode', + 'cnLineLabelStrings', 'cnLineLabelsOn', 'cnLinePalette', + 'cnLineThicknessF', 'cnLineThicknesses', 'cnLinesOn', + 'cnLowLabelAngleF', 'cnLowLabelBackgroundColor', + 'cnLowLabelConstantSpacingF', 'cnLowLabelCount', 'cnLowLabelFont', + 'cnLowLabelFontAspectF', 'cnLowLabelFontColor', + 'cnLowLabelFontHeightF', 'cnLowLabelFontQuality', + 'cnLowLabelFontThicknessF', 'cnLowLabelFormat', 'cnLowLabelFuncCode', + 'cnLowLabelPerimColor', 'cnLowLabelPerimOn', 'cnLowLabelPerimSpaceF', + 'cnLowLabelPerimThicknessF', 'cnLowLabelString', 'cnLowLabelsOn', + 'cnLowUseHighLabelRes', 'cnMaxDataValueFormat', 'cnMaxLevelCount', + 'cnMaxLevelValF', 'cnMaxPointDistanceF', 'cnMinLevelValF', + 'cnMissingValFillColor', 'cnMissingValFillPattern', + 'cnMissingValFillScaleF', 'cnMissingValPerimColor', + 'cnMissingValPerimDashPattern', 'cnMissingValPerimGridBoundOn', + 'cnMissingValPerimOn', 'cnMissingValPerimThicknessF', + 'cnMonoFillColor', 'cnMonoFillPattern', 'cnMonoFillScale', + 'cnMonoLevelFlag', 'cnMonoLineColor', 'cnMonoLineDashPattern', + 'cnMonoLineLabelFontColor', 'cnMonoLineThickness', 'cnNoDataLabelOn', + 'cnNoDataLabelString', 'cnOutOfRangeFillColor', + 'cnOutOfRangeFillPattern', 'cnOutOfRangeFillScaleF', + 'cnOutOfRangePerimColor', 'cnOutOfRangePerimDashPattern', + 'cnOutOfRangePerimOn', 'cnOutOfRangePerimThicknessF', + 'cnRasterCellSizeF', 'cnRasterMinCellSizeF', 'cnRasterModeOn', + 'cnRasterSampleFactorF', 'cnRasterSmoothingOn', 'cnScalarFieldData', + 'cnSmoothingDistanceF', 'cnSmoothingOn', 'cnSmoothingTensionF', + 'cnSpanFillPalette', 'cnSpanLinePalette', 'ctCopyTables', + 'ctXElementSize', 'ctXMaxV', 'ctXMinV', 'ctXMissingV', 'ctXTable', + 'ctXTableLengths', 'ctXTableType', 'ctYElementSize', 'ctYMaxV', + 'ctYMinV', 'ctYMissingV', 'ctYTable', 'ctYTableLengths', + 'ctYTableType', 'dcDelayCompute', 'errBuffer', + 'errFileName', 'errFilePtr', 'errLevel', 'errPrint', 'errUnitNumber', + 'gsClipOn', 'gsColors', 'gsEdgeColor', 'gsEdgeDashPattern', + 'gsEdgeDashSegLenF', 'gsEdgeThicknessF', 'gsEdgesOn', + 'gsFillBackgroundColor', 'gsFillColor', 'gsFillDotSizeF', + 'gsFillIndex', 'gsFillLineThicknessF', 'gsFillOpacityF', + 'gsFillScaleF', 'gsFont', 'gsFontAspectF', 'gsFontColor', + 'gsFontHeightF', 'gsFontOpacityF', 'gsFontQuality', + 'gsFontThicknessF', 'gsLineColor', 'gsLineDashPattern', + 'gsLineDashSegLenF', 'gsLineLabelConstantSpacingF', 'gsLineLabelFont', + 'gsLineLabelFontAspectF', 'gsLineLabelFontColor', + 'gsLineLabelFontHeightF', 'gsLineLabelFontQuality', + 'gsLineLabelFontThicknessF', 'gsLineLabelFuncCode', + 'gsLineLabelString', 'gsLineOpacityF', 'gsLineThicknessF', + 'gsMarkerColor', 'gsMarkerIndex', 'gsMarkerOpacityF', 'gsMarkerSizeF', + 'gsMarkerThicknessF', 'gsSegments', 'gsTextAngleF', + 'gsTextConstantSpacingF', 'gsTextDirection', 'gsTextFuncCode', + 'gsTextJustification', 'gsnAboveYRefLineBarColors', + 'gsnAboveYRefLineBarFillScales', 'gsnAboveYRefLineBarPatterns', + 'gsnAboveYRefLineColor', 'gsnAddCyclic', 'gsnAttachBorderOn', + 'gsnAttachPlotsXAxis', 'gsnBelowYRefLineBarColors', + 'gsnBelowYRefLineBarFillScales', 'gsnBelowYRefLineBarPatterns', + 'gsnBelowYRefLineColor', 'gsnBoxMargin', 'gsnCenterString', + 'gsnCenterStringFontColor', 'gsnCenterStringFontHeightF', + 'gsnCenterStringFuncCode', 'gsnCenterStringOrthogonalPosF', + 'gsnCenterStringParallelPosF', 'gsnContourLineThicknessesScale', + 'gsnContourNegLineDashPattern', 'gsnContourPosLineDashPattern', + 'gsnContourZeroLineThicknessF', 'gsnDebugWriteFileName', 'gsnDraw', + 'gsnFrame', 'gsnHistogramBarWidthPercent', 'gsnHistogramBinIntervals', + 'gsnHistogramBinMissing', 'gsnHistogramBinWidth', + 'gsnHistogramClassIntervals', 'gsnHistogramCompare', + 'gsnHistogramComputePercentages', + 'gsnHistogramComputePercentagesNoMissing', + 'gsnHistogramDiscreteBinValues', 'gsnHistogramDiscreteClassValues', + 'gsnHistogramHorizontal', 'gsnHistogramMinMaxBinsOn', + 'gsnHistogramNumberOfBins', 'gsnHistogramPercentSign', + 'gsnHistogramSelectNiceIntervals', 'gsnLeftString', + 'gsnLeftStringFontColor', 'gsnLeftStringFontHeightF', + 'gsnLeftStringFuncCode', 'gsnLeftStringOrthogonalPosF', + 'gsnLeftStringParallelPosF', 'gsnMajorLatSpacing', + 'gsnMajorLonSpacing', 'gsnMaskLambertConformal', + 'gsnMaskLambertConformalOutlineOn', 'gsnMaximize', + 'gsnMinorLatSpacing', 'gsnMinorLonSpacing', 'gsnPanelBottom', + 'gsnPanelCenter', 'gsnPanelDebug', 'gsnPanelFigureStrings', + 'gsnPanelFigureStringsBackgroundFillColor', + 'gsnPanelFigureStringsFontHeightF', 'gsnPanelFigureStringsJust', + 'gsnPanelFigureStringsPerimOn', 'gsnPanelLabelBar', 'gsnPanelLeft', + 'gsnPanelMainFont', 'gsnPanelMainFontColor', + 'gsnPanelMainFontHeightF', 'gsnPanelMainString', 'gsnPanelRight', + 'gsnPanelRowSpec', 'gsnPanelScalePlotIndex', 'gsnPanelTop', + 'gsnPanelXF', 'gsnPanelXWhiteSpacePercent', 'gsnPanelYF', + 'gsnPanelYWhiteSpacePercent', 'gsnPaperHeight', 'gsnPaperMargin', + 'gsnPaperOrientation', 'gsnPaperWidth', 'gsnPolar', + 'gsnPolarLabelDistance', 'gsnPolarLabelFont', + 'gsnPolarLabelFontHeightF', 'gsnPolarLabelSpacing', 'gsnPolarTime', + 'gsnPolarUT', 'gsnRightString', 'gsnRightStringFontColor', + 'gsnRightStringFontHeightF', 'gsnRightStringFuncCode', + 'gsnRightStringOrthogonalPosF', 'gsnRightStringParallelPosF', + 'gsnScalarContour', 'gsnScale', 'gsnShape', 'gsnSpreadColorEnd', + 'gsnSpreadColorStart', 'gsnSpreadColors', 'gsnStringFont', + 'gsnStringFontColor', 'gsnStringFontHeightF', 'gsnStringFuncCode', + 'gsnTickMarksOn', 'gsnXAxisIrregular2Linear', 'gsnXAxisIrregular2Log', + 'gsnXRefLine', 'gsnXRefLineColor', 'gsnXRefLineDashPattern', + 'gsnXRefLineThicknessF', 'gsnXYAboveFillColors', 'gsnXYBarChart', + 'gsnXYBarChartBarWidth', 'gsnXYBarChartColors', + 'gsnXYBarChartColors2', 'gsnXYBarChartFillDotSizeF', + 'gsnXYBarChartFillLineThicknessF', 'gsnXYBarChartFillOpacityF', + 'gsnXYBarChartFillScaleF', 'gsnXYBarChartOutlineOnly', + 'gsnXYBarChartOutlineThicknessF', 'gsnXYBarChartPatterns', + 'gsnXYBarChartPatterns2', 'gsnXYBelowFillColors', 'gsnXYFillColors', + 'gsnXYFillOpacities', 'gsnXYLeftFillColors', 'gsnXYRightFillColors', + 'gsnYAxisIrregular2Linear', 'gsnYAxisIrregular2Log', 'gsnYRefLine', + 'gsnYRefLineColor', 'gsnYRefLineColors', 'gsnYRefLineDashPattern', + 'gsnYRefLineDashPatterns', 'gsnYRefLineThicknessF', + 'gsnYRefLineThicknesses', 'gsnZonalMean', 'gsnZonalMeanXMaxF', + 'gsnZonalMeanXMinF', 'gsnZonalMeanYRefLine', 'lbAutoManage', + 'lbBottomMarginF', 'lbBoxCount', 'lbBoxEndCapStyle', 'lbBoxFractions', + 'lbBoxLineColor', 'lbBoxLineDashPattern', 'lbBoxLineDashSegLenF', + 'lbBoxLineThicknessF', 'lbBoxLinesOn', 'lbBoxMajorExtentF', + 'lbBoxMinorExtentF', 'lbBoxSeparatorLinesOn', 'lbBoxSizing', + 'lbFillBackground', 'lbFillColor', 'lbFillColors', 'lbFillDotSizeF', + 'lbFillLineThicknessF', 'lbFillPattern', 'lbFillPatterns', + 'lbFillScaleF', 'lbFillScales', 'lbJustification', 'lbLabelAlignment', + 'lbLabelAngleF', 'lbLabelAutoStride', 'lbLabelBarOn', + 'lbLabelConstantSpacingF', 'lbLabelDirection', 'lbLabelFont', + 'lbLabelFontAspectF', 'lbLabelFontColor', 'lbLabelFontHeightF', + 'lbLabelFontQuality', 'lbLabelFontThicknessF', 'lbLabelFuncCode', + 'lbLabelJust', 'lbLabelOffsetF', 'lbLabelPosition', 'lbLabelStride', + 'lbLabelStrings', 'lbLabelsOn', 'lbLeftMarginF', 'lbMaxLabelLenF', + 'lbMinLabelSpacingF', 'lbMonoFillColor', 'lbMonoFillPattern', + 'lbMonoFillScale', 'lbOrientation', 'lbPerimColor', + 'lbPerimDashPattern', 'lbPerimDashSegLenF', 'lbPerimFill', + 'lbPerimFillColor', 'lbPerimOn', 'lbPerimThicknessF', + 'lbRasterFillOn', 'lbRightMarginF', 'lbTitleAngleF', + 'lbTitleConstantSpacingF', 'lbTitleDirection', 'lbTitleExtentF', + 'lbTitleFont', 'lbTitleFontAspectF', 'lbTitleFontColor', + 'lbTitleFontHeightF', 'lbTitleFontQuality', 'lbTitleFontThicknessF', + 'lbTitleFuncCode', 'lbTitleJust', 'lbTitleOffsetF', 'lbTitleOn', + 'lbTitlePosition', 'lbTitleString', 'lbTopMarginF', 'lgAutoManage', + 'lgBottomMarginF', 'lgBoxBackground', 'lgBoxLineColor', + 'lgBoxLineDashPattern', 'lgBoxLineDashSegLenF', 'lgBoxLineThicknessF', + 'lgBoxLinesOn', 'lgBoxMajorExtentF', 'lgBoxMinorExtentF', + 'lgDashIndex', 'lgDashIndexes', 'lgItemCount', 'lgItemOrder', + 'lgItemPlacement', 'lgItemPositions', 'lgItemType', 'lgItemTypes', + 'lgJustification', 'lgLabelAlignment', 'lgLabelAngleF', + 'lgLabelAutoStride', 'lgLabelConstantSpacingF', 'lgLabelDirection', + 'lgLabelFont', 'lgLabelFontAspectF', 'lgLabelFontColor', + 'lgLabelFontHeightF', 'lgLabelFontQuality', 'lgLabelFontThicknessF', + 'lgLabelFuncCode', 'lgLabelJust', 'lgLabelOffsetF', 'lgLabelPosition', + 'lgLabelStride', 'lgLabelStrings', 'lgLabelsOn', 'lgLeftMarginF', + 'lgLegendOn', 'lgLineColor', 'lgLineColors', 'lgLineDashSegLenF', + 'lgLineDashSegLens', 'lgLineLabelConstantSpacingF', 'lgLineLabelFont', + 'lgLineLabelFontAspectF', 'lgLineLabelFontColor', + 'lgLineLabelFontColors', 'lgLineLabelFontHeightF', + 'lgLineLabelFontHeights', 'lgLineLabelFontQuality', + 'lgLineLabelFontThicknessF', 'lgLineLabelFuncCode', + 'lgLineLabelStrings', 'lgLineLabelsOn', 'lgLineThicknessF', + 'lgLineThicknesses', 'lgMarkerColor', 'lgMarkerColors', + 'lgMarkerIndex', 'lgMarkerIndexes', 'lgMarkerSizeF', 'lgMarkerSizes', + 'lgMarkerThicknessF', 'lgMarkerThicknesses', 'lgMonoDashIndex', + 'lgMonoItemType', 'lgMonoLineColor', 'lgMonoLineDashSegLen', + 'lgMonoLineLabelFontColor', 'lgMonoLineLabelFontHeight', + 'lgMonoLineThickness', 'lgMonoMarkerColor', 'lgMonoMarkerIndex', + 'lgMonoMarkerSize', 'lgMonoMarkerThickness', 'lgOrientation', + 'lgPerimColor', 'lgPerimDashPattern', 'lgPerimDashSegLenF', + 'lgPerimFill', 'lgPerimFillColor', 'lgPerimOn', 'lgPerimThicknessF', + 'lgRightMarginF', 'lgTitleAngleF', 'lgTitleConstantSpacingF', + 'lgTitleDirection', 'lgTitleExtentF', 'lgTitleFont', + 'lgTitleFontAspectF', 'lgTitleFontColor', 'lgTitleFontHeightF', + 'lgTitleFontQuality', 'lgTitleFontThicknessF', 'lgTitleFuncCode', + 'lgTitleJust', 'lgTitleOffsetF', 'lgTitleOn', 'lgTitlePosition', + 'lgTitleString', 'lgTopMarginF', 'mpAreaGroupCount', + 'mpAreaMaskingOn', 'mpAreaNames', 'mpAreaTypes', 'mpBottomAngleF', + 'mpBottomMapPosF', 'mpBottomNDCF', 'mpBottomNPCF', + 'mpBottomPointLatF', 'mpBottomPointLonF', 'mpBottomWindowF', + 'mpCenterLatF', 'mpCenterLonF', 'mpCenterRotF', 'mpCountyLineColor', + 'mpCountyLineDashPattern', 'mpCountyLineDashSegLenF', + 'mpCountyLineThicknessF', 'mpDataBaseVersion', 'mpDataResolution', + 'mpDataSetName', 'mpDefaultFillColor', 'mpDefaultFillPattern', + 'mpDefaultFillScaleF', 'mpDynamicAreaGroups', 'mpEllipticalBoundary', + 'mpFillAreaSpecifiers', 'mpFillBoundarySets', 'mpFillColor', + 'mpFillColors', 'mpFillColors-default', 'mpFillDotSizeF', + 'mpFillDrawOrder', 'mpFillOn', 'mpFillPatternBackground', + 'mpFillPattern', 'mpFillPatterns', 'mpFillPatterns-default', + 'mpFillScaleF', 'mpFillScales', 'mpFillScales-default', + 'mpFixedAreaGroups', 'mpGeophysicalLineColor', + 'mpGeophysicalLineDashPattern', 'mpGeophysicalLineDashSegLenF', + 'mpGeophysicalLineThicknessF', 'mpGreatCircleLinesOn', + 'mpGridAndLimbDrawOrder', 'mpGridAndLimbOn', 'mpGridLatSpacingF', + 'mpGridLineColor', 'mpGridLineDashPattern', 'mpGridLineDashSegLenF', + 'mpGridLineThicknessF', 'mpGridLonSpacingF', 'mpGridMaskMode', + 'mpGridMaxLatF', 'mpGridPolarLonSpacingF', 'mpGridSpacingF', + 'mpInlandWaterFillColor', 'mpInlandWaterFillPattern', + 'mpInlandWaterFillScaleF', 'mpLabelDrawOrder', 'mpLabelFontColor', + 'mpLabelFontHeightF', 'mpLabelsOn', 'mpLambertMeridianF', + 'mpLambertParallel1F', 'mpLambertParallel2F', 'mpLandFillColor', + 'mpLandFillPattern', 'mpLandFillScaleF', 'mpLeftAngleF', + 'mpLeftCornerLatF', 'mpLeftCornerLonF', 'mpLeftMapPosF', + 'mpLeftNDCF', 'mpLeftNPCF', 'mpLeftPointLatF', + 'mpLeftPointLonF', 'mpLeftWindowF', 'mpLimbLineColor', + 'mpLimbLineDashPattern', 'mpLimbLineDashSegLenF', + 'mpLimbLineThicknessF', 'mpLimitMode', 'mpMaskAreaSpecifiers', + 'mpMaskOutlineSpecifiers', 'mpMaxLatF', 'mpMaxLonF', + 'mpMinLatF', 'mpMinLonF', 'mpMonoFillColor', 'mpMonoFillPattern', + 'mpMonoFillScale', 'mpNationalLineColor', 'mpNationalLineDashPattern', + 'mpNationalLineThicknessF', 'mpOceanFillColor', 'mpOceanFillPattern', + 'mpOceanFillScaleF', 'mpOutlineBoundarySets', 'mpOutlineDrawOrder', + 'mpOutlineMaskingOn', 'mpOutlineOn', 'mpOutlineSpecifiers', + 'mpPerimDrawOrder', 'mpPerimLineColor', 'mpPerimLineDashPattern', + 'mpPerimLineDashSegLenF', 'mpPerimLineThicknessF', 'mpPerimOn', + 'mpPolyMode', 'mpProjection', 'mpProvincialLineColor', + 'mpProvincialLineDashPattern', 'mpProvincialLineDashSegLenF', + 'mpProvincialLineThicknessF', 'mpRelativeCenterLat', + 'mpRelativeCenterLon', 'mpRightAngleF', 'mpRightCornerLatF', + 'mpRightCornerLonF', 'mpRightMapPosF', 'mpRightNDCF', + 'mpRightNPCF', 'mpRightPointLatF', 'mpRightPointLonF', + 'mpRightWindowF', 'mpSatelliteAngle1F', 'mpSatelliteAngle2F', + 'mpSatelliteDistF', 'mpShapeMode', 'mpSpecifiedFillColors', + 'mpSpecifiedFillDirectIndexing', 'mpSpecifiedFillPatterns', + 'mpSpecifiedFillPriority', 'mpSpecifiedFillScales', + 'mpTopAngleF', 'mpTopMapPosF', 'mpTopNDCF', 'mpTopNPCF', + 'mpTopPointLatF', 'mpTopPointLonF', 'mpTopWindowF', + 'mpUSStateLineColor', 'mpUSStateLineDashPattern', + 'mpUSStateLineDashSegLenF', 'mpUSStateLineThicknessF', + 'pmAnnoManagers', 'pmAnnoViews', 'pmLabelBarDisplayMode', + 'pmLabelBarHeightF', 'pmLabelBarKeepAspect', 'pmLabelBarOrthogonalPosF', + 'pmLabelBarParallelPosF', 'pmLabelBarSide', 'pmLabelBarWidthF', + 'pmLabelBarZone', 'pmLegendDisplayMode', 'pmLegendHeightF', + 'pmLegendKeepAspect', 'pmLegendOrthogonalPosF', + 'pmLegendParallelPosF', 'pmLegendSide', 'pmLegendWidthF', + 'pmLegendZone', 'pmOverlaySequenceIds', 'pmTickMarkDisplayMode', + 'pmTickMarkZone', 'pmTitleDisplayMode', 'pmTitleZone', + 'prGraphicStyle', 'prPolyType', 'prXArray', 'prYArray', + 'sfCopyData', 'sfDataArray', 'sfDataMaxV', 'sfDataMinV', + 'sfElementNodes', 'sfExchangeDimensions', 'sfFirstNodeIndex', + 'sfMissingValueV', 'sfXArray', 'sfXCActualEndF', 'sfXCActualStartF', + 'sfXCEndIndex', 'sfXCEndSubsetV', 'sfXCEndV', 'sfXCStartIndex', + 'sfXCStartSubsetV', 'sfXCStartV', 'sfXCStride', 'sfXCellBounds', + 'sfYArray', 'sfYCActualEndF', 'sfYCActualStartF', 'sfYCEndIndex', + 'sfYCEndSubsetV', 'sfYCEndV', 'sfYCStartIndex', 'sfYCStartSubsetV', + 'sfYCStartV', 'sfYCStride', 'sfYCellBounds', 'stArrowLengthF', + 'stArrowStride', 'stCrossoverCheckCount', + 'stExplicitLabelBarLabelsOn', 'stLabelBarEndLabelsOn', + 'stLabelFormat', 'stLengthCheckCount', 'stLevelColors', + 'stLevelCount', 'stLevelPalette', 'stLevelSelectionMode', + 'stLevelSpacingF', 'stLevels', 'stLineColor', 'stLineOpacityF', + 'stLineStartStride', 'stLineThicknessF', 'stMapDirection', + 'stMaxLevelCount', 'stMaxLevelValF', 'stMinArrowSpacingF', + 'stMinDistanceF', 'stMinLevelValF', 'stMinLineSpacingF', + 'stMinStepFactorF', 'stMonoLineColor', 'stNoDataLabelOn', + 'stNoDataLabelString', 'stScalarFieldData', 'stScalarMissingValColor', + 'stSpanLevelPalette', 'stStepSizeF', 'stStreamlineDrawOrder', + 'stUseScalarArray', 'stVectorFieldData', 'stZeroFLabelAngleF', + 'stZeroFLabelBackgroundColor', 'stZeroFLabelConstantSpacingF', + 'stZeroFLabelFont', 'stZeroFLabelFontAspectF', + 'stZeroFLabelFontColor', 'stZeroFLabelFontHeightF', + 'stZeroFLabelFontQuality', 'stZeroFLabelFontThicknessF', + 'stZeroFLabelFuncCode', 'stZeroFLabelJust', 'stZeroFLabelOn', + 'stZeroFLabelOrthogonalPosF', 'stZeroFLabelParallelPosF', + 'stZeroFLabelPerimColor', 'stZeroFLabelPerimOn', + 'stZeroFLabelPerimSpaceF', 'stZeroFLabelPerimThicknessF', + 'stZeroFLabelSide', 'stZeroFLabelString', 'stZeroFLabelTextDirection', + 'stZeroFLabelZone', 'tfDoNDCOverlay', 'tfPlotManagerOn', + 'tfPolyDrawList', 'tfPolyDrawOrder', 'tiDeltaF', 'tiMainAngleF', + 'tiMainConstantSpacingF', 'tiMainDirection', 'tiMainFont', + 'tiMainFontAspectF', 'tiMainFontColor', 'tiMainFontHeightF', + 'tiMainFontQuality', 'tiMainFontThicknessF', 'tiMainFuncCode', + 'tiMainJust', 'tiMainOffsetXF', 'tiMainOffsetYF', 'tiMainOn', + 'tiMainPosition', 'tiMainSide', 'tiMainString', 'tiUseMainAttributes', + 'tiXAxisAngleF', 'tiXAxisConstantSpacingF', 'tiXAxisDirection', + 'tiXAxisFont', 'tiXAxisFontAspectF', 'tiXAxisFontColor', + 'tiXAxisFontHeightF', 'tiXAxisFontQuality', 'tiXAxisFontThicknessF', + 'tiXAxisFuncCode', 'tiXAxisJust', 'tiXAxisOffsetXF', + 'tiXAxisOffsetYF', 'tiXAxisOn', 'tiXAxisPosition', 'tiXAxisSide', + 'tiXAxisString', 'tiYAxisAngleF', 'tiYAxisConstantSpacingF', + 'tiYAxisDirection', 'tiYAxisFont', 'tiYAxisFontAspectF', + 'tiYAxisFontColor', 'tiYAxisFontHeightF', 'tiYAxisFontQuality', + 'tiYAxisFontThicknessF', 'tiYAxisFuncCode', 'tiYAxisJust', + 'tiYAxisOffsetXF', 'tiYAxisOffsetYF', 'tiYAxisOn', 'tiYAxisPosition', + 'tiYAxisSide', 'tiYAxisString', 'tmBorderLineColor', + 'tmBorderThicknessF', 'tmEqualizeXYSizes', 'tmLabelAutoStride', + 'tmSciNoteCutoff', 'tmXBAutoPrecision', 'tmXBBorderOn', + 'tmXBDataLeftF', 'tmXBDataRightF', 'tmXBFormat', 'tmXBIrrTensionF', + 'tmXBIrregularPoints', 'tmXBLabelAngleF', 'tmXBLabelConstantSpacingF', + 'tmXBLabelDeltaF', 'tmXBLabelDirection', 'tmXBLabelFont', + 'tmXBLabelFontAspectF', 'tmXBLabelFontColor', 'tmXBLabelFontHeightF', + 'tmXBLabelFontQuality', 'tmXBLabelFontThicknessF', + 'tmXBLabelFuncCode', 'tmXBLabelJust', 'tmXBLabelStride', 'tmXBLabels', + 'tmXBLabelsOn', 'tmXBMajorLengthF', 'tmXBMajorLineColor', + 'tmXBMajorOutwardLengthF', 'tmXBMajorThicknessF', 'tmXBMaxLabelLenF', + 'tmXBMaxTicks', 'tmXBMinLabelSpacingF', 'tmXBMinorLengthF', + 'tmXBMinorLineColor', 'tmXBMinorOn', 'tmXBMinorOutwardLengthF', + 'tmXBMinorPerMajor', 'tmXBMinorThicknessF', 'tmXBMinorValues', + 'tmXBMode', 'tmXBOn', 'tmXBPrecision', 'tmXBStyle', 'tmXBTickEndF', + 'tmXBTickSpacingF', 'tmXBTickStartF', 'tmXBValues', 'tmXMajorGrid', + 'tmXMajorGridLineColor', 'tmXMajorGridLineDashPattern', + 'tmXMajorGridThicknessF', 'tmXMinorGrid', 'tmXMinorGridLineColor', + 'tmXMinorGridLineDashPattern', 'tmXMinorGridThicknessF', + 'tmXTAutoPrecision', 'tmXTBorderOn', 'tmXTDataLeftF', + 'tmXTDataRightF', 'tmXTFormat', 'tmXTIrrTensionF', + 'tmXTIrregularPoints', 'tmXTLabelAngleF', 'tmXTLabelConstantSpacingF', + 'tmXTLabelDeltaF', 'tmXTLabelDirection', 'tmXTLabelFont', + 'tmXTLabelFontAspectF', 'tmXTLabelFontColor', 'tmXTLabelFontHeightF', + 'tmXTLabelFontQuality', 'tmXTLabelFontThicknessF', + 'tmXTLabelFuncCode', 'tmXTLabelJust', 'tmXTLabelStride', 'tmXTLabels', + 'tmXTLabelsOn', 'tmXTMajorLengthF', 'tmXTMajorLineColor', + 'tmXTMajorOutwardLengthF', 'tmXTMajorThicknessF', 'tmXTMaxLabelLenF', + 'tmXTMaxTicks', 'tmXTMinLabelSpacingF', 'tmXTMinorLengthF', + 'tmXTMinorLineColor', 'tmXTMinorOn', 'tmXTMinorOutwardLengthF', + 'tmXTMinorPerMajor', 'tmXTMinorThicknessF', 'tmXTMinorValues', + 'tmXTMode', 'tmXTOn', 'tmXTPrecision', 'tmXTStyle', 'tmXTTickEndF', + 'tmXTTickSpacingF', 'tmXTTickStartF', 'tmXTValues', 'tmXUseBottom', + 'tmYLAutoPrecision', 'tmYLBorderOn', 'tmYLDataBottomF', + 'tmYLDataTopF', 'tmYLFormat', 'tmYLIrrTensionF', + 'tmYLIrregularPoints', 'tmYLLabelAngleF', 'tmYLLabelConstantSpacingF', + 'tmYLLabelDeltaF', 'tmYLLabelDirection', 'tmYLLabelFont', + 'tmYLLabelFontAspectF', 'tmYLLabelFontColor', 'tmYLLabelFontHeightF', + 'tmYLLabelFontQuality', 'tmYLLabelFontThicknessF', + 'tmYLLabelFuncCode', 'tmYLLabelJust', 'tmYLLabelStride', 'tmYLLabels', + 'tmYLLabelsOn', 'tmYLMajorLengthF', 'tmYLMajorLineColor', + 'tmYLMajorOutwardLengthF', 'tmYLMajorThicknessF', 'tmYLMaxLabelLenF', + 'tmYLMaxTicks', 'tmYLMinLabelSpacingF', 'tmYLMinorLengthF', + 'tmYLMinorLineColor', 'tmYLMinorOn', 'tmYLMinorOutwardLengthF', + 'tmYLMinorPerMajor', 'tmYLMinorThicknessF', 'tmYLMinorValues', + 'tmYLMode', 'tmYLOn', 'tmYLPrecision', 'tmYLStyle', 'tmYLTickEndF', + 'tmYLTickSpacingF', 'tmYLTickStartF', 'tmYLValues', 'tmYMajorGrid', + 'tmYMajorGridLineColor', 'tmYMajorGridLineDashPattern', + 'tmYMajorGridThicknessF', 'tmYMinorGrid', 'tmYMinorGridLineColor', + 'tmYMinorGridLineDashPattern', 'tmYMinorGridThicknessF', + 'tmYRAutoPrecision', 'tmYRBorderOn', 'tmYRDataBottomF', + 'tmYRDataTopF', 'tmYRFormat', 'tmYRIrrTensionF', + 'tmYRIrregularPoints', 'tmYRLabelAngleF', 'tmYRLabelConstantSpacingF', + 'tmYRLabelDeltaF', 'tmYRLabelDirection', 'tmYRLabelFont', + 'tmYRLabelFontAspectF', 'tmYRLabelFontColor', 'tmYRLabelFontHeightF', + 'tmYRLabelFontQuality', 'tmYRLabelFontThicknessF', + 'tmYRLabelFuncCode', 'tmYRLabelJust', 'tmYRLabelStride', 'tmYRLabels', + 'tmYRLabelsOn', 'tmYRMajorLengthF', 'tmYRMajorLineColor', + 'tmYRMajorOutwardLengthF', 'tmYRMajorThicknessF', 'tmYRMaxLabelLenF', + 'tmYRMaxTicks', 'tmYRMinLabelSpacingF', 'tmYRMinorLengthF', + 'tmYRMinorLineColor', 'tmYRMinorOn', 'tmYRMinorOutwardLengthF', + 'tmYRMinorPerMajor', 'tmYRMinorThicknessF', 'tmYRMinorValues', + 'tmYRMode', 'tmYROn', 'tmYRPrecision', 'tmYRStyle', 'tmYRTickEndF', + 'tmYRTickSpacingF', 'tmYRTickStartF', 'tmYRValues', 'tmYUseLeft', + 'trGridType', 'trLineInterpolationOn', + 'trXAxisType', 'trXCoordPoints', 'trXInterPoints', 'trXLog', + 'trXMaxF', 'trXMinF', 'trXReverse', 'trXSamples', 'trXTensionF', + 'trYAxisType', 'trYCoordPoints', 'trYInterPoints', 'trYLog', + 'trYMaxF', 'trYMinF', 'trYReverse', 'trYSamples', 'trYTensionF', + 'txAngleF', 'txBackgroundFillColor', 'txConstantSpacingF', 'txDirection', + 'txFont', 'HLU-Fonts', 'txFontAspectF', 'txFontColor', + 'txFontHeightF', 'txFontOpacityF', 'txFontQuality', + 'txFontThicknessF', 'txFuncCode', 'txJust', 'txPerimColor', + 'txPerimDashLengthF', 'txPerimDashPattern', 'txPerimOn', + 'txPerimSpaceF', 'txPerimThicknessF', 'txPosXF', 'txPosYF', + 'txString', 'vcExplicitLabelBarLabelsOn', 'vcFillArrowEdgeColor', + 'vcFillArrowEdgeThicknessF', 'vcFillArrowFillColor', + 'vcFillArrowHeadInteriorXF', 'vcFillArrowHeadMinFracXF', + 'vcFillArrowHeadMinFracYF', 'vcFillArrowHeadXF', 'vcFillArrowHeadYF', + 'vcFillArrowMinFracWidthF', 'vcFillArrowWidthF', 'vcFillArrowsOn', + 'vcFillOverEdge', 'vcGlyphOpacityF', 'vcGlyphStyle', + 'vcLabelBarEndLabelsOn', 'vcLabelFontColor', 'vcLabelFontHeightF', + 'vcLabelsOn', 'vcLabelsUseVectorColor', 'vcLevelColors', + 'vcLevelCount', 'vcLevelPalette', 'vcLevelSelectionMode', + 'vcLevelSpacingF', 'vcLevels', 'vcLineArrowColor', + 'vcLineArrowHeadMaxSizeF', 'vcLineArrowHeadMinSizeF', + 'vcLineArrowThicknessF', 'vcMagnitudeFormat', + 'vcMagnitudeScaleFactorF', 'vcMagnitudeScaleValueF', + 'vcMagnitudeScalingMode', 'vcMapDirection', 'vcMaxLevelCount', + 'vcMaxLevelValF', 'vcMaxMagnitudeF', 'vcMinAnnoAngleF', + 'vcMinAnnoArrowAngleF', 'vcMinAnnoArrowEdgeColor', + 'vcMinAnnoArrowFillColor', 'vcMinAnnoArrowLineColor', + 'vcMinAnnoArrowMinOffsetF', 'vcMinAnnoArrowSpaceF', + 'vcMinAnnoArrowUseVecColor', 'vcMinAnnoBackgroundColor', + 'vcMinAnnoConstantSpacingF', 'vcMinAnnoExplicitMagnitudeF', + 'vcMinAnnoFont', 'vcMinAnnoFontAspectF', 'vcMinAnnoFontColor', + 'vcMinAnnoFontHeightF', 'vcMinAnnoFontQuality', + 'vcMinAnnoFontThicknessF', 'vcMinAnnoFuncCode', 'vcMinAnnoJust', + 'vcMinAnnoOn', 'vcMinAnnoOrientation', 'vcMinAnnoOrthogonalPosF', + 'vcMinAnnoParallelPosF', 'vcMinAnnoPerimColor', 'vcMinAnnoPerimOn', + 'vcMinAnnoPerimSpaceF', 'vcMinAnnoPerimThicknessF', 'vcMinAnnoSide', + 'vcMinAnnoString1', 'vcMinAnnoString1On', 'vcMinAnnoString2', + 'vcMinAnnoString2On', 'vcMinAnnoTextDirection', 'vcMinAnnoZone', + 'vcMinDistanceF', 'vcMinFracLengthF', 'vcMinLevelValF', + 'vcMinMagnitudeF', 'vcMonoFillArrowEdgeColor', + 'vcMonoFillArrowFillColor', 'vcMonoLineArrowColor', + 'vcMonoWindBarbColor', 'vcNoDataLabelOn', 'vcNoDataLabelString', + 'vcPositionMode', 'vcRefAnnoAngleF', 'vcRefAnnoArrowAngleF', + 'vcRefAnnoArrowEdgeColor', 'vcRefAnnoArrowFillColor', + 'vcRefAnnoArrowLineColor', 'vcRefAnnoArrowMinOffsetF', + 'vcRefAnnoArrowSpaceF', 'vcRefAnnoArrowUseVecColor', + 'vcRefAnnoBackgroundColor', 'vcRefAnnoConstantSpacingF', + 'vcRefAnnoExplicitMagnitudeF', 'vcRefAnnoFont', + 'vcRefAnnoFontAspectF', 'vcRefAnnoFontColor', 'vcRefAnnoFontHeightF', + 'vcRefAnnoFontQuality', 'vcRefAnnoFontThicknessF', + 'vcRefAnnoFuncCode', 'vcRefAnnoJust', 'vcRefAnnoOn', + 'vcRefAnnoOrientation', 'vcRefAnnoOrthogonalPosF', + 'vcRefAnnoParallelPosF', 'vcRefAnnoPerimColor', 'vcRefAnnoPerimOn', + 'vcRefAnnoPerimSpaceF', 'vcRefAnnoPerimThicknessF', 'vcRefAnnoSide', + 'vcRefAnnoString1', 'vcRefAnnoString1On', 'vcRefAnnoString2', + 'vcRefAnnoString2On', 'vcRefAnnoTextDirection', 'vcRefAnnoZone', + 'vcRefLengthF', 'vcRefMagnitudeF', 'vcScalarFieldData', + 'vcScalarMissingValColor', 'vcScalarValueFormat', + 'vcScalarValueScaleFactorF', 'vcScalarValueScaleValueF', + 'vcScalarValueScalingMode', 'vcSpanLevelPalette', 'vcUseRefAnnoRes', + 'vcUseScalarArray', 'vcVectorDrawOrder', 'vcVectorFieldData', + 'vcWindBarbCalmCircleSizeF', 'vcWindBarbColor', + 'vcWindBarbLineThicknessF', 'vcWindBarbScaleFactorF', + 'vcWindBarbTickAngleF', 'vcWindBarbTickLengthF', + 'vcWindBarbTickSpacingF', 'vcZeroFLabelAngleF', + 'vcZeroFLabelBackgroundColor', 'vcZeroFLabelConstantSpacingF', + 'vcZeroFLabelFont', 'vcZeroFLabelFontAspectF', + 'vcZeroFLabelFontColor', 'vcZeroFLabelFontHeightF', + 'vcZeroFLabelFontQuality', 'vcZeroFLabelFontThicknessF', + 'vcZeroFLabelFuncCode', 'vcZeroFLabelJust', 'vcZeroFLabelOn', + 'vcZeroFLabelOrthogonalPosF', 'vcZeroFLabelParallelPosF', + 'vcZeroFLabelPerimColor', 'vcZeroFLabelPerimOn', + 'vcZeroFLabelPerimSpaceF', 'vcZeroFLabelPerimThicknessF', + 'vcZeroFLabelSide', 'vcZeroFLabelString', 'vcZeroFLabelTextDirection', + 'vcZeroFLabelZone', 'vfCopyData', 'vfDataArray', + 'vfExchangeDimensions', 'vfExchangeUVData', 'vfMagMaxV', 'vfMagMinV', + 'vfMissingUValueV', 'vfMissingVValueV', 'vfPolarData', + 'vfSingleMissingValue', 'vfUDataArray', 'vfUMaxV', 'vfUMinV', + 'vfVDataArray', 'vfVMaxV', 'vfVMinV', 'vfXArray', 'vfXCActualEndF', + 'vfXCActualStartF', 'vfXCEndIndex', 'vfXCEndSubsetV', 'vfXCEndV', + 'vfXCStartIndex', 'vfXCStartSubsetV', 'vfXCStartV', 'vfXCStride', + 'vfYArray', 'vfYCActualEndF', 'vfYCActualStartF', 'vfYCEndIndex', + 'vfYCEndSubsetV', 'vfYCEndV', 'vfYCStartIndex', 'vfYCStartSubsetV', + 'vfYCStartV', 'vfYCStride', 'vpAnnoManagerId', 'vpClipOn', + 'vpHeightF', 'vpKeepAspect', 'vpOn', 'vpUseSegments', 'vpWidthF', + 'vpXF', 'vpYF', 'wkAntiAlias', 'wkBackgroundColor', 'wkBackgroundOpacityF', + 'wkColorMapLen', 'wkColorMap', 'wkColorModel', 'wkDashTableLength', + 'wkDefGraphicStyleId', 'wkDeviceLowerX', 'wkDeviceLowerY', + 'wkDeviceUpperX', 'wkDeviceUpperY', 'wkFileName', 'wkFillTableLength', + 'wkForegroundColor', 'wkFormat', 'wkFullBackground', 'wkGksWorkId', + 'wkHeight', 'wkMarkerTableLength', 'wkMetaName', 'wkOrientation', + 'wkPDFFileName', 'wkPDFFormat', 'wkPDFResolution', 'wkPSFileName', + 'wkPSFormat', 'wkPSResolution', 'wkPaperHeightF', 'wkPaperSize', + 'wkPaperWidthF', 'wkPause', 'wkTopLevelViews', 'wkViews', + 'wkVisualType', 'wkWidth', 'wkWindowId', 'wkXColorMode', 'wsCurrentSize', + 'wsMaximumSize', 'wsThresholdSize', 'xyComputeXMax', + 'xyComputeXMin', 'xyComputeYMax', 'xyComputeYMin', 'xyCoordData', + 'xyCoordDataSpec', 'xyCurveDrawOrder', 'xyDashPattern', + 'xyDashPatterns', 'xyExplicitLabels', 'xyExplicitLegendLabels', + 'xyLabelMode', 'xyLineColor', 'xyLineColors', 'xyLineDashSegLenF', + 'xyLineLabelConstantSpacingF', 'xyLineLabelFont', + 'xyLineLabelFontAspectF', 'xyLineLabelFontColor', + 'xyLineLabelFontColors', 'xyLineLabelFontHeightF', + 'xyLineLabelFontQuality', 'xyLineLabelFontThicknessF', + 'xyLineLabelFuncCode', 'xyLineThicknessF', 'xyLineThicknesses', + 'xyMarkLineMode', 'xyMarkLineModes', 'xyMarker', 'xyMarkerColor', + 'xyMarkerColors', 'xyMarkerSizeF', 'xyMarkerSizes', + 'xyMarkerThicknessF', 'xyMarkerThicknesses', 'xyMarkers', + 'xyMonoDashPattern', 'xyMonoLineColor', 'xyMonoLineLabelFontColor', + 'xyMonoLineThickness', 'xyMonoMarkLineMode', 'xyMonoMarker', + 'xyMonoMarkerColor', 'xyMonoMarkerSize', 'xyMonoMarkerThickness', + 'xyXIrrTensionF', 'xyXIrregularPoints', 'xyXStyle', 'xyYIrrTensionF', + 'xyYIrregularPoints', 'xyYStyle'), prefix=r'\b'), + Name.Builtin), + + # Booleans + (r'\.(True|False)\.', Name.Builtin), + # Comparing Operators + (r'\.(eq|ne|lt|le|gt|ge|not|and|or|xor)\.', Operator.Word), + ], + + 'strings': [ + (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double), + ], + + 'nums': [ + (r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer), + (r'[+-]?\d*\.\d+(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float), + (r'[+-]?\d+\.\d*(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/nimrod.py b/contrib/python/Pygments/py3/pygments/lexers/nimrod.py index f5fa7c0fc6..ce6ba87537 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nimrod.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nimrod.py @@ -2,7 +2,7 @@ pygments.lexers.nimrod ~~~~~~~~~~~~~~~~~~~~~~ - Lexer for the Nim language (formerly known as Nimrod). + Lexer for the Nim language (formerly known as Nimrod). :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. @@ -19,7 +19,7 @@ __all__ = ['NimrodLexer'] class NimrodLexer(RegexLexer): """ - For `Nim <http://nim-lang.org/>`_ source code. + For `Nim <http://nim-lang.org/>`_ source code. .. versionadded:: 1.5 """ @@ -27,7 +27,7 @@ class NimrodLexer(RegexLexer): name = 'Nimrod' aliases = ['nimrod', 'nim'] filenames = ['*.nim', '*.nimrod'] - mimetypes = ['text/x-nim'] + mimetypes = ['text/x-nim'] flags = re.MULTILINE | re.IGNORECASE | re.UNICODE @@ -43,11 +43,11 @@ class NimrodLexer(RegexLexer): keywords = [ 'addr', 'and', 'as', 'asm', 'bind', 'block', 'break', 'case', - 'cast', 'concept', 'const', 'continue', 'converter', 'defer', 'discard', - 'distinct', 'div', 'do', 'elif', 'else', 'end', 'enum', 'except', - 'export', 'finally', 'for', 'func', 'if', 'in', 'yield', 'interface', - 'is', 'isnot', 'iterator', 'let', 'macro', 'method', 'mixin', 'mod', - 'not', 'notin', 'object', 'of', 'or', 'out', 'proc', 'ptr', 'raise', + 'cast', 'concept', 'const', 'continue', 'converter', 'defer', 'discard', + 'distinct', 'div', 'do', 'elif', 'else', 'end', 'enum', 'except', + 'export', 'finally', 'for', 'func', 'if', 'in', 'yield', 'interface', + 'is', 'isnot', 'iterator', 'let', 'macro', 'method', 'mixin', 'mod', + 'not', 'notin', 'object', 'of', 'or', 'out', 'proc', 'ptr', 'raise', 'ref', 'return', 'shl', 'shr', 'static', 'template', 'try', 'tuple', 'type', 'using', 'when', 'while', 'xor' ] diff --git a/contrib/python/Pygments/py3/pygments/lexers/oberon.py b/contrib/python/Pygments/py3/pygments/lexers/oberon.py index 457b963cc8..7010e910b5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/oberon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/oberon.py @@ -46,11 +46,11 @@ class ComponentPascalLexer(RegexLexer): (r'\s+', Text), # whitespace ], 'comments': [ - (r'\(\*([^$].*?)\*\)', Comment.Multiline), + (r'\(\*([^$].*?)\*\)', Comment.Multiline), # TODO: nested comments (* (* ... *) ... (* ... *) *) not supported! ], 'punctuation': [ - (r'[()\[\]{},.:;|]', Punctuation), + (r'[()\[\]{},.:;|]', Punctuation), ], 'numliterals': [ (r'[0-9A-F]+X\b', Number.Hex), # char code @@ -82,7 +82,7 @@ class ComponentPascalLexer(RegexLexer): (r'\$', Operator), ], 'identifiers': [ - (r'([a-zA-Z_$][\w$]*)', Name), + (r'([a-zA-Z_$][\w$]*)', Name), ], 'builtins': [ (words(( diff --git a/contrib/python/Pygments/py3/pygments/lexers/objective.py b/contrib/python/Pygments/py3/pygments/lexers/objective.py index 366c3f966d..a4cc44b387 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/objective.py +++ b/contrib/python/Pygments/py3/pygments/lexers/objective.py @@ -65,7 +65,7 @@ def objective(baselexer): 'copy', 'retain', 'assign', 'unsafe_unretained', 'atomic', 'nonatomic', 'readonly', 'readwrite', 'setter', 'getter', 'typeof', 'in', 'out', 'inout', 'release', 'class', '@dynamic', '@optional', - '@required', '@autoreleasepool', '@import'), suffix=r'\b'), + '@required', '@autoreleasepool', '@import'), suffix=r'\b'), Keyword), (words(('id', 'instancetype', 'Class', 'IMP', 'SEL', 'BOOL', 'IBOutlet', 'IBAction', 'unichar'), suffix=r'\b'), @@ -86,26 +86,26 @@ def objective(baselexer): ], 'oc_classname': [ # interface definition that inherits - (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)', + (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)', bygroups(Name.Class, Text, Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')), - (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?', + (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?', bygroups(Name.Class, Text, Name.Class), '#pop'), # interface definition for a category - (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)', + (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)', bygroups(Name.Class, Text, Name.Label, Text, Punctuation), ('#pop', 'oc_ivars')), - (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))', + (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))', bygroups(Name.Class, Text, Name.Label), '#pop'), # simple interface / implementation - (r'([a-zA-Z$_][\w$]*)(\s*)(\{)', + (r'([a-zA-Z$_][\w$]*)(\s*)(\{)', bygroups(Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')), - (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop') + (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop') ], 'oc_forward_classname': [ - (r'([a-zA-Z$_][\w$]*)(\s*,\s*)', + (r'([a-zA-Z$_][\w$]*)(\s*,\s*)', bygroups(Name.Class, Text), 'oc_forward_classname'), - (r'([a-zA-Z$_][\w$]*)(\s*;?)', + (r'([a-zA-Z$_][\w$]*)(\s*;?)', bygroups(Name.Class, Text), '#pop') ], 'oc_ivars': [ @@ -243,17 +243,17 @@ class LogosLexer(ObjectiveCppLexer): inherit, ], 'logos_init_directive': [ - (r'\s+', Text), + (r'\s+', Text), (',', Punctuation, ('logos_init_directive', '#pop')), - (r'([a-zA-Z$_][\w$]*)(\s*)(=)(\s*)([^);]*)', + (r'([a-zA-Z$_][\w$]*)(\s*)(=)(\s*)([^);]*)', bygroups(Name.Class, Text, Punctuation, Text, Text)), - (r'([a-zA-Z$_][\w$]*)', Name.Class), - (r'\)', Punctuation, '#pop'), + (r'([a-zA-Z$_][\w$]*)', Name.Class), + (r'\)', Punctuation, '#pop'), ], 'logos_classname': [ - (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?', + (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?', bygroups(Name.Class, Text, Name.Class), '#pop'), - (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop') + (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop') ], 'root': [ (r'(%subclass)(\s+)', bygroups(Keyword, Text), @@ -297,7 +297,7 @@ class SwiftLexer(RegexLexer): (r'\s+', Text), (r'//', Comment.Single, 'comment-single'), (r'/\*', Comment.Multiline, 'comment-multi'), - (r'#(if|elseif|else|endif|available)\b', Comment.Preproc, 'preproc'), + (r'#(if|elseif|else|endif|available)\b', Comment.Preproc, 'preproc'), # Keywords include('keywords'), @@ -413,25 +413,25 @@ class SwiftLexer(RegexLexer): 'keywords': [ (words(( 'as', 'async', 'await', 'break', 'case', 'catch', 'continue', 'default', 'defer', - 'do', 'else', 'fallthrough', 'for', 'guard', 'if', 'in', 'is', - 'repeat', 'return', '#selector', 'switch', 'throw', 'try', - 'where', 'while'), suffix=r'\b'), + 'do', 'else', 'fallthrough', 'for', 'guard', 'if', 'in', 'is', + 'repeat', 'return', '#selector', 'switch', 'throw', 'try', + 'where', 'while'), suffix=r'\b'), Keyword), (r'@availability\([^)]+\)', Keyword.Reserved), (words(( 'associativity', 'convenience', 'dynamic', 'didSet', 'final', - 'get', 'indirect', 'infix', 'inout', 'lazy', 'left', 'mutating', - 'none', 'nonmutating', 'optional', 'override', 'postfix', - 'precedence', 'prefix', 'Protocol', 'required', 'rethrows', - 'right', 'set', 'throws', 'Type', 'unowned', 'weak', 'willSet', - '@availability', '@autoclosure', '@noreturn', - '@NSApplicationMain', '@NSCopying', '@NSManaged', '@objc', - '@UIApplicationMain', '@IBAction', '@IBDesignable', + 'get', 'indirect', 'infix', 'inout', 'lazy', 'left', 'mutating', + 'none', 'nonmutating', 'optional', 'override', 'postfix', + 'precedence', 'prefix', 'Protocol', 'required', 'rethrows', + 'right', 'set', 'throws', 'Type', 'unowned', 'weak', 'willSet', + '@availability', '@autoclosure', '@noreturn', + '@NSApplicationMain', '@NSCopying', '@NSManaged', '@objc', + '@UIApplicationMain', '@IBAction', '@IBDesignable', '@IBInspectable', '@IBOutlet'), suffix=r'\b'), Keyword.Reserved), (r'(as|dynamicType|false|is|nil|self|Self|super|true|__COLUMN__' - r'|__FILE__|__FUNCTION__|__LINE__|_' - r'|#(?:file|line|column|function))\b', Keyword.Constant), + r'|__FILE__|__FUNCTION__|__LINE__|_' + r'|#(?:file|line|column|function))\b', Keyword.Constant), (r'import\b', Keyword.Declaration, 'module'), (r'(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)', bygroups(Keyword.Declaration, Text, Name.Class)), diff --git a/contrib/python/Pygments/py3/pygments/lexers/other.py b/contrib/python/Pygments/py3/pygments/lexers/other.py index 66b76b060f..b0930088e6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/other.py +++ b/contrib/python/Pygments/py3/pygments/lexers/other.py @@ -35,6 +35,6 @@ from pygments.lexers.urbi import UrbiscriptLexer from pygments.lexers.smalltalk import SmalltalkLexer, NewspeakLexer from pygments.lexers.installers import NSISLexer, RPMSpecLexer from pygments.lexers.textedit import AwkLexer -from pygments.lexers.smv import NuSMVLexer +from pygments.lexers.smv import NuSMVLexer __all__ = [] diff --git a/contrib/python/Pygments/py3/pygments/lexers/parasail.py b/contrib/python/Pygments/py3/pygments/lexers/parasail.py index 4c116148dc..49d8d672e1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/parasail.py +++ b/contrib/python/Pygments/py3/pygments/lexers/parasail.py @@ -59,7 +59,7 @@ class ParaSailLexer(RegexLexer): (r'[a-zA-Z]\w*', Name), # Operators and Punctuation (r'(<==|==>|<=>|\*\*=|<\|=|<<=|>>=|==|!=|=\?|<=|>=|' - r'\*\*|<<|>>|=>|:=|\+=|-=|\*=|\|=|\||/=|\+|-|\*|/|' + r'\*\*|<<|>>|=>|:=|\+=|-=|\*=|\|=|\||/=|\+|-|\*|/|' r'\.\.|<\.\.|\.\.<|<\.\.<)', Operator), (r'(<|>|\[|\]|\(|\)|\||:|;|,|.|\{|\}|->)', diff --git a/contrib/python/Pygments/py3/pygments/lexers/parsers.py b/contrib/python/Pygments/py3/pygments/lexers/parsers.py index f4221a108b..0009082fc4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/parsers.py +++ b/contrib/python/Pygments/py3/pygments/lexers/parsers.py @@ -357,13 +357,13 @@ class AntlrLexer(RegexLexer): # tokensSpec (r'tokens\b', Keyword, 'tokens'), # attrScope - (r'(scope)(\s*)(' + _id + r')(\s*)(\{)', + (r'(scope)(\s*)(' + _id + r')(\s*)(\{)', bygroups(Keyword, Whitespace, Name.Variable, Whitespace, Punctuation), 'action'), # exception (r'(catch|finally)\b', Keyword, 'exception'), # action - (r'(@' + _id + r')(\s*)(::)?(\s*)(' + _id + r')(\s*)(\{)', + (r'(@' + _id + r')(\s*)(::)?(\s*)(' + _id + r')(\s*)(\{)', bygroups(Name.Label, Whitespace, Punctuation, Whitespace, Name.Label, Whitespace, Punctuation), 'action'), # rule @@ -398,10 +398,10 @@ class AntlrLexer(RegexLexer): # L173 ANTLRv3.g from ANTLR book (r'(scope)(\s+)(\{)', bygroups(Keyword, Whitespace, Punctuation), 'action'), - (r'(scope)(\s+)(' + _id + r')(\s*)(;)', + (r'(scope)(\s+)(' + _id + r')(\s*)(;)', bygroups(Keyword, Whitespace, Name.Label, Whitespace, Punctuation)), # ruleAction - (r'(@' + _id + r')(\s*)(\{)', + (r'(@' + _id + r')(\s*)(\{)', bygroups(Name.Label, Whitespace, Punctuation), 'action'), # finished prelims, go to rule alts! (r':', Punctuation, '#pop') @@ -435,7 +435,7 @@ class AntlrLexer(RegexLexer): include('comments'), (r'\{', Punctuation), (r'(' + _TOKEN_REF + r')(\s*)(=)?(\s*)(' + _STRING_LITERAL - + r')?(\s*)(;)', + + r')?(\s*)(;)', bygroups(Name.Label, Whitespace, Punctuation, Whitespace, String, Whitespace, Punctuation)), (r'\}', Punctuation, '#pop'), @@ -445,7 +445,7 @@ class AntlrLexer(RegexLexer): include('comments'), (r'\{', Punctuation), (r'(' + _id + r')(\s*)(=)(\s*)(' + - '|'.join((_id, _STRING_LITERAL, _INT, r'\*')) + r')(\s*)(;)', + '|'.join((_id, _STRING_LITERAL, _INT, r'\*')) + r')(\s*)(;)', bygroups(Name.Variable, Whitespace, Punctuation, Whitespace, Text, Whitespace, Punctuation)), (r'\}', Punctuation, '#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/pascal.py b/contrib/python/Pygments/py3/pygments/lexers/pascal.py index 4516bac1ac..0d1ac3fdb7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pascal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pascal.py @@ -43,7 +43,7 @@ class DelphiLexer(Lexer): """ name = 'Delphi' aliases = ['delphi', 'pas', 'pascal', 'objectpascal'] - filenames = ['*.pas', '*.dpr'] + filenames = ['*.pas', '*.dpr'] mimetypes = ['text/x-pascal'] TURBO_PASCAL_KEYWORDS = ( @@ -592,8 +592,8 @@ class AdaLexer(RegexLexer): ], 'end': [ ('(if|case|record|loop|select)', Keyword.Reserved), - (r'"[^"]+"|[\w.]+', Name.Function), - (r'\s+', Text), + (r'"[^"]+"|[\w.]+', Name.Function), + (r'\s+', Text), (';', Punctuation, '#pop'), ], 'type_def': [ @@ -627,11 +627,11 @@ class AdaLexer(RegexLexer): ], 'package': [ ('body', Keyword.Declaration), - (r'is\s+new|renames', Keyword.Reserved), + (r'is\s+new|renames', Keyword.Reserved), ('is', Keyword.Reserved, '#pop'), (';', Punctuation, '#pop'), - (r'\(', Punctuation, 'package_instantiation'), - (r'([\w.]+)', Name.Class), + (r'\(', Punctuation, 'package_instantiation'), + (r'([\w.]+)', Name.Class), include('root'), ], 'package_instantiation': [ diff --git a/contrib/python/Pygments/py3/pygments/lexers/pawn.py b/contrib/python/Pygments/py3/pygments/lexers/pawn.py index b00eedb745..5a303e4949 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pawn.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pawn.py @@ -35,7 +35,7 @@ class SourcePawnLexer(RegexLexer): tokens = { 'root': [ # preprocessor directives: without whitespace - (r'^#if\s+0', Comment.Preproc, 'if0'), + (r'^#if\s+0', Comment.Preproc, 'if0'), ('^#', Comment.Preproc, 'macro'), # or with whitespace ('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'), @@ -60,7 +60,7 @@ class SourcePawnLexer(RegexLexer): r'public|return|sizeof|static|decl|struct|switch)\b', Keyword), (r'(bool|Float)\b', Keyword.Type), (r'(true|false)\b', Keyword.Constant), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), ], 'string': [ (r'"', String, '#pop'), @@ -146,7 +146,7 @@ class PawnLexer(RegexLexer): tokens = { 'root': [ # preprocessor directives: without whitespace - (r'^#if\s+0', Comment.Preproc, 'if0'), + (r'^#if\s+0', Comment.Preproc, 'if0'), ('^#', Comment.Preproc, 'macro'), # or with whitespace ('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'), @@ -171,7 +171,7 @@ class PawnLexer(RegexLexer): r'public|return|sizeof|tagof|state|goto)\b', Keyword), (r'(bool|Float)\b', Keyword.Type), (r'(true|false)\b', Keyword.Constant), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), ], 'string': [ (r'"', String, '#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/perl.py b/contrib/python/Pygments/py3/pygments/lexers/perl.py index c387e54160..bac325bb45 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/perl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/perl.py @@ -51,7 +51,7 @@ class PerlLexer(RegexLexer): (words(( 'case', 'continue', 'do', 'else', 'elsif', 'for', 'foreach', 'if', 'last', 'my', 'next', 'our', 'redo', 'reset', 'then', - 'unless', 'until', 'while', 'print', 'new', 'BEGIN', + 'unless', 'until', 'while', 'print', 'new', 'BEGIN', 'CHECK', 'INIT', 'END', 'return'), suffix=r'\b'), Keyword), (r'(format)(\s+)(\w+)(\s*)(=)(\s*\n)', @@ -93,10 +93,10 @@ class PerlLexer(RegexLexer): 'getservbyport', 'getservent', 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep', 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local', 'localtime', 'log', 'lstat', - 'map', 'mkdir', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'my', 'next', 'oct', 'open', - 'opendir', 'ord', 'our', 'pack', 'pipe', 'pop', 'pos', 'printf', + 'map', 'mkdir', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'my', 'next', 'oct', 'open', + 'opendir', 'ord', 'our', 'pack', 'pipe', 'pop', 'pos', 'printf', 'prototype', 'push', 'quotemeta', 'rand', 'read', 'readdir', - 'readline', 'readlink', 'readpipe', 'recv', 'redo', 'ref', 'rename', + 'readline', 'readlink', 'readpipe', 'recv', 'redo', 'ref', 'rename', 'reverse', 'rewinddir', 'rindex', 'rmdir', 'scalar', 'seek', 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent', 'setpwent', 'setservent', @@ -108,8 +108,8 @@ class PerlLexer(RegexLexer): 'utime', 'values', 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write'), suffix=r'\b'), Name.Builtin), (r'((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\b', Name.Builtin.Pseudo), - (r'(<<)([\'"]?)([a-zA-Z_]\w*)(\2;?\n.*?\n)(\3)(\n)', - bygroups(String, String, String.Delimiter, String, String.Delimiter, Text)), + (r'(<<)([\'"]?)([a-zA-Z_]\w*)(\2;?\n.*?\n)(\3)(\n)', + bygroups(String, String, String.Delimiter, String, String.Delimiter, Text)), (r'__END__', Comment.Preproc, 'end-part'), (r'\$\^[ADEFHILMOPSTWX]', Name.Variable.Global), (r"\$[\\\"\[\]'&`+*.,;=%~?@$!<>(^|/-](?!\w)", Name.Variable.Global), @@ -130,14 +130,14 @@ class PerlLexer(RegexLexer): (r'(q|qq|qw|qr|qx)\[', String.Other, 'sb-string'), (r'(q|qq|qw|qr|qx)\<', String.Other, 'lt-string'), (r'(q|qq|qw|qr|qx)([\W_])(.|\n)*?\2', String.Other), - (r'(package)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', - bygroups(Keyword, Text, Name.Namespace)), - (r'(use|require|no)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', - bygroups(Keyword, Text, Name.Namespace)), - (r'(sub)(\s+)', bygroups(Keyword, Text), 'funcname'), - (words(( - 'no', 'package', 'require', 'use'), suffix=r'\b'), - Keyword), + (r'(package)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', + bygroups(Keyword, Text, Name.Namespace)), + (r'(use|require|no)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', + bygroups(Keyword, Text, Name.Namespace)), + (r'(sub)(\s+)', bygroups(Keyword, Text), 'funcname'), + (words(( + 'no', 'package', 'require', 'use'), suffix=r'\b'), + Keyword), (r'(\[\]|\*\*|::|<<|>>|>=|<=>|<=|={3}|!=|=~|' r'!~|&&?|\|\||\.{1,3})', Operator), (r'[-+/*%=<>&^|!\\~]=?', Operator), @@ -157,8 +157,8 @@ class PerlLexer(RegexLexer): (r'[\w:]+', Name.Variable, '#pop'), ], 'name': [ - (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*(::)?(?=\s*->)', Name.Namespace, '#pop'), - (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*::', Name.Namespace, '#pop'), + (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*(::)?(?=\s*->)', Name.Namespace, '#pop'), + (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*::', Name.Namespace, '#pop'), (r'[\w:]+', Name, '#pop'), (r'[A-Z_]+(?=\W)', Name.Constant, '#pop'), (r'(?=\W)', Text, '#pop'), @@ -210,7 +210,7 @@ class PerlLexer(RegexLexer): result = 0 - if re.search(r'(?:my|our)\s+[$@%(]', text): + if re.search(r'(?:my|our)\s+[$@%(]', text): result += 0.9 if ':=' in text: @@ -236,7 +236,7 @@ class Perl6Lexer(ExtendedRegexLexer): mimetypes = ['text/x-perl6', 'application/x-perl6'] flags = re.MULTILINE | re.DOTALL | re.UNICODE - PERL6_IDENTIFIER_RANGE = r"['\w:-]" + PERL6_IDENTIFIER_RANGE = r"['\w:-]" PERL6_KEYWORDS = ( #Phasers @@ -596,13 +596,13 @@ class Perl6Lexer(ExtendedRegexLexer): 'common': [ (r'#[`|=](?P<delimiter>(?P<first_char>[' + ''.join(PERL6_BRACKETS) + r'])(?P=first_char)*)', brackets_callback(Comment.Multiline)), - (r'#[^\n]*$', Comment.Single), + (r'#[^\n]*$', Comment.Single), (r'^(\s*)=begin\s+(\w+)\b.*?^\1=end\s+\2', Comment.Multiline), (r'^(\s*)=for.*?\n\s*?\n', Comment.Multiline), (r'^=.*?\n\s*?\n', Comment.Multiline), (r'(regex|token|rule)(\s*' + PERL6_IDENTIFIER_RANGE + '+:sym)', bygroups(Keyword, Name), 'token-sym-brackets'), - (r'(regex|token|rule)(?!' + PERL6_IDENTIFIER_RANGE + r')(\s*' + PERL6_IDENTIFIER_RANGE + '+)?', + (r'(regex|token|rule)(?!' + PERL6_IDENTIFIER_RANGE + r')(\s*' + PERL6_IDENTIFIER_RANGE + '+)?', bygroups(Keyword, Name), 'pre-token'), # deal with a special case in the Perl 6 grammar (role q { ... }) (r'(role)(\s+)(q)(\s*)', bygroups(Keyword, Text, Name, Text)), @@ -665,7 +665,7 @@ class Perl6Lexer(ExtendedRegexLexer): # make sure that '#' characters in quotes aren't treated as comments (r"(?<!\\)'(\\\\|\\[^\\]|[^'\\])*'", String.Regex), (r'(?<!\\)"(\\\\|\\[^\\]|[^"\\])*"', String.Regex), - (r'#.*?$', Comment.Single), + (r'#.*?$', Comment.Single), (r'\{', embedded_perl6_callback), ('.+?', String.Regex), ], @@ -698,21 +698,21 @@ class Perl6Lexer(ExtendedRegexLexer): rating = False # check for my/our/has declarations - if re.search(r"(?:my|our|has)\s+(?:" + Perl6Lexer.PERL6_IDENTIFIER_RANGE + - r"+\s+)?[$@%&(]", text): + if re.search(r"(?:my|our|has)\s+(?:" + Perl6Lexer.PERL6_IDENTIFIER_RANGE + + r"+\s+)?[$@%&(]", text): rating = 0.8 saw_perl_decl = True for line in lines: line = re.sub('#.*', '', line) - if re.match(r'^\s*$', line): + if re.match(r'^\s*$', line): continue # match v6; use v6; use v6.0; use v6.0.0; - if re.match(r'^\s*(?:use\s+)?v6(?:\.\d(?:\.\d)?)?;', line): + if re.match(r'^\s*(?:use\s+)?v6(?:\.\d(?:\.\d)?)?;', line): return True # match class, module, role, enum, grammar declarations - class_decl = re.match(r'^\s*(?:(?P<scope>my|our)\s+)?(?:module|class|role|enum|grammar)', line) + class_decl = re.match(r'^\s*(?:(?P<scope>my|our)\s+)?(?:module|class|role|enum|grammar)', line) if class_decl: if saw_perl_decl or class_decl.group('scope') is not None: return True diff --git a/contrib/python/Pygments/py3/pygments/lexers/php.py b/contrib/python/Pygments/py3/pygments/lexers/php.py index 0bde57c714..3ba299ac0a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/php.py +++ b/contrib/python/Pygments/py3/pygments/lexers/php.py @@ -189,9 +189,9 @@ class PhpLexer(RegexLexer): ], 'php': [ (r'\?>', Comment.Preproc, '#pop'), - (r'(<<<)([\'"]?)(' + _ident_inner + r')(\2\n.*?\n\s*)(\3)(;?)(\n)', - bygroups(String, String, String.Delimiter, String, String.Delimiter, - Punctuation, Text)), + (r'(<<<)([\'"]?)(' + _ident_inner + r')(\2\n.*?\n\s*)(\3)(;?)(\n)', + bygroups(String, String, String.Delimiter, String, String.Delimiter, + Punctuation, Text)), (r'\s+', Text), (r'#.*?\n', Comment.Single), (r'//.*?\n', Comment.Single), @@ -216,15 +216,15 @@ class PhpLexer(RegexLexer): r'FALSE|print|for|require|continue|foreach|require_once|' r'declare|return|default|static|do|switch|die|stdClass|' r'echo|else|TRUE|elseif|var|empty|if|xor|enddeclare|include|' - r'virtual|endfor|include_once|while|endforeach|global|' - r'endif|list|endswitch|new|endwhile|not|' - r'array|E_ALL|NULL|final|php_user_filter|interface|' + r'virtual|endfor|include_once|while|endforeach|global|' + r'endif|list|endswitch|new|endwhile|not|' + r'array|E_ALL|NULL|final|php_user_filter|interface|' r'implements|public|private|protected|abstract|clone|try|' r'catch|throw|this|use|namespace|trait|yield|' r'finally)\b', Keyword), (r'(true|false|null)\b', Keyword.Constant), - include('magicconstants'), - (r'\$\{\$+' + _ident_inner + r'\}', Name.Variable), + include('magicconstants'), + (r'\$\{\$+' + _ident_inner + r'\}', Name.Variable), (r'\$+' + _ident_inner, Name.Variable), (_ident_inner, Name.Other), (r'(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?', Number.Float), @@ -237,35 +237,35 @@ class PhpLexer(RegexLexer): (r'`([^`\\]*(?:\\.[^`\\]*)*)`', String.Backtick), (r'"', String.Double, 'string'), ], - 'magicfuncs': [ - # source: http://php.net/manual/en/language.oop5.magic.php - (words(( - '__construct', '__destruct', '__call', '__callStatic', '__get', '__set', - '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke', - '__set_state', '__clone', '__debugInfo',), suffix=r'\b'), - Name.Function.Magic), - ], - 'magicconstants': [ - # source: http://php.net/manual/en/language.constants.predefined.php - (words(( - '__LINE__', '__FILE__', '__DIR__', '__FUNCTION__', '__CLASS__', - '__TRAIT__', '__METHOD__', '__NAMESPACE__',), - suffix=r'\b'), - Name.Constant), - ], + 'magicfuncs': [ + # source: http://php.net/manual/en/language.oop5.magic.php + (words(( + '__construct', '__destruct', '__call', '__callStatic', '__get', '__set', + '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke', + '__set_state', '__clone', '__debugInfo',), suffix=r'\b'), + Name.Function.Magic), + ], + 'magicconstants': [ + # source: http://php.net/manual/en/language.constants.predefined.php + (words(( + '__LINE__', '__FILE__', '__DIR__', '__FUNCTION__', '__CLASS__', + '__TRAIT__', '__METHOD__', '__NAMESPACE__',), + suffix=r'\b'), + Name.Constant), + ], 'classname': [ (_ident_inner, Name.Class, '#pop') ], 'functionname': [ - include('magicfuncs'), - (_ident_inner, Name.Function, '#pop'), - default('#pop') + include('magicfuncs'), + (_ident_inner, Name.Function, '#pop'), + default('#pop') ], 'string': [ (r'"', String.Double, '#pop'), (r'[^{$"\\]+', String.Double), (r'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape), - (r'\$' + _ident_inner + r'(\[\S+?\]|->' + _ident_inner + ')?', + (r'\$' + _ident_inner + r'(\[\S+?\]|->' + _ident_inner + ')?', String.Interpol), (r'(\{\$\{)(.*?)(\}\})', bygroups(String.Interpol, using(this, _startinline=True), @@ -275,7 +275,7 @@ class PhpLexer(RegexLexer): String.Interpol)), (r'(\$\{)(\S+)(\})', bygroups(String.Interpol, Name.Variable, String.Interpol)), - (r'[${\\]', String.Double) + (r'[${\\]', String.Double) ], } @@ -312,8 +312,8 @@ class PhpLexer(RegexLexer): yield index, token, value def analyse_text(text): - if shebang_matches(text, r'php'): - return True + if shebang_matches(text, r'php'): + return True rv = 0.0 if re.search(r'<\?(?!xml)', text): rv += 0.3 diff --git a/contrib/python/Pygments/py3/pygments/lexers/pony.py b/contrib/python/Pygments/py3/pygments/lexers/pony.py index ae234cb0b0..0cd5dbd3df 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pony.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pony.py @@ -1,93 +1,93 @@ -""" - pygments.lexers.pony - ~~~~~~~~~~~~~~~~~~~~ - - Lexers for Pony and related languages. - +""" + pygments.lexers.pony + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for Pony and related languages. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, bygroups, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation - -__all__ = ['PonyLexer'] - - -class PonyLexer(RegexLexer): - """ - For Pony source code. - - .. versionadded:: 2.4 - """ - - name = 'Pony' - aliases = ['pony'] - filenames = ['*.pony'] - - _caps = r'(iso|trn|ref|val|box|tag)' - - tokens = { - 'root': [ - (r'\n', Text), - (r'[^\S\n]+', Text), - (r'//.*\n', Comment.Single), - (r'/\*', Comment.Multiline, 'nested_comment'), - (r'"""(?:.|\n)*?"""', String.Doc), - (r'"', String, 'string'), - (r'\'.*\'', String.Char), - (r'=>|[]{}:().~;,|&!^?[]', Punctuation), - (words(( - 'addressof', 'and', 'as', 'consume', 'digestof', 'is', 'isnt', - 'not', 'or'), - suffix=r'\b'), - Operator.Word), - (r'!=|==|<<|>>|[-+/*%=<>]', Operator), - (words(( - 'box', 'break', 'compile_error', 'compile_intrinsic', - 'continue', 'do', 'else', 'elseif', 'embed', 'end', 'error', - 'for', 'if', 'ifdef', 'in', 'iso', 'lambda', 'let', 'match', - 'object', 'recover', 'ref', 'repeat', 'return', 'tag', 'then', - 'this', 'trn', 'try', 'until', 'use', 'var', 'val', 'where', - 'while', 'with', '#any', '#read', '#send', '#share'), - suffix=r'\b'), - Keyword), - (r'(actor|class|struct|primitive|interface|trait|type)((?:\s)+)', - bygroups(Keyword, Text), 'typename'), - (r'(new|fun|be)((?:\s)+)', bygroups(Keyword, Text), 'methodname'), - (words(( - 'I8', 'U8', 'I16', 'U16', 'I32', 'U32', 'I64', 'U64', 'I128', - 'U128', 'ILong', 'ULong', 'ISize', 'USize', 'F32', 'F64', - 'Bool', 'Pointer', 'None', 'Any', 'Array', 'String', - 'Iterator'), - suffix=r'\b'), - Name.Builtin.Type), - (r'_?[A-Z]\w*', Name.Type), - (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float), - (r'0x[0-9a-fA-F]+', Number.Hex), - (r'\d+', Number.Integer), - (r'(true|false)\b', Name.Builtin), - (r'_\d*', Name), + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['PonyLexer'] + + +class PonyLexer(RegexLexer): + """ + For Pony source code. + + .. versionadded:: 2.4 + """ + + name = 'Pony' + aliases = ['pony'] + filenames = ['*.pony'] + + _caps = r'(iso|trn|ref|val|box|tag)' + + tokens = { + 'root': [ + (r'\n', Text), + (r'[^\S\n]+', Text), + (r'//.*\n', Comment.Single), + (r'/\*', Comment.Multiline, 'nested_comment'), + (r'"""(?:.|\n)*?"""', String.Doc), + (r'"', String, 'string'), + (r'\'.*\'', String.Char), + (r'=>|[]{}:().~;,|&!^?[]', Punctuation), + (words(( + 'addressof', 'and', 'as', 'consume', 'digestof', 'is', 'isnt', + 'not', 'or'), + suffix=r'\b'), + Operator.Word), + (r'!=|==|<<|>>|[-+/*%=<>]', Operator), + (words(( + 'box', 'break', 'compile_error', 'compile_intrinsic', + 'continue', 'do', 'else', 'elseif', 'embed', 'end', 'error', + 'for', 'if', 'ifdef', 'in', 'iso', 'lambda', 'let', 'match', + 'object', 'recover', 'ref', 'repeat', 'return', 'tag', 'then', + 'this', 'trn', 'try', 'until', 'use', 'var', 'val', 'where', + 'while', 'with', '#any', '#read', '#send', '#share'), + suffix=r'\b'), + Keyword), + (r'(actor|class|struct|primitive|interface|trait|type)((?:\s)+)', + bygroups(Keyword, Text), 'typename'), + (r'(new|fun|be)((?:\s)+)', bygroups(Keyword, Text), 'methodname'), + (words(( + 'I8', 'U8', 'I16', 'U16', 'I32', 'U32', 'I64', 'U64', 'I128', + 'U128', 'ILong', 'ULong', 'ISize', 'USize', 'F32', 'F64', + 'Bool', 'Pointer', 'None', 'Any', 'Array', 'String', + 'Iterator'), + suffix=r'\b'), + Name.Builtin.Type), + (r'_?[A-Z]\w*', Name.Type), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float), + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'\d+', Number.Integer), + (r'(true|false)\b', Name.Builtin), + (r'_\d*', Name), (r'_?[a-z][\w\']*', Name) - ], - 'typename': [ - (_caps + r'?((?:\s)*)(_?[A-Z]\w*)', - bygroups(Keyword, Text, Name.Class), '#pop') - ], - 'methodname': [ - (_caps + r'?((?:\s)*)(_?[a-z]\w*)', - bygroups(Keyword, Text, Name.Function), '#pop') - ], - 'nested_comment': [ - (r'[^*/]+', Comment.Multiline), - (r'/\*', Comment.Multiline, '#push'), - (r'\*/', Comment.Multiline, '#pop'), - (r'[*/]', Comment.Multiline) - ], - 'string': [ - (r'"', String, '#pop'), - (r'\\"', String), - (r'[^\\"]+', String) - ] - } + ], + 'typename': [ + (_caps + r'?((?:\s)*)(_?[A-Z]\w*)', + bygroups(Keyword, Text, Name.Class), '#pop') + ], + 'methodname': [ + (_caps + r'?((?:\s)*)(_?[a-z]\w*)', + bygroups(Keyword, Text, Name.Function), '#pop') + ], + 'nested_comment': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline) + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\"', String), + (r'[^\\"]+', String) + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/praat.py b/contrib/python/Pygments/py3/pygments/lexers/praat.py index 78dd98d776..8fbae8c520 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/praat.py +++ b/contrib/python/Pygments/py3/pygments/lexers/praat.py @@ -26,21 +26,21 @@ class PraatLexer(RegexLexer): aliases = ['praat'] filenames = ['*.praat', '*.proc', '*.psc'] - keywords = ( + keywords = ( 'if', 'then', 'else', 'elsif', 'elif', 'endif', 'fi', 'for', 'from', 'to', 'endfor', 'endproc', 'while', 'endwhile', 'repeat', 'until', 'select', 'plus', 'minus', 'demo', 'assert', 'stopwatch', 'nocheck', 'nowarn', 'noprogress', 'editor', 'endeditor', 'clearinfo', - ) + ) - functions_string = ( + functions_string = ( 'backslashTrigraphsToUnicode', 'chooseDirectory', 'chooseReadFile', 'chooseWriteFile', 'date', 'demoKey', 'do', 'environment', 'extractLine', 'extractWord', 'fixed', 'info', 'left', 'mid', 'percent', 'readFile', 'replace', 'replace_regex', 'right', 'selected', 'string', 'unicodeToBackslashTrigraphs', - ) + ) - functions_numeric = ( + functions_numeric = ( 'abs', 'appendFile', 'appendFileLine', 'appendInfo', 'appendInfoLine', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'barkToHertz', 'beginPause', 'beginSendPraat', 'besselI', 'besselK', 'beta', 'beta2', @@ -66,13 +66,13 @@ class PraatLexer(RegexLexer): 'sincpi', 'sinh', 'soundPressureToPhon', 'sqrt', 'startsWith', 'studentP', 'studentQ', 'tan', 'tanh', 'text', 'variableExists', 'word', 'writeFile', 'writeFileLine', 'writeInfo', 'writeInfoLine', - ) + ) - functions_array = ( + functions_array = ( 'linear', 'randomGauss', 'randomInteger', 'randomUniform', 'zero', - ) + ) - objects = ( + objects = ( 'Activation', 'AffineTransform', 'AmplitudeTier', 'Art', 'Artword', 'Autosegment', 'BarkFilter', 'BarkSpectrogram', 'CCA', 'Categories', 'Cepstrogram', 'Cepstrum', 'Cepstrumc', 'ChebyshevSeries', 'ClassificationTable', @@ -99,17 +99,17 @@ class PraatLexer(RegexLexer): 'Strings', 'StringsIndex', 'Table', 'TableOfReal', 'TextGrid', 'TextInterval', 'TextPoint', 'TextTier', 'Tier', 'Transition', 'VocalTract', 'VocalTractTier', 'Weight', 'WordList', - ) + ) - variables_numeric = ( + variables_numeric = ( 'macintosh', 'windows', 'unix', 'praatVersion', 'pi', 'e', 'undefined', - ) + ) - variables_string = ( + variables_string = ( 'praatVersion', 'tab', 'shellDirectory', 'homeDirectory', 'preferencesDirectory', 'newline', 'temporaryDirectory', 'defaultDirectory', - ) + ) object_attributes = ( 'ncol', 'nrow', 'xmin', 'ymin', 'xmax', 'ymax', 'nx', 'ny', 'dx', 'dy', @@ -156,7 +156,7 @@ class PraatLexer(RegexLexer): (r'\.{3}', Keyword, ('#pop', 'old_arguments')), (r':', Keyword, ('#pop', 'comma_list')), - (r'\s', Text, '#pop'), + (r'\s', Text, '#pop'), ], 'procedure_call': [ (r'\s+', Text), @@ -173,8 +173,8 @@ class PraatLexer(RegexLexer): ], 'function_call': [ (words(functions_string, suffix=r'\$(?=\s*[:(])'), Name.Function, 'function'), - (words(functions_array, suffix=r'#(?=\s*[:(])'), Name.Function, 'function'), - (words(functions_numeric, suffix=r'(?=\s*[:(])'), Name.Function, 'function'), + (words(functions_array, suffix=r'#(?=\s*[:(])'), Name.Function, 'function'), + (words(functions_numeric, suffix=r'(?=\s*[:(])'), Name.Function, 'function'), ], 'function': [ (r'\s+', Text), @@ -195,7 +195,7 @@ class PraatLexer(RegexLexer): include('operator'), include('number'), - (r'[()]', Text), + (r'[()]', Text), (r',', Punctuation), ], 'old_arguments': [ @@ -209,7 +209,7 @@ class PraatLexer(RegexLexer): (r'[^\n]', Text), ], 'number': [ - (r'\n', Text, '#pop'), + (r'\n', Text, '#pop'), (r'\b\d+(\.\d*)?([eE][-+]?\d+)?%?', Number), ], 'object_reference': [ @@ -234,14 +234,14 @@ class PraatLexer(RegexLexer): bygroups(Name.Builtin, Name.Builtin), 'object_reference'), - (r'\.?_?[a-z][\w.]*(\$|#)?', Text), + (r'\.?_?[a-z][\w.]*(\$|#)?', Text), (r'[\[\]]', Punctuation, 'comma_list'), include('string_interpolated'), ], 'operator': [ - (r'([+\/*<>=!-]=?|[&*|][&*|]?|\^|<>)', Operator), - (r'(?<![\w.])(and|or|not|div|mod)(?![\w.])', Operator.Word), + (r'([+\/*<>=!-]=?|[&*|][&*|]?|\^|<>)', Operator), + (r'(?<![\w.])(and|or|not|div|mod)(?![\w.])', Operator.Word), ], 'string_interpolated': [ (r'\'[_a-z][^\[\]\'":]*(\[([\d,]+|"[\w,]+")\])?(:[0-9]+)?\'', diff --git a/contrib/python/Pygments/py3/pygments/lexers/prolog.py b/contrib/python/Pygments/py3/pygments/lexers/prolog.py index e4cafe6c9e..21c813625d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/prolog.py +++ b/contrib/python/Pygments/py3/pygments/lexers/prolog.py @@ -299,7 +299,7 @@ class LogtalkLexer(RegexLexer): return 1.0 elif ':- category(' in text: return 1.0 - elif re.search(r'^:-\s[a-z]', text, re.M): + elif re.search(r'^:-\s[a-z]', text, re.M): return 0.9 else: return 0.0 diff --git a/contrib/python/Pygments/py3/pygments/lexers/python.py b/contrib/python/Pygments/py3/pygments/lexers/python.py index 41707bf315..2901d7b982 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/python.py +++ b/contrib/python/Pygments/py3/pygments/lexers/python.py @@ -420,7 +420,7 @@ class Python2Lexer(RegexLexer): return [ # the old style '%s' % (...) string formatting (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' - '[hlL]?[E-GXc-giorsux%]', String.Interpol), + '[hlL]?[E-GXc-giorsux%]', String.Interpol), # backslashes, quotes and formatting signs must be parsed one at a time (r'[^\\\'"%\n]+', ttype), (r'[\'"\\]', ttype), @@ -432,10 +432,10 @@ class Python2Lexer(RegexLexer): tokens = { 'root': [ (r'\n', Text), - (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")', - bygroups(Text, String.Affix, String.Doc)), - (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')", - bygroups(Text, String.Affix, String.Doc)), + (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")', + bygroups(Text, String.Affix, String.Doc)), + (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')", + bygroups(Text, String.Affix, String.Doc)), (r'[^\S\n]+', Text), (r'\A#!.+$', Comment.Hashbang), (r'#.*$', Comment.Single), @@ -452,25 +452,25 @@ class Python2Lexer(RegexLexer): (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), 'import'), include('builtins'), - include('magicfuncs'), - include('magicvars'), + include('magicfuncs'), + include('magicvars'), include('backtick'), - ('([rR]|[uUbB][rR]|[rR][uUbB])(""")', - bygroups(String.Affix, String.Double), 'tdqs'), - ("([rR]|[uUbB][rR]|[rR][uUbB])(''')", - bygroups(String.Affix, String.Single), 'tsqs'), - ('([rR]|[uUbB][rR]|[rR][uUbB])(")', - bygroups(String.Affix, String.Double), 'dqs'), - ("([rR]|[uUbB][rR]|[rR][uUbB])(')", - bygroups(String.Affix, String.Single), 'sqs'), - ('([uUbB]?)(""")', bygroups(String.Affix, String.Double), - combined('stringescape', 'tdqs')), - ("([uUbB]?)(''')", bygroups(String.Affix, String.Single), - combined('stringescape', 'tsqs')), - ('([uUbB]?)(")', bygroups(String.Affix, String.Double), - combined('stringescape', 'dqs')), - ("([uUbB]?)(')", bygroups(String.Affix, String.Single), - combined('stringescape', 'sqs')), + ('([rR]|[uUbB][rR]|[rR][uUbB])(""")', + bygroups(String.Affix, String.Double), 'tdqs'), + ("([rR]|[uUbB][rR]|[rR][uUbB])(''')", + bygroups(String.Affix, String.Single), 'tsqs'), + ('([rR]|[uUbB][rR]|[rR][uUbB])(")', + bygroups(String.Affix, String.Double), 'dqs'), + ("([rR]|[uUbB][rR]|[rR][uUbB])(')", + bygroups(String.Affix, String.Single), 'sqs'), + ('([uUbB]?)(""")', bygroups(String.Affix, String.Double), + combined('stringescape', 'tdqs')), + ("([uUbB]?)(''')", bygroups(String.Affix, String.Single), + combined('stringescape', 'tsqs')), + ('([uUbB]?)(")', bygroups(String.Affix, String.Double), + combined('stringescape', 'dqs')), + ("([uUbB]?)(')", bygroups(String.Affix, String.Single), + combined('stringescape', 'sqs')), include('name'), include('numbers'), ], @@ -497,7 +497,7 @@ class Python2Lexer(RegexLexer): 'unichr', 'unicode', 'vars', 'xrange', 'zip'), prefix=r'(?<!\.)', suffix=r'\b'), Name.Builtin), - (r'(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls' + (r'(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls' r')\b', Name.Builtin.Pseudo), (words(( 'ArithmeticError', 'AssertionError', 'AttributeError', @@ -516,37 +516,37 @@ class Python2Lexer(RegexLexer): 'WindowsError', 'ZeroDivisionError'), prefix=r'(?<!\.)', suffix=r'\b'), Name.Exception), ], - 'magicfuncs': [ - (words(( - '__abs__', '__add__', '__and__', '__call__', '__cmp__', '__coerce__', - '__complex__', '__contains__', '__del__', '__delattr__', '__delete__', - '__delitem__', '__delslice__', '__div__', '__divmod__', '__enter__', - '__eq__', '__exit__', '__float__', '__floordiv__', '__ge__', '__get__', - '__getattr__', '__getattribute__', '__getitem__', '__getslice__', '__gt__', - '__hash__', '__hex__', '__iadd__', '__iand__', '__idiv__', '__ifloordiv__', - '__ilshift__', '__imod__', '__imul__', '__index__', '__init__', - '__instancecheck__', '__int__', '__invert__', '__iop__', '__ior__', - '__ipow__', '__irshift__', '__isub__', '__iter__', '__itruediv__', - '__ixor__', '__le__', '__len__', '__long__', '__lshift__', '__lt__', - '__missing__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', - '__nonzero__', '__oct__', '__op__', '__or__', '__pos__', '__pow__', - '__radd__', '__rand__', '__rcmp__', '__rdiv__', '__rdivmod__', '__repr__', - '__reversed__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', - '__rop__', '__ror__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', - '__rtruediv__', '__rxor__', '__set__', '__setattr__', '__setitem__', - '__setslice__', '__str__', '__sub__', '__subclasscheck__', '__truediv__', - '__unicode__', '__xor__'), suffix=r'\b'), - Name.Function.Magic), - ], - 'magicvars': [ - (words(( - '__bases__', '__class__', '__closure__', '__code__', '__defaults__', - '__dict__', '__doc__', '__file__', '__func__', '__globals__', - '__metaclass__', '__module__', '__mro__', '__name__', '__self__', - '__slots__', '__weakref__'), - suffix=r'\b'), - Name.Variable.Magic), - ], + 'magicfuncs': [ + (words(( + '__abs__', '__add__', '__and__', '__call__', '__cmp__', '__coerce__', + '__complex__', '__contains__', '__del__', '__delattr__', '__delete__', + '__delitem__', '__delslice__', '__div__', '__divmod__', '__enter__', + '__eq__', '__exit__', '__float__', '__floordiv__', '__ge__', '__get__', + '__getattr__', '__getattribute__', '__getitem__', '__getslice__', '__gt__', + '__hash__', '__hex__', '__iadd__', '__iand__', '__idiv__', '__ifloordiv__', + '__ilshift__', '__imod__', '__imul__', '__index__', '__init__', + '__instancecheck__', '__int__', '__invert__', '__iop__', '__ior__', + '__ipow__', '__irshift__', '__isub__', '__iter__', '__itruediv__', + '__ixor__', '__le__', '__len__', '__long__', '__lshift__', '__lt__', + '__missing__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', + '__nonzero__', '__oct__', '__op__', '__or__', '__pos__', '__pow__', + '__radd__', '__rand__', '__rcmp__', '__rdiv__', '__rdivmod__', '__repr__', + '__reversed__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', + '__rop__', '__ror__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', + '__rtruediv__', '__rxor__', '__set__', '__setattr__', '__setitem__', + '__setslice__', '__str__', '__sub__', '__subclasscheck__', '__truediv__', + '__unicode__', '__xor__'), suffix=r'\b'), + Name.Function.Magic), + ], + 'magicvars': [ + (words(( + '__bases__', '__class__', '__closure__', '__code__', '__defaults__', + '__dict__', '__doc__', '__file__', '__func__', '__globals__', + '__metaclass__', '__module__', '__mro__', '__name__', '__self__', + '__slots__', '__weakref__'), + suffix=r'\b'), + Name.Variable.Magic), + ], 'numbers': [ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float), (r'\d+[eE][+-]?[0-9]+j?', Number.Float), @@ -561,15 +561,15 @@ class Python2Lexer(RegexLexer): ], 'name': [ (r'@[\w.]+', Name.Decorator), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), ], 'funcname': [ - include('magicfuncs'), - (r'[a-zA-Z_]\w*', Name.Function, '#pop'), - default('#pop'), + include('magicfuncs'), + (r'[a-zA-Z_]\w*', Name.Function, '#pop'), + default('#pop'), ], 'classname': [ - (r'[a-zA-Z_]\w*', Name.Class, '#pop') + (r'[a-zA-Z_]\w*', Name.Class, '#pop') ], 'import': [ (r'(?:[ \t]|\\\n)+', Text), @@ -919,10 +919,10 @@ class CythonLexer(RegexLexer): ], 'name': [ (r'@\w+', Name.Decorator), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), ], 'funcname': [ - (r'[a-zA-Z_]\w*', Name.Function, '#pop') + (r'[a-zA-Z_]\w*', Name.Function, '#pop') ], 'cdef': [ (r'(public|readonly|extern|api|inline)\b', Keyword.Reserved), @@ -939,7 +939,7 @@ class CythonLexer(RegexLexer): (r'.', Text), ], 'classname': [ - (r'[a-zA-Z_]\w*', Name.Class, '#pop') + (r'[a-zA-Z_]\w*', Name.Class, '#pop') ], 'import': [ (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)), @@ -959,7 +959,7 @@ class CythonLexer(RegexLexer): ], 'strings': [ (r'%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' - '[hlL]?[E-GXc-giorsux%]', String.Interpol), + '[hlL]?[E-GXc-giorsux%]', String.Interpol), (r'[^\\\'"%\n]+', String), # quotes, percents and backslashes must be parsed one at a time (r'[\'"\\]', String), @@ -1030,20 +1030,20 @@ class DgLexer(RegexLexer): (words(( 'bool', 'bytearray', 'bytes', 'classmethod', 'complex', 'dict', 'dict\'', 'float', 'frozenset', 'int', 'list', 'list\'', 'memoryview', 'object', - 'property', 'range', 'set', 'set\'', 'slice', 'staticmethod', 'str', - 'super', 'tuple', 'tuple\'', 'type'), - prefix=r'(?<!\.)', suffix=r'(?![\'\w])'), + 'property', 'range', 'set', 'set\'', 'slice', 'staticmethod', 'str', + 'super', 'tuple', 'tuple\'', 'type'), + prefix=r'(?<!\.)', suffix=r'(?![\'\w])'), Name.Builtin), (words(( '__import__', 'abs', 'all', 'any', 'bin', 'bind', 'chr', 'cmp', 'compile', 'complex', 'delattr', 'dir', 'divmod', 'drop', 'dropwhile', 'enumerate', - 'eval', 'exhaust', 'filter', 'flip', 'foldl1?', 'format', 'fst', - 'getattr', 'globals', 'hasattr', 'hash', 'head', 'hex', 'id', 'init', - 'input', 'isinstance', 'issubclass', 'iter', 'iterate', 'last', 'len', - 'locals', 'map', 'max', 'min', 'next', 'oct', 'open', 'ord', 'pow', - 'print', 'repr', 'reversed', 'round', 'setattr', 'scanl1?', 'snd', - 'sorted', 'sum', 'tail', 'take', 'takewhile', 'vars', 'zip'), - prefix=r'(?<!\.)', suffix=r'(?![\'\w])'), + 'eval', 'exhaust', 'filter', 'flip', 'foldl1?', 'format', 'fst', + 'getattr', 'globals', 'hasattr', 'hash', 'head', 'hex', 'id', 'init', + 'input', 'isinstance', 'issubclass', 'iter', 'iterate', 'last', 'len', + 'locals', 'map', 'max', 'min', 'next', 'oct', 'open', 'ord', 'pow', + 'print', 'repr', 'reversed', 'round', 'setattr', 'scanl1?', 'snd', + 'sorted', 'sum', 'tail', 'take', 'takewhile', 'vars', 'zip'), + prefix=r'(?<!\.)', suffix=r'(?![\'\w])'), Name.Builtin), (r"(?<!\.)(self|Ellipsis|NotImplemented|None|True|False)(?!['\w])", Name.Builtin.Pseudo), @@ -1069,7 +1069,7 @@ class DgLexer(RegexLexer): ], 'string': [ (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' - '[hlL]?[E-GXc-giorsux%]', String.Interpol), + '[hlL]?[E-GXc-giorsux%]', String.Interpol), (r'[^\\\'"%\n]+', String), # quotes, percents and backslashes must be parsed one at a time (r'[\'"\\]', String), diff --git a/contrib/python/Pygments/py3/pygments/lexers/qvt.py b/contrib/python/Pygments/py3/pygments/lexers/qvt.py index bc2b4192d1..72817f09c1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/qvt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/qvt.py @@ -8,8 +8,8 @@ :license: BSD, see LICENSE for details. """ -from pygments.lexer import RegexLexer, bygroups, include, combined, default, \ - words +from pygments.lexer import RegexLexer, bygroups, include, combined, default, \ + words from pygments.token import Text, Comment, Operator, Keyword, Punctuation, \ Name, String, Number @@ -50,26 +50,26 @@ class QVToLexer(RegexLexer): bygroups(Comment, Comment, Comment.Preproc, Comment)), # Uncomment the following if you want to distinguish between # '/*' and '/**', à la javadoc - # (r'/[*]{2}(.|\n)*?[*]/', Comment.Multiline), + # (r'/[*]{2}(.|\n)*?[*]/', Comment.Multiline), (r'/[*](.|\n)*?[*]/', Comment.Multiline), (r'\\\n', Text), (r'(and|not|or|xor|##?)\b', Operator.Word), - (r'(:{1,2}=|[-+]=)\b', Operator.Word), - (r'(@|<<|>>)\b', Keyword), # stereotypes - (r'!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]', Operator), + (r'(:{1,2}=|[-+]=)\b', Operator.Word), + (r'(@|<<|>>)\b', Keyword), # stereotypes + (r'!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]', Operator), (r'[]{}:(),;[]', Punctuation), (r'(true|false|unlimited|null)\b', Keyword.Constant), (r'(this|self|result)\b', Name.Builtin.Pseudo), (r'(var)\b', Keyword.Declaration), (r'(from|import)\b', Keyword.Namespace, 'fromimport'), - (r'(metamodel|class|exception|primitive|enum|transformation|' - r'library)(\s+)(\w+)', + (r'(metamodel|class|exception|primitive|enum|transformation|' + r'library)(\s+)(\w+)', bygroups(Keyword.Word, Text, Name.Class)), - (r'(exception)(\s+)(\w+)', - bygroups(Keyword.Word, Text, Name.Exception)), + (r'(exception)(\s+)(\w+)', + bygroups(Keyword.Word, Text, Name.Exception)), (r'(main)\b', Name.Function), - (r'(mapping|helper|query)(\s+)', - bygroups(Keyword.Declaration, Text), 'operation'), + (r'(mapping|helper|query)(\s+)', + bygroups(Keyword.Declaration, Text), 'operation'), (r'(assert)(\s+)\b', bygroups(Keyword, Text), 'assert'), (r'(Bag|Collection|Dict|OrderedSet|Sequence|Set|Tuple|List)\b', Keyword.Type), @@ -78,45 +78,45 @@ class QVToLexer(RegexLexer): ("'", String, combined('stringescape', 'sqs')), include('name'), include('numbers'), - # (r'([a-zA-Z_]\w*)(::)([a-zA-Z_]\w*)', + # (r'([a-zA-Z_]\w*)(::)([a-zA-Z_]\w*)', # bygroups(Text, Text, Text)), - ], + ], 'fromimport': [ (r'(?:[ \t]|\\\n)+', Text), - (r'[a-zA-Z_][\w.]*', Name.Namespace), - default('#pop'), - ], + (r'[a-zA-Z_][\w.]*', Name.Namespace), + default('#pop'), + ], 'operation': [ (r'::', Text), - (r'(.*::)([a-zA-Z_]\w*)([ \t]*)(\()', - bygroups(Text, Name.Function, Text, Punctuation), '#pop') - ], + (r'(.*::)([a-zA-Z_]\w*)([ \t]*)(\()', + bygroups(Text, Name.Function, Text, Punctuation), '#pop') + ], 'assert': [ (r'(warning|error|fatal)\b', Keyword, '#pop'), - default('#pop'), # all else: go back - ], + default('#pop'), # all else: go back + ], 'keywords': [ - (words(( - 'abstract', 'access', 'any', 'assert', 'blackbox', 'break', - 'case', 'collect', 'collectNested', 'collectOne', 'collectselect', - 'collectselectOne', 'composes', 'compute', 'configuration', - 'constructor', 'continue', 'datatype', 'default', 'derived', - 'disjuncts', 'do', 'elif', 'else', 'end', 'endif', 'except', - 'exists', 'extends', 'forAll', 'forEach', 'forOne', 'from', 'if', - 'implies', 'in', 'inherits', 'init', 'inout', 'intermediate', - 'invresolve', 'invresolveIn', 'invresolveone', 'invresolveoneIn', - 'isUnique', 'iterate', 'late', 'let', 'literal', 'log', 'map', - 'merges', 'modeltype', 'new', 'object', 'one', 'ordered', 'out', - 'package', 'population', 'property', 'raise', 'readonly', - 'references', 'refines', 'reject', 'resolve', 'resolveIn', - 'resolveone', 'resolveoneIn', 'return', 'select', 'selectOne', - 'sortedBy', 'static', 'switch', 'tag', 'then', 'try', 'typedef', - 'unlimited', 'uses', 'when', 'where', 'while', 'with', 'xcollect', - 'xmap', 'xselect'), suffix=r'\b'), Keyword), + (words(( + 'abstract', 'access', 'any', 'assert', 'blackbox', 'break', + 'case', 'collect', 'collectNested', 'collectOne', 'collectselect', + 'collectselectOne', 'composes', 'compute', 'configuration', + 'constructor', 'continue', 'datatype', 'default', 'derived', + 'disjuncts', 'do', 'elif', 'else', 'end', 'endif', 'except', + 'exists', 'extends', 'forAll', 'forEach', 'forOne', 'from', 'if', + 'implies', 'in', 'inherits', 'init', 'inout', 'intermediate', + 'invresolve', 'invresolveIn', 'invresolveone', 'invresolveoneIn', + 'isUnique', 'iterate', 'late', 'let', 'literal', 'log', 'map', + 'merges', 'modeltype', 'new', 'object', 'one', 'ordered', 'out', + 'package', 'population', 'property', 'raise', 'readonly', + 'references', 'refines', 'reject', 'resolve', 'resolveIn', + 'resolveone', 'resolveoneIn', 'return', 'select', 'selectOne', + 'sortedBy', 'static', 'switch', 'tag', 'then', 'try', 'typedef', + 'unlimited', 'uses', 'when', 'where', 'while', 'with', 'xcollect', + 'xmap', 'xselect'), suffix=r'\b'), Keyword), ], # There is no need to distinguish between String.Single and @@ -125,27 +125,27 @@ class QVToLexer(RegexLexer): (r'[^\\\'"\n]+', String), # quotes, percents and backslashes must be parsed one at a time (r'[\'"\\]', String), - ], + ], 'stringescape': [ (r'\\([\\btnfr"\']|u[0-3][0-7]{2}|u[0-7]{1,2})', String.Escape) ], - 'dqs': [ # double-quoted string + 'dqs': [ # double-quoted string (r'"', String, '#pop'), (r'\\\\|\\"', String.Escape), include('strings') - ], - 'sqs': [ # single-quoted string + ], + 'sqs': [ # single-quoted string (r"'", String, '#pop'), (r"\\\\|\\'", String.Escape), include('strings') - ], + ], 'name': [ - (r'[a-zA-Z_]\w*', Name), - ], + (r'[a-zA-Z_]\w*', Name), + ], # numbers: excerpt taken from the python lexer 'numbers': [ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), (r'\d+[eE][+-]?[0-9]+', Number.Float), (r'\d+', Number.Integer) ], - } + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/r.py b/contrib/python/Pygments/py3/pygments/lexers/r.py index fa2618944c..44168a7ad5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/r.py +++ b/contrib/python/Pygments/py3/pygments/lexers/r.py @@ -83,7 +83,7 @@ class SLexer(RegexLexer): (r'#.*$', Comment.Single), ], 'valid_name': [ - (valid_name, Name), + (valid_name, Name), ], 'punctuation': [ (r'\[{1,2}|\]{1,2}|\(|\)|;|,', Punctuation), @@ -95,7 +95,7 @@ class SLexer(RegexLexer): ], 'operators': [ (r'<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\?', Operator), - (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator), + (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator), ], 'builtin_symbols': [ (r'(NULL|NA(_(integer|real|complex|character)_)?|' @@ -118,15 +118,15 @@ class SLexer(RegexLexer): (r'\'', String, 'string_squote'), (r'\"', String, 'string_dquote'), include('builtin_symbols'), - include('valid_name'), + include('valid_name'), include('numbers'), include('keywords'), include('punctuation'), include('operators'), ], 'root': [ - # calls: - (r'(%s)\s*(?=\()' % valid_name, Name.Function), + # calls: + (r'(%s)\s*(?=\()' % valid_name, Name.Function), include('statements'), # blocks: (r'\{|\}', Punctuation), @@ -158,7 +158,7 @@ class RdLexer(RegexLexer): This is a very minimal implementation, highlighting little more than the macros. A description of Rd syntax is found in `Writing R Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_ - and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_. + and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_. .. versionadded:: 1.6 """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rdf.py b/contrib/python/Pygments/py3/pygments/lexers/rdf.py index bd00da6b61..bd7a4f690c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rdf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rdf.py @@ -28,8 +28,8 @@ class SparqlLexer(RegexLexer): filenames = ['*.rq', '*.sparql'] mimetypes = ['application/sparql-query'] - # character group definitions :: - + # character group definitions :: + PN_CHARS_BASE_GRP = ('a-zA-Z' '\u00c0-\u00d6' '\u00d8-\u00f6' @@ -42,38 +42,38 @@ class SparqlLexer(RegexLexer): '\u3001-\ud7ff' '\uf900-\ufdcf' '\ufdf0-\ufffd') - - PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_') - - PN_CHARS_GRP = (PN_CHARS_U_GRP + - r'\-' + - r'0-9' + + + PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_') + + PN_CHARS_GRP = (PN_CHARS_U_GRP + + r'\-' + + r'0-9' + '\u00b7' + '\u0300-\u036f' + '\u203f-\u2040') - - HEX_GRP = '0-9A-Fa-f' - - PN_LOCAL_ESC_CHARS_GRP = r' _~.\-!$&"()*+,;=/?#@%' - + + HEX_GRP = '0-9A-Fa-f' + + PN_LOCAL_ESC_CHARS_GRP = r' _~.\-!$&"()*+,;=/?#@%' + # terminal productions :: - PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']' + PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']' - PN_CHARS_U = '[' + PN_CHARS_U_GRP + ']' + PN_CHARS_U = '[' + PN_CHARS_U_GRP + ']' - PN_CHARS = '[' + PN_CHARS_GRP + ']' + PN_CHARS = '[' + PN_CHARS_GRP + ']' - HEX = '[' + HEX_GRP + ']' + HEX = '[' + HEX_GRP + ']' - PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']' + PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']' IRIREF = r'<(?:[^<>"{}|^`\\\x00-\x20])*>' - BLANK_NODE_LABEL = '_:[0-9' + PN_CHARS_U_GRP + '](?:[' + PN_CHARS_GRP + \ - '.]*' + PN_CHARS + ')?' + BLANK_NODE_LABEL = '_:[0-9' + PN_CHARS_U_GRP + '](?:[' + PN_CHARS_GRP + \ + '.]*' + PN_CHARS + ')?' - PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?' + PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?' VARNAME = '[0-9' + PN_CHARS_U_GRP + '][' + PN_CHARS_U_GRP + \ '0-9\u00b7\u0300-\u036f\u203f-\u2040]*' @@ -84,9 +84,9 @@ class SparqlLexer(RegexLexer): PLX = '(?:' + PERCENT + ')|(?:' + PN_LOCAL_ESC + ')' - PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' + - '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' + - PN_CHARS_GRP + ':]|' + PLX + '))?') + PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' + + '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' + + PN_CHARS_GRP + ':]|' + PLX + '))?') EXPONENT = r'[eE][+-]?\d+' @@ -96,7 +96,7 @@ class SparqlLexer(RegexLexer): 'root': [ (r'\s+', Text), # keywords :: - (r'(?i)(select|construct|describe|ask|where|filter|group\s+by|minus|' + (r'(?i)(select|construct|describe|ask|where|filter|group\s+by|minus|' r'distinct|reduced|from\s+named|from|order\s+by|desc|asc|limit|' r'offset|values|bindings|load|into|clear|drop|create|add|move|copy|' r'insert\s+data|delete\s+data|delete\s+where|with|delete|insert|' @@ -110,10 +110,10 @@ class SparqlLexer(RegexLexer): # # variables :: ('[?$]' + VARNAME, Name.Variable), # prefixed names :: - (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + r')?', + (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + r')?', bygroups(Name.Namespace, Punctuation, Name.Tag)), # function names :: - (r'(?i)(str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|' + (r'(?i)(str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|' r'ceil|floor|round|concat|strlen|ucase|lcase|encode_for_uri|' r'contains|strstarts|strends|strbefore|strafter|year|month|day|' r'hours|minutes|seconds|timezone|tz|now|uuid|struuid|md5|sha1|sha256|sha384|' @@ -124,7 +124,7 @@ class SparqlLexer(RegexLexer): # boolean literals :: (r'(true|false)', Keyword.Constant), # double literals :: - (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float), + (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float), # decimal literals :: (r'[+\-]?(\d+\.\d*|\.\d+)', Number.Float), # integer literals :: @@ -307,13 +307,13 @@ class TurtleLexer(RegexLexer): ], } - - # Turtle and Tera Term macro files share the same file extension - # but each has a recognizable and distinct syntax. - def analyse_text(text): - for t in ('@base ', 'BASE ', '@prefix ', 'PREFIX '): - if re.search(r'^\s*%s' % t, text): - return 0.80 + + # Turtle and Tera Term macro files share the same file extension + # but each has a recognizable and distinct syntax. + def analyse_text(text): + for t in ('@base ', 'BASE ', '@prefix ', 'PREFIX '): + if re.search(r'^\s*%s' % t, text): + return 0.80 class ShExCLexer(RegexLexer): diff --git a/contrib/python/Pygments/py3/pygments/lexers/rebol.py b/contrib/python/Pygments/py3/pygments/lexers/rebol.py index 53e53d52b8..57480a1cb9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rebol.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rebol.py @@ -101,12 +101,12 @@ class RebolLexer(RegexLexer): yield match.start(), Generic.Heading, word elif re.match("to-.*", word): yield match.start(), Keyword, word - elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', + elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', word): yield match.start(), Operator, word - elif re.match(r".*\?$", word): + elif re.match(r".*\?$", word): yield match.start(), Keyword, word - elif re.match(r".*\!$", word): + elif re.match(r".*\!$", word): yield match.start(), Keyword.Type, word elif re.match("'.*", word): yield match.start(), Name.Variable.Instance, word # lit-word @@ -238,7 +238,7 @@ class RebolLexer(RegexLexer): if re.match(r'^\s*REBOL\s*\[', text, re.IGNORECASE): # The code starts with REBOL header return 1.0 - elif re.search(r'\s*REBOL\s*\[', text, re.IGNORECASE): + elif re.search(r'\s*REBOL\s*\[', text, re.IGNORECASE): # The code contains REBOL header but also some text before it return 0.5 @@ -296,10 +296,10 @@ class RedLexer(RegexLexer): yield match.start(), Keyword.Namespace, word elif re.match("to-.*", word): yield match.start(), Keyword, word - elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' - r'<<<|>>>|<<|>>|<|>%)$', word): + elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' + r'<<<|>>>|<<|>>|<|>%)$', word): yield match.start(), Operator, word - elif re.match(r".*\!$", word): + elif re.match(r".*\!$", word): yield match.start(), Keyword.Type, word elif re.match("'.*", word): yield match.start(), Name.Variable.Instance, word # lit-word diff --git a/contrib/python/Pygments/py3/pygments/lexers/resource.py b/contrib/python/Pygments/py3/pygments/lexers/resource.py index 77c295a369..3ed176a181 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/resource.py +++ b/contrib/python/Pygments/py3/pygments/lexers/resource.py @@ -80,5 +80,5 @@ class ResourceLexer(RegexLexer): } def analyse_text(text): - if text.startswith('root:table'): - return 1.0 + if text.startswith('root:table'): + return 1.0 diff --git a/contrib/python/Pygments/py3/pygments/lexers/rnc.py b/contrib/python/Pygments/py3/pygments/lexers/rnc.py index a5839ec2de..cc8950a0b7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rnc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rnc.py @@ -1,66 +1,66 @@ -""" - pygments.lexers.rnc - ~~~~~~~~~~~~~~~~~~~ - - Lexer for Relax-NG Compact syntax - +""" + pygments.lexers.rnc + ~~~~~~~~~~~~~~~~~~~ + + Lexer for Relax-NG Compact syntax + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Punctuation - -__all__ = ['RNCCompactLexer'] - - -class RNCCompactLexer(RegexLexer): - """ - For `RelaxNG-compact <http://relaxng.org>`_ syntax. - - .. versionadded:: 2.2 - """ - - name = 'Relax-NG Compact' + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Punctuation + +__all__ = ['RNCCompactLexer'] + + +class RNCCompactLexer(RegexLexer): + """ + For `RelaxNG-compact <http://relaxng.org>`_ syntax. + + .. versionadded:: 2.2 + """ + + name = 'Relax-NG Compact' aliases = ['rng-compact', 'rnc'] - filenames = ['*.rnc'] - - tokens = { - 'root': [ - (r'namespace\b', Keyword.Namespace), - (r'(?:default|datatypes)\b', Keyword.Declaration), - (r'##.*$', Comment.Preproc), - (r'#.*$', Comment.Single), - (r'"[^"]*"', String.Double), - # TODO single quoted strings and escape sequences outside of - # double-quoted strings - (r'(?:element|attribute|mixed)\b', Keyword.Declaration, 'variable'), - (r'(text\b|xsd:[^ ]+)', Keyword.Type, 'maybe_xsdattributes'), - (r'[,?&*=|~]|>>', Operator), - (r'[(){}]', Punctuation), - (r'.', Text), - ], - - # a variable has been declared using `element` or `attribute` - 'variable': [ - (r'[^{]+', Name.Variable), - (r'\{', Punctuation, '#pop'), - ], - - # after an xsd:<datatype> declaration there may be attributes - 'maybe_xsdattributes': [ - (r'\{', Punctuation, 'xsdattributes'), - (r'\}', Punctuation, '#pop'), - (r'.', Text), - ], - - # attributes take the form { key1 = value1 key2 = value2 ... } - 'xsdattributes': [ - (r'[^ =}]', Name.Attribute), - (r'=', Operator), - (r'"[^"]*"', String.Double), - (r'\}', Punctuation, '#pop'), - (r'.', Text), - ], - } + filenames = ['*.rnc'] + + tokens = { + 'root': [ + (r'namespace\b', Keyword.Namespace), + (r'(?:default|datatypes)\b', Keyword.Declaration), + (r'##.*$', Comment.Preproc), + (r'#.*$', Comment.Single), + (r'"[^"]*"', String.Double), + # TODO single quoted strings and escape sequences outside of + # double-quoted strings + (r'(?:element|attribute|mixed)\b', Keyword.Declaration, 'variable'), + (r'(text\b|xsd:[^ ]+)', Keyword.Type, 'maybe_xsdattributes'), + (r'[,?&*=|~]|>>', Operator), + (r'[(){}]', Punctuation), + (r'.', Text), + ], + + # a variable has been declared using `element` or `attribute` + 'variable': [ + (r'[^{]+', Name.Variable), + (r'\{', Punctuation, '#pop'), + ], + + # after an xsd:<datatype> declaration there may be attributes + 'maybe_xsdattributes': [ + (r'\{', Punctuation, 'xsdattributes'), + (r'\}', Punctuation, '#pop'), + (r'.', Text), + ], + + # attributes take the form { key1 = value1 key2 = value2 ... } + 'xsdattributes': [ + (r'[^ =}]', Name.Attribute), + (r'=', Operator), + (r'"[^"]*"', String.Double), + (r'\}', Punctuation, '#pop'), + (r'.', Text), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/robotframework.py b/contrib/python/Pygments/py3/pygments/lexers/robotframework.py index e12560fb73..3c212f5e20 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/robotframework.py +++ b/contrib/python/Pygments/py3/pygments/lexers/robotframework.py @@ -155,7 +155,7 @@ class RowTokenizer: class RowSplitter: _space_splitter = re.compile('( {2,})') - _pipe_splitter = re.compile(r'((?:^| +)\|(?: +|$))') + _pipe_splitter = re.compile(r'((?:^| +)\|(?: +|$))') def split(self, row): splitter = (row.startswith('| ') and self._split_from_pipes diff --git a/contrib/python/Pygments/py3/pygments/lexers/ruby.py b/contrib/python/Pygments/py3/pygments/lexers/ruby.py index 05d492b447..2b2f923eb9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ruby.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ruby.py @@ -46,9 +46,9 @@ class RubyLexer(ExtendedRegexLexer): start = match.start(1) yield start, Operator, match.group(1) # <<[-~]? - yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` - yield match.start(3), String.Delimiter, match.group(3) # heredoc name - yield match.start(4), String.Heredoc, match.group(4) # quote again + yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` + yield match.start(3), String.Delimiter, match.group(3) # heredoc name + yield match.start(4), String.Heredoc, match.group(4) # quote again heredocstack = ctx.__dict__.setdefault('heredocstack', []) outermost = not bool(heredocstack) @@ -75,7 +75,7 @@ class RubyLexer(ExtendedRegexLexer): if check == hdname: for amatch in lines: yield amatch.start(), String.Heredoc, amatch.group() - yield match.start(), String.Delimiter, match.group() + yield match.start(), String.Delimiter, match.group() ctx.pos = match.end() break else: @@ -409,8 +409,8 @@ class RubyConsoleLexer(Lexer): aliases = ['rbcon', 'irb'] mimetypes = ['text/x-ruby-shellsession'] - _prompt_re = re.compile(r'irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] ' - r'|>> |\?> ') + _prompt_re = re.compile(r'irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] ' + r'|>> |\?> ') def get_tokens_unprocessed(self, text): rblexer = RubyLexer(**self.options) @@ -502,11 +502,11 @@ class FancyLexer(RegexLexer): (r'[a-zA-Z](\w|[-+?!=*/^><%])*:', Name.Function), # operators, must be below functions (r'[-+*/~,<>=&!?%^\[\].$]+', Operator), - (r'[A-Z]\w*', Name.Constant), - (r'@[a-zA-Z_]\w*', Name.Variable.Instance), - (r'@@[a-zA-Z_]\w*', Name.Variable.Class), + (r'[A-Z]\w*', Name.Constant), + (r'@[a-zA-Z_]\w*', Name.Variable.Instance), + (r'@@[a-zA-Z_]\w*', Name.Variable.Class), ('@@?', Operator), - (r'[a-zA-Z_]\w*', Name), + (r'[a-zA-Z_]\w*', Name), # numbers - / checks are necessary to avoid mismarking regexes, # see comment in RubyLexer (r'(0[oO]?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?', diff --git a/contrib/python/Pygments/py3/pygments/lexers/rust.py b/contrib/python/Pygments/py3/pygments/lexers/rust.py index 1717a6d632..d01f73e4a4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rust.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rust.py @@ -23,14 +23,14 @@ class RustLexer(RegexLexer): """ name = 'Rust' filenames = ['*.rs', '*.rs.in'] - aliases = ['rust', 'rs'] + aliases = ['rust', 'rs'] mimetypes = ['text/rust', 'text/x-rust'] keyword_types = (words(( 'u8', 'u16', 'u32', 'u64', 'u128', 'i8', 'i16', 'i32', 'i64', 'i128', 'usize', 'isize', 'f32', 'f64', 'char', 'str', 'bool', ), suffix=r'\b'), Keyword.Type) - + builtin_funcs_types = (words(( 'Copy', 'Send', 'Sized', 'Sync', 'Unpin', 'Drop', 'Fn', 'FnMut', 'FnOnce', 'drop', @@ -43,7 +43,7 @@ class RustLexer(RegexLexer): 'Result', 'Ok', 'Err', 'String', 'ToString', 'Vec', ), suffix=r'\b'), Name.Builtin) - + builtin_macros = (words(( 'asm', 'assert', 'assert_eq', 'assert_ne', 'cfg', 'column', 'compile_error', 'concat', 'concat_idents', 'dbg', 'debug_assert', @@ -94,23 +94,23 @@ class RustLexer(RegexLexer): suffix=r'\b'), Keyword.Reserved), (r'(true|false)\b', Keyword.Constant), (r'self\b', Name.Builtin.Pseudo), - (r'mod\b', Keyword, 'modname'), + (r'mod\b', Keyword, 'modname'), (r'let\b', Keyword.Declaration), - (r'fn\b', Keyword, 'funcname'), - (r'(struct|enum|type|union)\b', Keyword, 'typename'), - (r'(default)(\s+)(type|fn)\b', bygroups(Keyword, Text, Keyword)), - keyword_types, + (r'fn\b', Keyword, 'funcname'), + (r'(struct|enum|type|union)\b', Keyword, 'typename'), + (r'(default)(\s+)(type|fn)\b', bygroups(Keyword, Text, Keyword)), + keyword_types, (r'[sS]elf\b', Name.Builtin.Pseudo), # Prelude (taken from Rust's src/libstd/prelude.rs) builtin_funcs_types, builtin_macros, - # Path seperators, so types don't catch them. - (r'::\b', Text), - # Types in positions. - (r'(?::|->)', Text, 'typename'), + # Path seperators, so types don't catch them. + (r'::\b', Text), + # Types in positions. + (r'(?::|->)', Text, 'typename'), # Labels (r'(break|continue)(\b\s*)(\'[A-Za-z_]\w*)?', - bygroups(Keyword, Text.Whitespace, Name.Label)), + bygroups(Keyword, Text.Whitespace, Name.Label)), # Character literals (r"""'(\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0""" @@ -128,8 +128,8 @@ class RustLexer(RegexLexer): (r'0[xX][0-9a-fA-F_]+', Number.Hex, 'number_lit'), # Decimal literals (r'[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|' - r'\.[0-9_]*(?!\.)|[eE][+\-]?[0-9_]+)', Number.Float, - 'number_lit'), + r'\.[0-9_]*(?!\.)|[eE][+\-]?[0-9_]+)', Number.Float, + 'number_lit'), (r'[0-9][0-9_]*', Number.Integer, 'number_lit'), # String literals @@ -170,25 +170,25 @@ class RustLexer(RegexLexer): (r'\*/', String.Doc, '#pop'), (r'[*/]', String.Doc), ], - 'modname': [ - (r'\s+', Text), - (r'[a-zA-Z_]\w*', Name.Namespace, '#pop'), - default('#pop'), - ], - 'funcname': [ - (r'\s+', Text), - (r'[a-zA-Z_]\w*', Name.Function, '#pop'), - default('#pop'), - ], - 'typename': [ - (r'\s+', Text), - (r'&', Keyword.Pseudo), + 'modname': [ + (r'\s+', Text), + (r'[a-zA-Z_]\w*', Name.Namespace, '#pop'), + default('#pop'), + ], + 'funcname': [ + (r'\s+', Text), + (r'[a-zA-Z_]\w*', Name.Function, '#pop'), + default('#pop'), + ], + 'typename': [ + (r'\s+', Text), + (r'&', Keyword.Pseudo), (r"'", Operator, 'lifetime'), builtin_funcs_types, - keyword_types, - (r'[a-zA-Z_]\w*', Name.Class, '#pop'), - default('#pop'), - ], + keyword_types, + (r'[a-zA-Z_]\w*', Name.Class, '#pop'), + default('#pop'), + ], 'lifetime': [ (r"(static|_)", Name.Builtin), (r"[a-zA-Z_]+\w*", Name.Attribute), diff --git a/contrib/python/Pygments/py3/pygments/lexers/sas.py b/contrib/python/Pygments/py3/pygments/lexers/sas.py index 801b335fa2..7d7f9d3689 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sas.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sas.py @@ -1,227 +1,227 @@ -""" - pygments.lexers.sas - ~~~~~~~~~~~~~~~~~~~ - - Lexer for SAS. - +""" + pygments.lexers.sas + ~~~~~~~~~~~~~~~~~~~ + + Lexer for SAS. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re -from pygments.lexer import RegexLexer, include, words -from pygments.token import Comment, Keyword, Name, Number, String, Text, \ - Other, Generic - -__all__ = ['SASLexer'] - - -class SASLexer(RegexLexer): - """ - For `SAS <http://www.sas.com/>`_ files. - - .. versionadded:: 2.2 - """ - # Syntax from syntax/sas.vim by James Kidd <james.kidd@covance.com> - - name = 'SAS' - aliases = ['sas'] - filenames = ['*.SAS', '*.sas'] - mimetypes = ['text/x-sas', 'text/sas', 'application/x-sas'] - flags = re.IGNORECASE | re.MULTILINE - - builtins_macros = ( - "bquote", "nrbquote", "cmpres", "qcmpres", "compstor", "datatyp", - "display", "do", "else", "end", "eval", "global", "goto", "if", - "index", "input", "keydef", "label", "left", "length", "let", - "local", "lowcase", "macro", "mend", "nrquote", - "nrstr", "put", "qleft", "qlowcase", "qscan", - "qsubstr", "qsysfunc", "qtrim", "quote", "qupcase", "scan", - "str", "substr", "superq", "syscall", "sysevalf", "sysexec", - "sysfunc", "sysget", "syslput", "sysprod", "sysrc", "sysrput", - "then", "to", "trim", "unquote", "until", "upcase", "verify", - "while", "window" - ) - - builtins_conditionals = ( - "do", "if", "then", "else", "end", "until", "while" - ) - - builtins_statements = ( - "abort", "array", "attrib", "by", "call", "cards", "cards4", - "catname", "continue", "datalines", "datalines4", "delete", "delim", - "delimiter", "display", "dm", "drop", "endsas", "error", "file", - "filename", "footnote", "format", "goto", "in", "infile", "informat", - "input", "keep", "label", "leave", "length", "libname", "link", - "list", "lostcard", "merge", "missing", "modify", "options", "output", - "out", "page", "put", "redirect", "remove", "rename", "replace", - "retain", "return", "select", "set", "skip", "startsas", "stop", - "title", "update", "waitsas", "where", "window", "x", "systask" - ) - - builtins_sql = ( - "add", "and", "alter", "as", "cascade", "check", "create", - "delete", "describe", "distinct", "drop", "foreign", "from", - "group", "having", "index", "insert", "into", "in", "key", "like", - "message", "modify", "msgtype", "not", "null", "on", "or", - "order", "primary", "references", "reset", "restrict", "select", - "set", "table", "unique", "update", "validate", "view", "where" - ) - - builtins_functions = ( - "abs", "addr", "airy", "arcos", "arsin", "atan", "attrc", - "attrn", "band", "betainv", "blshift", "bnot", "bor", - "brshift", "bxor", "byte", "cdf", "ceil", "cexist", "cinv", - "close", "cnonct", "collate", "compbl", "compound", - "compress", "cos", "cosh", "css", "curobs", "cv", "daccdb", - "daccdbsl", "daccsl", "daccsyd", "dacctab", "dairy", "date", - "datejul", "datepart", "datetime", "day", "dclose", "depdb", - "depdbsl", "depsl", "depsyd", - "deptab", "dequote", "dhms", "dif", "digamma", - "dim", "dinfo", "dnum", "dopen", "doptname", "doptnum", - "dread", "dropnote", "dsname", "erf", "erfc", "exist", "exp", - "fappend", "fclose", "fcol", "fdelete", "fetch", "fetchobs", - "fexist", "fget", "fileexist", "filename", "fileref", - "finfo", "finv", "fipname", "fipnamel", "fipstate", "floor", - "fnonct", "fnote", "fopen", "foptname", "foptnum", "fpoint", - "fpos", "fput", "fread", "frewind", "frlen", "fsep", "fuzz", - "fwrite", "gaminv", "gamma", "getoption", "getvarc", "getvarn", - "hbound", "hms", "hosthelp", "hour", "ibessel", "index", - "indexc", "indexw", "input", "inputc", "inputn", "int", - "intck", "intnx", "intrr", "irr", "jbessel", "juldate", - "kurtosis", "lag", "lbound", "left", "length", "lgamma", - "libname", "libref", "log", "log10", "log2", "logpdf", "logpmf", - "logsdf", "lowcase", "max", "mdy", "mean", "min", "minute", - "mod", "month", "mopen", "mort", "n", "netpv", "nmiss", - "normal", "note", "npv", "open", "ordinal", "pathname", - "pdf", "peek", "peekc", "pmf", "point", "poisson", "poke", - "probbeta", "probbnml", "probchi", "probf", "probgam", - "probhypr", "probit", "probnegb", "probnorm", "probt", - "put", "putc", "putn", "qtr", "quote", "ranbin", "rancau", - "ranexp", "rangam", "range", "rank", "rannor", "ranpoi", - "rantbl", "rantri", "ranuni", "repeat", "resolve", "reverse", - "rewind", "right", "round", "saving", "scan", "sdf", "second", - "sign", "sin", "sinh", "skewness", "soundex", "spedis", - "sqrt", "std", "stderr", "stfips", "stname", "stnamel", - "substr", "sum", "symget", "sysget", "sysmsg", "sysprod", - "sysrc", "system", "tan", "tanh", "time", "timepart", "tinv", - "tnonct", "today", "translate", "tranwrd", "trigamma", - "trim", "trimn", "trunc", "uniform", "upcase", "uss", "var", - "varfmt", "varinfmt", "varlabel", "varlen", "varname", - "varnum", "varray", "varrayx", "vartype", "verify", "vformat", - "vformatd", "vformatdx", "vformatn", "vformatnx", "vformatw", - "vformatwx", "vformatx", "vinarray", "vinarrayx", "vinformat", - "vinformatd", "vinformatdx", "vinformatn", "vinformatnx", - "vinformatw", "vinformatwx", "vinformatx", "vlabel", - "vlabelx", "vlength", "vlengthx", "vname", "vnamex", "vtype", - "vtypex", "weekday", "year", "yyq", "zipfips", "zipname", - "zipnamel", "zipstate" - ) - - tokens = { - 'root': [ - include('comments'), - include('proc-data'), - include('cards-datalines'), - include('logs'), - include('general'), - (r'.', Text), - ], - # SAS is multi-line regardless, but * is ended by ; - 'comments': [ - (r'^\s*\*.*?;', Comment), - (r'/\*.*?\*/', Comment), - (r'^\s*\*(.|\n)*?;', Comment.Multiline), - (r'/[*](.|\n)*?[*]/', Comment.Multiline), - ], - # Special highlight for proc, data, quit, run - 'proc-data': [ - (r'(^|;)\s*(proc \w+|data|run|quit)[\s;]', - Keyword.Reserved), - ], - # Special highlight cards and datalines - 'cards-datalines': [ - (r'^\s*(datalines|cards)\s*;\s*$', Keyword, 'data'), - ], - 'data': [ - (r'(.|\n)*^\s*;\s*$', Other, '#pop'), - ], - # Special highlight for put NOTE|ERROR|WARNING (order matters) - 'logs': [ - (r'\n?^\s*%?put ', Keyword, 'log-messages'), - ], - 'log-messages': [ - (r'NOTE(:|-).*', Generic, '#pop'), - (r'WARNING(:|-).*', Generic.Emph, '#pop'), - (r'ERROR(:|-).*', Generic.Error, '#pop'), - include('general'), - ], - 'general': [ - include('keywords'), - include('vars-strings'), - include('special'), - include('numbers'), - ], - # Keywords, statements, functions, macros - 'keywords': [ - (words(builtins_statements, - prefix = r'\b', - suffix = r'\b'), - Keyword), - (words(builtins_sql, - prefix = r'\b', - suffix = r'\b'), - Keyword), - (words(builtins_conditionals, - prefix = r'\b', - suffix = r'\b'), - Keyword), - (words(builtins_macros, - prefix = r'%', - suffix = r'\b'), - Name.Builtin), - (words(builtins_functions, - prefix = r'\b', - suffix = r'\('), - Name.Builtin), - ], - # Strings and user-defined variables and macros (order matters) - 'vars-strings': [ - (r'&[a-z_]\w{0,31}\.?', Name.Variable), - (r'%[a-z_]\w{0,31}', Name.Function), - (r'\'', String, 'string_squote'), - (r'"', String, 'string_dquote'), - ], - 'string_squote': [ - ('\'', String, '#pop'), - (r'\\\\|\\"|\\\n', String.Escape), - # AFAIK, macro variables are not evaluated in single quotes - # (r'&', Name.Variable, 'validvar'), - (r'[^$\'\\]+', String), - (r'[$\'\\]', String), - ], - 'string_dquote': [ - (r'"', String, '#pop'), - (r'\\\\|\\"|\\\n', String.Escape), - (r'&', Name.Variable, 'validvar'), - (r'[^$&"\\]+', String), - (r'[$"\\]', String), - ], - 'validvar': [ - (r'[a-z_]\w{0,31}\.?', Name.Variable, '#pop'), - ], - # SAS numbers and special variables - 'numbers': [ - (r'\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)(E[+-]?[0-9]+)?i?\b', - Number), - ], - 'special': [ - (r'(null|missing|_all_|_automatic_|_character_|_n_|' - r'_infile_|_name_|_null_|_numeric_|_user_|_webout_)', - Keyword.Constant), - ], - # 'operators': [ - # (r'(-|=|<=|>=|<|>|<>|&|!=|' - # r'\||\*|\+|\^|/|!|~|~=)', Operator) - # ], - } + :license: BSD, see LICENSE for details. +""" + +import re +from pygments.lexer import RegexLexer, include, words +from pygments.token import Comment, Keyword, Name, Number, String, Text, \ + Other, Generic + +__all__ = ['SASLexer'] + + +class SASLexer(RegexLexer): + """ + For `SAS <http://www.sas.com/>`_ files. + + .. versionadded:: 2.2 + """ + # Syntax from syntax/sas.vim by James Kidd <james.kidd@covance.com> + + name = 'SAS' + aliases = ['sas'] + filenames = ['*.SAS', '*.sas'] + mimetypes = ['text/x-sas', 'text/sas', 'application/x-sas'] + flags = re.IGNORECASE | re.MULTILINE + + builtins_macros = ( + "bquote", "nrbquote", "cmpres", "qcmpres", "compstor", "datatyp", + "display", "do", "else", "end", "eval", "global", "goto", "if", + "index", "input", "keydef", "label", "left", "length", "let", + "local", "lowcase", "macro", "mend", "nrquote", + "nrstr", "put", "qleft", "qlowcase", "qscan", + "qsubstr", "qsysfunc", "qtrim", "quote", "qupcase", "scan", + "str", "substr", "superq", "syscall", "sysevalf", "sysexec", + "sysfunc", "sysget", "syslput", "sysprod", "sysrc", "sysrput", + "then", "to", "trim", "unquote", "until", "upcase", "verify", + "while", "window" + ) + + builtins_conditionals = ( + "do", "if", "then", "else", "end", "until", "while" + ) + + builtins_statements = ( + "abort", "array", "attrib", "by", "call", "cards", "cards4", + "catname", "continue", "datalines", "datalines4", "delete", "delim", + "delimiter", "display", "dm", "drop", "endsas", "error", "file", + "filename", "footnote", "format", "goto", "in", "infile", "informat", + "input", "keep", "label", "leave", "length", "libname", "link", + "list", "lostcard", "merge", "missing", "modify", "options", "output", + "out", "page", "put", "redirect", "remove", "rename", "replace", + "retain", "return", "select", "set", "skip", "startsas", "stop", + "title", "update", "waitsas", "where", "window", "x", "systask" + ) + + builtins_sql = ( + "add", "and", "alter", "as", "cascade", "check", "create", + "delete", "describe", "distinct", "drop", "foreign", "from", + "group", "having", "index", "insert", "into", "in", "key", "like", + "message", "modify", "msgtype", "not", "null", "on", "or", + "order", "primary", "references", "reset", "restrict", "select", + "set", "table", "unique", "update", "validate", "view", "where" + ) + + builtins_functions = ( + "abs", "addr", "airy", "arcos", "arsin", "atan", "attrc", + "attrn", "band", "betainv", "blshift", "bnot", "bor", + "brshift", "bxor", "byte", "cdf", "ceil", "cexist", "cinv", + "close", "cnonct", "collate", "compbl", "compound", + "compress", "cos", "cosh", "css", "curobs", "cv", "daccdb", + "daccdbsl", "daccsl", "daccsyd", "dacctab", "dairy", "date", + "datejul", "datepart", "datetime", "day", "dclose", "depdb", + "depdbsl", "depsl", "depsyd", + "deptab", "dequote", "dhms", "dif", "digamma", + "dim", "dinfo", "dnum", "dopen", "doptname", "doptnum", + "dread", "dropnote", "dsname", "erf", "erfc", "exist", "exp", + "fappend", "fclose", "fcol", "fdelete", "fetch", "fetchobs", + "fexist", "fget", "fileexist", "filename", "fileref", + "finfo", "finv", "fipname", "fipnamel", "fipstate", "floor", + "fnonct", "fnote", "fopen", "foptname", "foptnum", "fpoint", + "fpos", "fput", "fread", "frewind", "frlen", "fsep", "fuzz", + "fwrite", "gaminv", "gamma", "getoption", "getvarc", "getvarn", + "hbound", "hms", "hosthelp", "hour", "ibessel", "index", + "indexc", "indexw", "input", "inputc", "inputn", "int", + "intck", "intnx", "intrr", "irr", "jbessel", "juldate", + "kurtosis", "lag", "lbound", "left", "length", "lgamma", + "libname", "libref", "log", "log10", "log2", "logpdf", "logpmf", + "logsdf", "lowcase", "max", "mdy", "mean", "min", "minute", + "mod", "month", "mopen", "mort", "n", "netpv", "nmiss", + "normal", "note", "npv", "open", "ordinal", "pathname", + "pdf", "peek", "peekc", "pmf", "point", "poisson", "poke", + "probbeta", "probbnml", "probchi", "probf", "probgam", + "probhypr", "probit", "probnegb", "probnorm", "probt", + "put", "putc", "putn", "qtr", "quote", "ranbin", "rancau", + "ranexp", "rangam", "range", "rank", "rannor", "ranpoi", + "rantbl", "rantri", "ranuni", "repeat", "resolve", "reverse", + "rewind", "right", "round", "saving", "scan", "sdf", "second", + "sign", "sin", "sinh", "skewness", "soundex", "spedis", + "sqrt", "std", "stderr", "stfips", "stname", "stnamel", + "substr", "sum", "symget", "sysget", "sysmsg", "sysprod", + "sysrc", "system", "tan", "tanh", "time", "timepart", "tinv", + "tnonct", "today", "translate", "tranwrd", "trigamma", + "trim", "trimn", "trunc", "uniform", "upcase", "uss", "var", + "varfmt", "varinfmt", "varlabel", "varlen", "varname", + "varnum", "varray", "varrayx", "vartype", "verify", "vformat", + "vformatd", "vformatdx", "vformatn", "vformatnx", "vformatw", + "vformatwx", "vformatx", "vinarray", "vinarrayx", "vinformat", + "vinformatd", "vinformatdx", "vinformatn", "vinformatnx", + "vinformatw", "vinformatwx", "vinformatx", "vlabel", + "vlabelx", "vlength", "vlengthx", "vname", "vnamex", "vtype", + "vtypex", "weekday", "year", "yyq", "zipfips", "zipname", + "zipnamel", "zipstate" + ) + + tokens = { + 'root': [ + include('comments'), + include('proc-data'), + include('cards-datalines'), + include('logs'), + include('general'), + (r'.', Text), + ], + # SAS is multi-line regardless, but * is ended by ; + 'comments': [ + (r'^\s*\*.*?;', Comment), + (r'/\*.*?\*/', Comment), + (r'^\s*\*(.|\n)*?;', Comment.Multiline), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + ], + # Special highlight for proc, data, quit, run + 'proc-data': [ + (r'(^|;)\s*(proc \w+|data|run|quit)[\s;]', + Keyword.Reserved), + ], + # Special highlight cards and datalines + 'cards-datalines': [ + (r'^\s*(datalines|cards)\s*;\s*$', Keyword, 'data'), + ], + 'data': [ + (r'(.|\n)*^\s*;\s*$', Other, '#pop'), + ], + # Special highlight for put NOTE|ERROR|WARNING (order matters) + 'logs': [ + (r'\n?^\s*%?put ', Keyword, 'log-messages'), + ], + 'log-messages': [ + (r'NOTE(:|-).*', Generic, '#pop'), + (r'WARNING(:|-).*', Generic.Emph, '#pop'), + (r'ERROR(:|-).*', Generic.Error, '#pop'), + include('general'), + ], + 'general': [ + include('keywords'), + include('vars-strings'), + include('special'), + include('numbers'), + ], + # Keywords, statements, functions, macros + 'keywords': [ + (words(builtins_statements, + prefix = r'\b', + suffix = r'\b'), + Keyword), + (words(builtins_sql, + prefix = r'\b', + suffix = r'\b'), + Keyword), + (words(builtins_conditionals, + prefix = r'\b', + suffix = r'\b'), + Keyword), + (words(builtins_macros, + prefix = r'%', + suffix = r'\b'), + Name.Builtin), + (words(builtins_functions, + prefix = r'\b', + suffix = r'\('), + Name.Builtin), + ], + # Strings and user-defined variables and macros (order matters) + 'vars-strings': [ + (r'&[a-z_]\w{0,31}\.?', Name.Variable), + (r'%[a-z_]\w{0,31}', Name.Function), + (r'\'', String, 'string_squote'), + (r'"', String, 'string_dquote'), + ], + 'string_squote': [ + ('\'', String, '#pop'), + (r'\\\\|\\"|\\\n', String.Escape), + # AFAIK, macro variables are not evaluated in single quotes + # (r'&', Name.Variable, 'validvar'), + (r'[^$\'\\]+', String), + (r'[$\'\\]', String), + ], + 'string_dquote': [ + (r'"', String, '#pop'), + (r'\\\\|\\"|\\\n', String.Escape), + (r'&', Name.Variable, 'validvar'), + (r'[^$&"\\]+', String), + (r'[$"\\]', String), + ], + 'validvar': [ + (r'[a-z_]\w{0,31}\.?', Name.Variable, '#pop'), + ], + # SAS numbers and special variables + 'numbers': [ + (r'\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)(E[+-]?[0-9]+)?i?\b', + Number), + ], + 'special': [ + (r'(null|missing|_all_|_automatic_|_character_|_n_|' + r'_infile_|_name_|_null_|_numeric_|_user_|_webout_)', + Keyword.Constant), + ], + # 'operators': [ + # (r'(-|=|<=|>=|<|>|<>|&|!=|' + # r'\||\*|\+|\^|/|!|~|~=)', Operator) + # ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/scripting.py b/contrib/python/Pygments/py3/pygments/lexers/scripting.py index c450c3a8ca..9a1e63d66a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/scripting.py +++ b/contrib/python/Pygments/py3/pygments/lexers/scripting.py @@ -49,27 +49,27 @@ class LuaLexer(RegexLexer): filenames = ['*.lua', '*.wlua'] mimetypes = ['text/x-lua', 'application/x-lua'] - _comment_multiline = r'(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])' - _comment_single = r'(?:--.*$)' - _space = r'(?:\s+)' - _s = r'(?:%s|%s|%s)' % (_comment_multiline, _comment_single, _space) - _name = r'(?:[^\W\d]\w*)' - + _comment_multiline = r'(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])' + _comment_single = r'(?:--.*$)' + _space = r'(?:\s+)' + _s = r'(?:%s|%s|%s)' % (_comment_multiline, _comment_single, _space) + _name = r'(?:[^\W\d]\w*)' + tokens = { 'root': [ - # Lua allows a file to start with a shebang. - (r'#!.*', Comment.Preproc), + # Lua allows a file to start with a shebang. + (r'#!.*', Comment.Preproc), default('base'), ], - 'ws': [ - (_comment_multiline, Comment.Multiline), - (_comment_single, Comment.Single), - (_space, Text), - ], + 'ws': [ + (_comment_multiline, Comment.Multiline), + (_comment_single, Comment.Single), + (_space, Text), + ], 'base': [ - include('ws'), + include('ws'), - (r'(?i)0x[\da-f]*(\.[\da-f]*)?(p[+-]?\d+)?', Number.Hex), + (r'(?i)0x[\da-f]*(\.[\da-f]*)?(p[+-]?\d+)?', Number.Hex), (r'(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?', Number.Float), (r'(?i)\d+e[+-]?\d+', Number.Float), (r'\d+', Number.Integer), @@ -77,19 +77,19 @@ class LuaLexer(RegexLexer): # multiline strings (r'(?s)\[(=*)\[.*?\]\1\]', String), - (r'::', Punctuation, 'label'), - (r'\.{3}', Punctuation), - (r'[=<>|~&+\-*/%#^]+|\.\.', Operator), + (r'::', Punctuation, 'label'), + (r'\.{3}', Punctuation), + (r'[=<>|~&+\-*/%#^]+|\.\.', Operator), (r'[\[\]{}().,:;]', Punctuation), (r'(and|or|not)\b', Operator.Word), ('(break|do|else|elseif|end|for|if|in|repeat|return|then|until|' - r'while)\b', Keyword.Reserved), - (r'goto\b', Keyword.Reserved, 'goto'), + r'while)\b', Keyword.Reserved), + (r'goto\b', Keyword.Reserved, 'goto'), (r'(local)\b', Keyword.Declaration), (r'(true|false|nil)\b', Keyword.Constant), - (r'(function)\b', Keyword.Reserved, 'funcname'), + (r'(function)\b', Keyword.Reserved, 'funcname'), (r'[A-Za-z_]\w*(\.[A-Za-z_]\w*)?', Name), @@ -98,38 +98,38 @@ class LuaLexer(RegexLexer): ], 'funcname': [ - include('ws'), - (r'[.:]', Punctuation), - (r'%s(?=%s*[.:])' % (_name, _s), Name.Class), - (_name, Name.Function, '#pop'), + include('ws'), + (r'[.:]', Punctuation), + (r'%s(?=%s*[.:])' % (_name, _s), Name.Class), + (_name, Name.Function, '#pop'), # inline function - (r'\(', Punctuation, '#pop'), + (r'\(', Punctuation, '#pop'), ], - 'goto': [ - include('ws'), - (_name, Name.Label, '#pop'), + 'goto': [ + include('ws'), + (_name, Name.Label, '#pop'), + ], + + 'label': [ + include('ws'), + (r'::', Punctuation, '#pop'), + (_name, Name.Label), ], - 'label': [ - include('ws'), - (r'::', Punctuation, '#pop'), - (_name, Name.Label), - ], - 'stringescape': [ - (r'\\([abfnrtv\\"\']|[\r\n]{1,2}|z\s*|x[0-9a-fA-F]{2}|\d{1,3}|' - r'u\{[0-9a-fA-F]+\})', String.Escape), + (r'\\([abfnrtv\\"\']|[\r\n]{1,2}|z\s*|x[0-9a-fA-F]{2}|\d{1,3}|' + r'u\{[0-9a-fA-F]+\})', String.Escape), ], 'sqs': [ - (r"'", String.Single, '#pop'), - (r"[^\\']+", String.Single), + (r"'", String.Single, '#pop'), + (r"[^\\']+", String.Single), ], 'dqs': [ - (r'"', String.Double, '#pop'), - (r'[^\\"]+', String.Double), + (r'"', String.Double, '#pop'), + (r'[^\\"]+', String.Double), ] } @@ -694,8 +694,8 @@ class AppleScriptLexer(RegexLexer): (r'[-+]?\d+', Number.Integer), ], 'comment': [ - (r'\(\*', Comment.Multiline, '#push'), - (r'\*\)', Comment.Multiline, '#pop'), + (r'\(\*', Comment.Multiline, '#push'), + (r'\*\)', Comment.Multiline, '#pop'), ('[^*(]+', Comment.Multiline), ('[*(]', Comment.Multiline), ], @@ -1045,11 +1045,11 @@ class EasytrieveLexer(RegexLexer): (r"'(''|[^'])*'", String), (r'\s+', Whitespace), # Everything else just belongs to a name - (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name), + (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name), ], 'after_declaration': [ (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name.Function), - default('#pop'), + default('#pop'), ], 'after_macro_argument': [ (r'\*.*\n', Comment.Single, '#pop'), @@ -1057,7 +1057,7 @@ class EasytrieveLexer(RegexLexer): (_OPERATORS_PATTERN, Operator, '#pop'), (r"'(''|[^'])*'", String, '#pop'), # Everything else just belongs to a name - (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name), + (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name), ], } _COMMENT_LINE_REGEX = re.compile(r'^\s*\*') @@ -1147,8 +1147,8 @@ class EasytrieveLexer(RegexLexer): class JclLexer(RegexLexer): """ - `Job Control Language (JCL) - <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B570/CCONTENTS>`_ + `Job Control Language (JCL) + <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B570/CCONTENTS>`_ is a scripting language used on mainframe platforms to instruct the system on how to run a batch job or start a subsystem. It is somewhat comparable to MS DOS batch and Unix shell scripts. @@ -1171,10 +1171,10 @@ class JclLexer(RegexLexer): ], 'statement': [ (r'\s*\n', Whitespace, '#pop'), - (r'([a-z]\w*)(\s+)(exec|job)(\s*)', + (r'([a-z]\w*)(\s+)(exec|job)(\s*)', bygroups(Name.Label, Whitespace, Keyword.Reserved, Whitespace), 'option'), - (r'[a-z]\w*', Name.Variable, 'statement_command'), + (r'[a-z]\w*', Name.Variable, 'statement_command'), (r'\s+', Whitespace, 'statement_command'), ], 'statement_command': [ @@ -1193,10 +1193,10 @@ class JclLexer(RegexLexer): (r'\*', Name.Builtin), (r'[\[\](){}<>;,]', Punctuation), (r'[-+*/=&%]', Operator), - (r'[a-z_]\w*', Name), - (r'\d+\.\d*', Number.Float), - (r'\.\d+', Number.Float), - (r'\d+', Number.Integer), + (r'[a-z_]\w*', Name), + (r'\d+\.\d*', Number.Float), + (r'\.\d+', Number.Float), + (r'\d+', Number.Integer), (r"'", String, 'option_string'), (r'[ \t]+', Whitespace, 'option_comment'), (r'\.', Punctuation), diff --git a/contrib/python/Pygments/py3/pygments/lexers/sgf.py b/contrib/python/Pygments/py3/pygments/lexers/sgf.py index d6c6cf82b0..35c90ff54f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sgf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sgf.py @@ -1,61 +1,61 @@ -""" - pygments.lexers.sgf - ~~~~~~~~~~~~~~~~~~~ - - Lexer for Smart Game Format (sgf) file format. - +""" + pygments.lexers.sgf + ~~~~~~~~~~~~~~~~~~~ + + Lexer for Smart Game Format (sgf) file format. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, bygroups + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups from pygments.token import Name, Literal, String, Text, Punctuation, Whitespace - -__all__ = ["SmartGameFormatLexer"] - - -class SmartGameFormatLexer(RegexLexer): - """ - Lexer for Smart Game Format (sgf) file format. - - The format is used to store game records of board games for two players - (mainly Go game). - For more information about the definition of the format, see: - https://www.red-bean.com/sgf/ - - .. versionadded:: 2.4 - """ - name = 'SmartGameFormat' - aliases = ['sgf'] - filenames = ['*.sgf'] - - tokens = { - 'root': [ + +__all__ = ["SmartGameFormatLexer"] + + +class SmartGameFormatLexer(RegexLexer): + """ + Lexer for Smart Game Format (sgf) file format. + + The format is used to store game records of board games for two players + (mainly Go game). + For more information about the definition of the format, see: + https://www.red-bean.com/sgf/ + + .. versionadded:: 2.4 + """ + name = 'SmartGameFormat' + aliases = ['sgf'] + filenames = ['*.sgf'] + + tokens = { + 'root': [ (r'[():;]+', Punctuation), - # tokens: - (r'(A[BW]|AE|AN|AP|AR|AS|[BW]L|BM|[BW]R|[BW]S|[BW]T|CA|CH|CP|CR|' - r'DD|DM|DO|DT|EL|EV|EX|FF|FG|G[BW]|GC|GM|GN|HA|HO|ID|IP|IT|IY|KM|' - r'KO|LB|LN|LT|L|MA|MN|M|N|OB|OM|ON|OP|OT|OV|P[BW]|PC|PL|PM|RE|RG|' - r'RO|RU|SO|SC|SE|SI|SL|SO|SQ|ST|SU|SZ|T[BW]|TC|TE|TM|TR|UC|US|VW|' - r'V|[BW]|C)', - Name.Builtin), - # number: - (r'(\[)([0-9.]+)(\])', - bygroups(Punctuation, Literal.Number, Punctuation)), - # date: - (r'(\[)([0-9]{4}-[0-9]{2}-[0-9]{2})(\])', - bygroups(Punctuation, Literal.Date, Punctuation)), - # point: - (r'(\[)([a-z]{2})(\])', - bygroups(Punctuation, String, Punctuation)), - # double points: - (r'(\[)([a-z]{2})(:)([a-z]{2})(\])', - bygroups(Punctuation, String, Punctuation, String, Punctuation)), - - (r'(\[)([\w\s#()+,\-.:?]+)(\])', - bygroups(Punctuation, String, Punctuation)), - (r'(\[)(\s.*)(\])', + # tokens: + (r'(A[BW]|AE|AN|AP|AR|AS|[BW]L|BM|[BW]R|[BW]S|[BW]T|CA|CH|CP|CR|' + r'DD|DM|DO|DT|EL|EV|EX|FF|FG|G[BW]|GC|GM|GN|HA|HO|ID|IP|IT|IY|KM|' + r'KO|LB|LN|LT|L|MA|MN|M|N|OB|OM|ON|OP|OT|OV|P[BW]|PC|PL|PM|RE|RG|' + r'RO|RU|SO|SC|SE|SI|SL|SO|SQ|ST|SU|SZ|T[BW]|TC|TE|TM|TR|UC|US|VW|' + r'V|[BW]|C)', + Name.Builtin), + # number: + (r'(\[)([0-9.]+)(\])', + bygroups(Punctuation, Literal.Number, Punctuation)), + # date: + (r'(\[)([0-9]{4}-[0-9]{2}-[0-9]{2})(\])', + bygroups(Punctuation, Literal.Date, Punctuation)), + # point: + (r'(\[)([a-z]{2})(\])', + bygroups(Punctuation, String, Punctuation)), + # double points: + (r'(\[)([a-z]{2})(:)([a-z]{2})(\])', + bygroups(Punctuation, String, Punctuation, String, Punctuation)), + + (r'(\[)([\w\s#()+,\-.:?]+)(\])', + bygroups(Punctuation, String, Punctuation)), + (r'(\[)(\s.*)(\])', bygroups(Punctuation, Whitespace, Punctuation)), (r'\s+', Whitespace) - ], - } + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/shell.py b/contrib/python/Pygments/py3/pygments/lexers/shell.py index b94ab15a95..fd26a4b3ea 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/shell.py +++ b/contrib/python/Pygments/py3/pygments/lexers/shell.py @@ -18,7 +18,7 @@ from pygments.util import shebang_matches __all__ = ['BashLexer', 'BashSessionLexer', 'TcshLexer', 'BatchLexer', - 'SlurmBashLexer', 'MSDOSSessionLexer', 'PowerShellLexer', + 'SlurmBashLexer', 'MSDOSSessionLexer', 'PowerShellLexer', 'PowerShellSessionLexer', 'TcshSessionLexer', 'FishShellLexer', 'ExeclineLexer'] @@ -27,19 +27,19 @@ line_re = re.compile('.*?\n') class BashLexer(RegexLexer): """ - Lexer for (ba|k|z|)sh shell scripts. + Lexer for (ba|k|z|)sh shell scripts. .. versionadded:: 0.6 """ name = 'Bash' - aliases = ['bash', 'sh', 'ksh', 'zsh', 'shell'] + aliases = ['bash', 'sh', 'ksh', 'zsh', 'shell'] filenames = ['*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', - '*.exheres-0', '*.exlib', '*.zsh', - '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', + '*.exheres-0', '*.exlib', '*.zsh', + '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', '.kshrc', 'kshrc', - 'PKGBUILD'] - mimetypes = ['application/x-sh', 'application/x-shellscript', 'text/x-shellscript'] + 'PKGBUILD'] + mimetypes = ['application/x-sh', 'application/x-shellscript', 'text/x-shellscript'] tokens = { 'root': [ @@ -52,7 +52,7 @@ class BashLexer(RegexLexer): (r'\$\(\(', Keyword, 'math'), (r'\$\(', Keyword, 'paren'), (r'\$\{#?', String.Interpol, 'curly'), - (r'\$[a-zA-Z_]\w*', Name.Variable), # user variable + (r'\$[a-zA-Z_]\w*', Name.Variable), # user variable (r'\$(?:\d+|[#$?!_*@-])', Name.Variable), # builtin (r'\$', Text), ], @@ -70,14 +70,14 @@ class BashLexer(RegexLexer): (r'\A#!.+\n', Comment.Hashbang), (r'#.*\n', Comment.Single), (r'\\[\w\W]', String.Escape), - (r'(\b\w+)(\s*)(\+?=)', bygroups(Name.Variable, Text, Operator)), + (r'(\b\w+)(\s*)(\+?=)', bygroups(Name.Variable, Text, Operator)), (r'[\[\]{}()=]', Operator), (r'<<<', Operator), # here-string (r'<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2', String), (r'&&|\|\|', Operator), ], 'data': [ - (r'(?s)\$?"(\\.|[^"\\$])*"', String.Double), + (r'(?s)\$?"(\\.|[^"\\$])*"', String.Double), (r'"', String.Double, 'string'), (r"(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single), (r"(?s)'.*?'", String.Single), @@ -85,7 +85,7 @@ class BashLexer(RegexLexer): (r'&', Punctuation), (r'\|', Punctuation), (r'\s+', Text), - (r'\d+\b', Number), + (r'\d+\b', Number), (r'[^=\s\[\]{}()$"\'`\\<&|;]+', Text), (r'<', Text), ], @@ -127,28 +127,28 @@ class BashLexer(RegexLexer): return 0.2 -class SlurmBashLexer(BashLexer): - """ - Lexer for (ba|k|z|)sh Slurm scripts. - - .. versionadded:: 2.4 - """ - - name = 'Slurm' - aliases = ['slurm', 'sbatch'] - filenames = ['*.sl'] - mimetypes = [] - EXTRA_KEYWORDS = {'srun'} - - def get_tokens_unprocessed(self, text): - for index, token, value in BashLexer.get_tokens_unprocessed(self, text): - if token is Text and value in self.EXTRA_KEYWORDS: - yield index, Name.Builtin, value - elif token is Comment.Single and 'SBATCH' in value: - yield index, Keyword.Pseudo, value - else: - yield index, token, value - +class SlurmBashLexer(BashLexer): + """ + Lexer for (ba|k|z|)sh Slurm scripts. + + .. versionadded:: 2.4 + """ + + name = 'Slurm' + aliases = ['slurm', 'sbatch'] + filenames = ['*.sl'] + mimetypes = [] + EXTRA_KEYWORDS = {'srun'} + + def get_tokens_unprocessed(self, text): + for index, token, value in BashLexer.get_tokens_unprocessed(self, text): + if token is Text and value in self.EXTRA_KEYWORDS: + yield index, Name.Builtin, value + elif token is Comment.Single and 'SBATCH' in value: + yield index, Keyword.Pseudo, value + else: + yield index, token, value + class ShellSessionBaseLexer(Lexer): """ @@ -165,7 +165,7 @@ class ShellSessionBaseLexer(Lexer): pos = 0 curcode = '' insertions = [] - backslash_continuation = False + backslash_continuation = False for match in line_re.finditer(text): line = match.group() @@ -192,7 +192,7 @@ class ShellSessionBaseLexer(Lexer): insertions.append((len(curcode), [(0, Generic.Prompt, m.group(1))])) curcode += m.group(2) - backslash_continuation = curcode.endswith('\\\n') + backslash_continuation = curcode.endswith('\\\n') elif backslash_continuation: if line.startswith(self._ps2): insertions.append((len(curcode), @@ -200,7 +200,7 @@ class ShellSessionBaseLexer(Lexer): curcode += line[len(self._ps2):] else: curcode += line - backslash_continuation = curcode.endswith('\\\n') + backslash_continuation = curcode.endswith('\\\n') else: if insertions: toks = innerlexer.get_tokens_unprocessed(curcode) @@ -261,7 +261,7 @@ class BatchLexer(RegexLexer): _label_compound = r'(?:(?:[^%s%s+:^)]|\^[%s]?[^)])*)' % (_nlws, _punct, _nl) _number = r'(?:-?(?:0[0-7]+|0x[\da-f]+|\d+)%s)' % _token_terminator _opword = r'(?:equ|geq|gtr|leq|lss|neq)' - _string = r'(?:"[^%s"]*(?:"|(?=[%s])))' % (_nl, _nl) + _string = r'(?:"[^%s"]*(?:"|(?=[%s])))' % (_nl, _nl) _variable = (r'(?:(?:%%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|' r'[^%%:%s]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%%%s^]|' r'\^[^%%%s])[^=%s]*=(?:[^%%%s^]|\^[^%%%s])*)?)?%%))|' @@ -522,13 +522,13 @@ class BatchLexer(RegexLexer): (r'(%s%s)(%s)(%s%s)' % (_number, _space, _opword, _space, _number), bygroups(using(this, state='arithmetic'), Operator.Word, using(this, state='arithmetic')), '#pop'), - (_stoken, using(this, state='text'), ('#pop', 'if2')), - ], - 'if2': [ - (r'(%s?)(==)(%s?%s)' % (_space, _space, _stoken), - bygroups(using(this, state='text'), Operator, - using(this, state='text')), '#pop'), - (r'(%s)(%s)(%s%s)' % (_space, _opword, _space, _stoken), + (_stoken, using(this, state='text'), ('#pop', 'if2')), + ], + 'if2': [ + (r'(%s?)(==)(%s?%s)' % (_space, _space, _stoken), + bygroups(using(this, state='text'), Operator, + using(this, state='text')), '#pop'), + (r'(%s)(%s)(%s%s)' % (_space, _opword, _space, _stoken), bygroups(using(this, state='text'), Operator.Word, using(this, state='text')), '#pop') ], @@ -680,30 +680,30 @@ class PowerShellLexer(RegexLexer): 'wildcard').split() verbs = ( - 'write where watch wait use update unregister unpublish unprotect ' - 'unlock uninstall undo unblock trace test tee take sync switch ' - 'suspend submit stop step start split sort skip show set send select ' - 'search scroll save revoke resume restore restart resolve resize ' - 'reset request repair rename remove register redo receive read push ' - 'publish protect pop ping out optimize open new move mount merge ' - 'measure lock limit join invoke install initialize import hide group ' - 'grant get format foreach find export expand exit enter enable edit ' - 'dismount disconnect disable deny debug cxnew copy convertto ' - 'convertfrom convert connect confirm compress complete compare close ' - 'clear checkpoint block backup assert approve aggregate add').split() - - aliases_ = ( - 'ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn ' - 'compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal ' - 'epcsv epsn erase etsn exsn fc fhx fl foreach ft fw gal gbp gc gci gcm ' - 'gcs gdr ghy gi gjb gl gm gmo gp gps gpv group gsn gsnp gsv gu gv gwmi ' - 'h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ' - 'ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv ' - 'oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo ' - 'rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select ' - 'set shcm si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee ' - 'trcm type wget where wjb write').split() - + 'write where watch wait use update unregister unpublish unprotect ' + 'unlock uninstall undo unblock trace test tee take sync switch ' + 'suspend submit stop step start split sort skip show set send select ' + 'search scroll save revoke resume restore restart resolve resize ' + 'reset request repair rename remove register redo receive read push ' + 'publish protect pop ping out optimize open new move mount merge ' + 'measure lock limit join invoke install initialize import hide group ' + 'grant get format foreach find export expand exit enter enable edit ' + 'dismount disconnect disable deny debug cxnew copy convertto ' + 'convertfrom convert connect confirm compress complete compare close ' + 'clear checkpoint block backup assert approve aggregate add').split() + + aliases_ = ( + 'ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn ' + 'compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal ' + 'epcsv epsn erase etsn exsn fc fhx fl foreach ft fw gal gbp gc gci gcm ' + 'gcs gdr ghy gi gjb gl gm gmo gp gps gpv group gsn gsnp gsv gu gv gwmi ' + 'h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ' + 'ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv ' + 'oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo ' + 'rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select ' + 'set shcm si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee ' + 'trcm type wget where wjb write').split() + commenthelp = ( 'component description example externalhelp forwardhelpcategory ' 'forwardhelptargetname functionality inputs link ' @@ -730,7 +730,7 @@ class PowerShellLexer(RegexLexer): (r'(%s)\b' % '|'.join(keywords), Keyword), (r'-(%s)\b' % '|'.join(operators), Operator), (r'(%s)-[a-z_]\w*\b' % '|'.join(verbs), Name.Builtin), - (r'(%s)\s' % '|'.join(aliases_), Name.Builtin), + (r'(%s)\s' % '|'.join(aliases_), Name.Builtin), (r'\[[a-z_\[][\w. `,\[\]]*\]', Name.Constant), # .net [type]s (r'-[a-z_]\w*', Name), (r'\w+', Name), diff --git a/contrib/python/Pygments/py3/pygments/lexers/slash.py b/contrib/python/Pygments/py3/pygments/lexers/slash.py index baeae27861..df0e23de5f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/slash.py +++ b/contrib/python/Pygments/py3/pygments/lexers/slash.py @@ -1,184 +1,184 @@ -""" - pygments.lexers.slash - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for the `Slash <https://github.com/arturadib/Slash-A>`_ programming - language. - +""" + pygments.lexers.slash + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the `Slash <https://github.com/arturadib/Slash-A>`_ programming + language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import ExtendedRegexLexer, bygroups, DelegatingLexer -from pygments.token import Name, Number, String, Comment, Punctuation, \ - Other, Keyword, Operator, Whitespace - -__all__ = ['SlashLexer'] - - -class SlashLanguageLexer(ExtendedRegexLexer): - _nkw = r'(?=[^a-zA-Z_0-9])' - - def move_state(new_state): - return ("#pop", new_state) - - def right_angle_bracket(lexer, match, ctx): - if len(ctx.stack) > 1 and ctx.stack[-2] == "string": - ctx.stack.pop() + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import ExtendedRegexLexer, bygroups, DelegatingLexer +from pygments.token import Name, Number, String, Comment, Punctuation, \ + Other, Keyword, Operator, Whitespace + +__all__ = ['SlashLexer'] + + +class SlashLanguageLexer(ExtendedRegexLexer): + _nkw = r'(?=[^a-zA-Z_0-9])' + + def move_state(new_state): + return ("#pop", new_state) + + def right_angle_bracket(lexer, match, ctx): + if len(ctx.stack) > 1 and ctx.stack[-2] == "string": + ctx.stack.pop() yield match.start(), String.Interpol, '}' - ctx.pos = match.end() - pass - - tokens = { - "root": [ - (r"<%=", Comment.Preproc, move_state("slash")), - (r"<%!!", Comment.Preproc, move_state("slash")), - (r"<%#.*?%>", Comment.Multiline), - (r"<%", Comment.Preproc, move_state("slash")), - (r".|\n", Other), - ], - "string": [ - (r"\\", String.Escape, move_state("string_e")), - (r"\"", String, move_state("slash")), - (r"#\{", String.Interpol, "slash"), - (r'.|\n', String), - ], - "string_e": [ - (r'n', String.Escape, move_state("string")), - (r't', String.Escape, move_state("string")), - (r'r', String.Escape, move_state("string")), - (r'e', String.Escape, move_state("string")), - (r'x[a-fA-F0-9]{2}', String.Escape, move_state("string")), - (r'.', String.Escape, move_state("string")), - ], - "regexp": [ - (r'}[a-z]*', String.Regex, move_state("slash")), - (r'\\(.|\n)', String.Regex), - (r'{', String.Regex, "regexp_r"), - (r'.|\n', String.Regex), - ], - "regexp_r": [ - (r'}[a-z]*', String.Regex, "#pop"), - (r'\\(.|\n)', String.Regex), - (r'{', String.Regex, "regexp_r"), - ], - "slash": [ - (r"%>", Comment.Preproc, move_state("root")), - (r"\"", String, move_state("string")), - (r"'[a-zA-Z0-9_]+", String), - (r'%r{', String.Regex, move_state("regexp")), - (r'/\*.*?\*/', Comment.Multiline), - (r"(#|//).*?\n", Comment.Single), - (r'-?[0-9]+e[+-]?[0-9]+', Number.Float), - (r'-?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), - (r'-?[0-9]+', Number.Integer), - (r'nil'+_nkw, Name.Builtin), - (r'true'+_nkw, Name.Builtin), - (r'false'+_nkw, Name.Builtin), - (r'self'+_nkw, Name.Builtin), - (r'(class)(\s+)([A-Z][a-zA-Z0-9_\']*)', - bygroups(Keyword, Whitespace, Name.Class)), - (r'class'+_nkw, Keyword), - (r'extends'+_nkw, Keyword), - (r'(def)(\s+)(self)(\s*)(\.)(\s*)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)', - bygroups(Keyword, Whitespace, Name.Builtin, Whitespace, Punctuation, Whitespace, Name.Function)), - (r'(def)(\s+)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)', - bygroups(Keyword, Whitespace, Name.Function)), - (r'def'+_nkw, Keyword), - (r'if'+_nkw, Keyword), - (r'elsif'+_nkw, Keyword), - (r'else'+_nkw, Keyword), - (r'unless'+_nkw, Keyword), - (r'for'+_nkw, Keyword), - (r'in'+_nkw, Keyword), - (r'while'+_nkw, Keyword), - (r'until'+_nkw, Keyword), - (r'and'+_nkw, Keyword), - (r'or'+_nkw, Keyword), - (r'not'+_nkw, Keyword), - (r'lambda'+_nkw, Keyword), - (r'try'+_nkw, Keyword), - (r'catch'+_nkw, Keyword), - (r'return'+_nkw, Keyword), - (r'next'+_nkw, Keyword), - (r'last'+_nkw, Keyword), - (r'throw'+_nkw, Keyword), - (r'use'+_nkw, Keyword), - (r'switch'+_nkw, Keyword), - (r'\\', Keyword), - (r'λ', Keyword), - (r'__FILE__'+_nkw, Name.Builtin.Pseudo), - (r'__LINE__'+_nkw, Name.Builtin.Pseudo), - (r'[A-Z][a-zA-Z0-9_\']*'+_nkw, Name.Constant), - (r'[a-z_][a-zA-Z0-9_\']*'+_nkw, Name), - (r'@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Instance), - (r'@@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Class), - (r'\(', Punctuation), - (r'\)', Punctuation), - (r'\[', Punctuation), - (r'\]', Punctuation), - (r'\{', Punctuation), - (r'\}', right_angle_bracket), - (r';', Punctuation), - (r',', Punctuation), - (r'<<=', Operator), - (r'>>=', Operator), - (r'<<', Operator), - (r'>>', Operator), - (r'==', Operator), - (r'!=', Operator), - (r'=>', Operator), - (r'=', Operator), - (r'<=>', Operator), - (r'<=', Operator), - (r'>=', Operator), - (r'<', Operator), - (r'>', Operator), - (r'\+\+', Operator), - (r'\+=', Operator), - (r'-=', Operator), - (r'\*\*=', Operator), - (r'\*=', Operator), - (r'\*\*', Operator), - (r'\*', Operator), - (r'/=', Operator), - (r'\+', Operator), - (r'-', Operator), - (r'/', Operator), - (r'%=', Operator), - (r'%', Operator), - (r'^=', Operator), - (r'&&=', Operator), - (r'&=', Operator), - (r'&&', Operator), - (r'&', Operator), - (r'\|\|=', Operator), - (r'\|=', Operator), - (r'\|\|', Operator), - (r'\|', Operator), - (r'!', Operator), - (r'\.\.\.', Operator), - (r'\.\.', Operator), - (r'\.', Operator), - (r'::', Operator), - (r':', Operator), - (r'(\s|\n)+', Whitespace), - (r'[a-z_][a-zA-Z0-9_\']*', Name.Variable), - ], - } - - -class SlashLexer(DelegatingLexer): - """ - Lexer for the Slash programming language. - - .. versionadded:: 2.4 - """ - - name = 'Slash' - aliases = ['slash'] + ctx.pos = match.end() + pass + + tokens = { + "root": [ + (r"<%=", Comment.Preproc, move_state("slash")), + (r"<%!!", Comment.Preproc, move_state("slash")), + (r"<%#.*?%>", Comment.Multiline), + (r"<%", Comment.Preproc, move_state("slash")), + (r".|\n", Other), + ], + "string": [ + (r"\\", String.Escape, move_state("string_e")), + (r"\"", String, move_state("slash")), + (r"#\{", String.Interpol, "slash"), + (r'.|\n', String), + ], + "string_e": [ + (r'n', String.Escape, move_state("string")), + (r't', String.Escape, move_state("string")), + (r'r', String.Escape, move_state("string")), + (r'e', String.Escape, move_state("string")), + (r'x[a-fA-F0-9]{2}', String.Escape, move_state("string")), + (r'.', String.Escape, move_state("string")), + ], + "regexp": [ + (r'}[a-z]*', String.Regex, move_state("slash")), + (r'\\(.|\n)', String.Regex), + (r'{', String.Regex, "regexp_r"), + (r'.|\n', String.Regex), + ], + "regexp_r": [ + (r'}[a-z]*', String.Regex, "#pop"), + (r'\\(.|\n)', String.Regex), + (r'{', String.Regex, "regexp_r"), + ], + "slash": [ + (r"%>", Comment.Preproc, move_state("root")), + (r"\"", String, move_state("string")), + (r"'[a-zA-Z0-9_]+", String), + (r'%r{', String.Regex, move_state("regexp")), + (r'/\*.*?\*/', Comment.Multiline), + (r"(#|//).*?\n", Comment.Single), + (r'-?[0-9]+e[+-]?[0-9]+', Number.Float), + (r'-?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), + (r'-?[0-9]+', Number.Integer), + (r'nil'+_nkw, Name.Builtin), + (r'true'+_nkw, Name.Builtin), + (r'false'+_nkw, Name.Builtin), + (r'self'+_nkw, Name.Builtin), + (r'(class)(\s+)([A-Z][a-zA-Z0-9_\']*)', + bygroups(Keyword, Whitespace, Name.Class)), + (r'class'+_nkw, Keyword), + (r'extends'+_nkw, Keyword), + (r'(def)(\s+)(self)(\s*)(\.)(\s*)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)', + bygroups(Keyword, Whitespace, Name.Builtin, Whitespace, Punctuation, Whitespace, Name.Function)), + (r'(def)(\s+)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)', + bygroups(Keyword, Whitespace, Name.Function)), + (r'def'+_nkw, Keyword), + (r'if'+_nkw, Keyword), + (r'elsif'+_nkw, Keyword), + (r'else'+_nkw, Keyword), + (r'unless'+_nkw, Keyword), + (r'for'+_nkw, Keyword), + (r'in'+_nkw, Keyword), + (r'while'+_nkw, Keyword), + (r'until'+_nkw, Keyword), + (r'and'+_nkw, Keyword), + (r'or'+_nkw, Keyword), + (r'not'+_nkw, Keyword), + (r'lambda'+_nkw, Keyword), + (r'try'+_nkw, Keyword), + (r'catch'+_nkw, Keyword), + (r'return'+_nkw, Keyword), + (r'next'+_nkw, Keyword), + (r'last'+_nkw, Keyword), + (r'throw'+_nkw, Keyword), + (r'use'+_nkw, Keyword), + (r'switch'+_nkw, Keyword), + (r'\\', Keyword), + (r'λ', Keyword), + (r'__FILE__'+_nkw, Name.Builtin.Pseudo), + (r'__LINE__'+_nkw, Name.Builtin.Pseudo), + (r'[A-Z][a-zA-Z0-9_\']*'+_nkw, Name.Constant), + (r'[a-z_][a-zA-Z0-9_\']*'+_nkw, Name), + (r'@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Instance), + (r'@@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Class), + (r'\(', Punctuation), + (r'\)', Punctuation), + (r'\[', Punctuation), + (r'\]', Punctuation), + (r'\{', Punctuation), + (r'\}', right_angle_bracket), + (r';', Punctuation), + (r',', Punctuation), + (r'<<=', Operator), + (r'>>=', Operator), + (r'<<', Operator), + (r'>>', Operator), + (r'==', Operator), + (r'!=', Operator), + (r'=>', Operator), + (r'=', Operator), + (r'<=>', Operator), + (r'<=', Operator), + (r'>=', Operator), + (r'<', Operator), + (r'>', Operator), + (r'\+\+', Operator), + (r'\+=', Operator), + (r'-=', Operator), + (r'\*\*=', Operator), + (r'\*=', Operator), + (r'\*\*', Operator), + (r'\*', Operator), + (r'/=', Operator), + (r'\+', Operator), + (r'-', Operator), + (r'/', Operator), + (r'%=', Operator), + (r'%', Operator), + (r'^=', Operator), + (r'&&=', Operator), + (r'&=', Operator), + (r'&&', Operator), + (r'&', Operator), + (r'\|\|=', Operator), + (r'\|=', Operator), + (r'\|\|', Operator), + (r'\|', Operator), + (r'!', Operator), + (r'\.\.\.', Operator), + (r'\.\.', Operator), + (r'\.', Operator), + (r'::', Operator), + (r':', Operator), + (r'(\s|\n)+', Whitespace), + (r'[a-z_][a-zA-Z0-9_\']*', Name.Variable), + ], + } + + +class SlashLexer(DelegatingLexer): + """ + Lexer for the Slash programming language. + + .. versionadded:: 2.4 + """ + + name = 'Slash' + aliases = ['slash'] filenames = ['*.sla'] - - def __init__(self, **options): - from pygments.lexers.web import HtmlLexer + + def __init__(self, **options): + from pygments.lexers.web import HtmlLexer super().__init__(HtmlLexer, SlashLanguageLexer, **options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/smv.py b/contrib/python/Pygments/py3/pygments/lexers/smv.py index 904720d925..a4cbf9455e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smv.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smv.py @@ -1,78 +1,78 @@ -""" - pygments.lexers.smv - ~~~~~~~~~~~~~~~~~~~ - - Lexers for the SMV languages. - +""" + pygments.lexers.smv + ~~~~~~~~~~~~~~~~~~~ + + Lexers for the SMV languages. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, words + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words from pygments.token import Comment, Keyword, Name, Number, Operator, \ Punctuation, Text - -__all__ = ['NuSMVLexer'] - - -class NuSMVLexer(RegexLexer): - """ - Lexer for the NuSMV language. - - .. versionadded:: 2.2 - """ - - name = 'NuSMV' - aliases = ['nusmv'] - filenames = ['*.smv'] - mimetypes = [] - - tokens = { - 'root': [ - # Comments - (r'(?s)\/\-\-.*?\-\-/', Comment), - (r'--.*\n', Comment), - - # Reserved - (words(('MODULE', 'DEFINE', 'MDEFINE', 'CONSTANTS', 'VAR', 'IVAR', - 'FROZENVAR', 'INIT', 'TRANS', 'INVAR', 'SPEC', 'CTLSPEC', - 'LTLSPEC', 'PSLSPEC', 'COMPUTE', 'NAME', 'INVARSPEC', - 'FAIRNESS', 'JUSTICE', 'COMPASSION', 'ISA', 'ASSIGN', - 'CONSTRAINT', 'SIMPWFF', 'CTLWFF', 'LTLWFF', 'PSLWFF', - 'COMPWFF', 'IN', 'MIN', 'MAX', 'MIRROR', 'PRED', - 'PREDICATES'), suffix=r'(?![\w$#-])'), - Keyword.Declaration), - (r'process(?![\w$#-])', Keyword), - (words(('array', 'of', 'boolean', 'integer', 'real', 'word'), - suffix=r'(?![\w$#-])'), Keyword.Type), - (words(('case', 'esac'), suffix=r'(?![\w$#-])'), Keyword), - (words(('word1', 'bool', 'signed', 'unsigned', 'extend', 'resize', - 'sizeof', 'uwconst', 'swconst', 'init', 'self', 'count', - 'abs', 'max', 'min'), suffix=r'(?![\w$#-])'), - Name.Builtin), - (words(('EX', 'AX', 'EF', 'AF', 'EG', 'AG', 'E', 'F', 'O', 'G', - 'H', 'X', 'Y', 'Z', 'A', 'U', 'S', 'V', 'T', 'BU', 'EBF', - 'ABF', 'EBG', 'ABG', 'next', 'mod', 'union', 'in', 'xor', - 'xnor'), suffix=r'(?![\w$#-])'), - Operator.Word), - (words(('TRUE', 'FALSE'), suffix=r'(?![\w$#-])'), Keyword.Constant), - - # Names - (r'[a-zA-Z_][\w$#-]*', Name.Variable), - - # Operators - (r':=', Operator), - (r'[-&|+*/<>!=]', Operator), - - # Literals - (r'\-?\d+\b', Number.Integer), - (r'0[su][bB]\d*_[01_]+', Number.Bin), - (r'0[su][oO]\d*_[0-7_]+', Number.Oct), + +__all__ = ['NuSMVLexer'] + + +class NuSMVLexer(RegexLexer): + """ + Lexer for the NuSMV language. + + .. versionadded:: 2.2 + """ + + name = 'NuSMV' + aliases = ['nusmv'] + filenames = ['*.smv'] + mimetypes = [] + + tokens = { + 'root': [ + # Comments + (r'(?s)\/\-\-.*?\-\-/', Comment), + (r'--.*\n', Comment), + + # Reserved + (words(('MODULE', 'DEFINE', 'MDEFINE', 'CONSTANTS', 'VAR', 'IVAR', + 'FROZENVAR', 'INIT', 'TRANS', 'INVAR', 'SPEC', 'CTLSPEC', + 'LTLSPEC', 'PSLSPEC', 'COMPUTE', 'NAME', 'INVARSPEC', + 'FAIRNESS', 'JUSTICE', 'COMPASSION', 'ISA', 'ASSIGN', + 'CONSTRAINT', 'SIMPWFF', 'CTLWFF', 'LTLWFF', 'PSLWFF', + 'COMPWFF', 'IN', 'MIN', 'MAX', 'MIRROR', 'PRED', + 'PREDICATES'), suffix=r'(?![\w$#-])'), + Keyword.Declaration), + (r'process(?![\w$#-])', Keyword), + (words(('array', 'of', 'boolean', 'integer', 'real', 'word'), + suffix=r'(?![\w$#-])'), Keyword.Type), + (words(('case', 'esac'), suffix=r'(?![\w$#-])'), Keyword), + (words(('word1', 'bool', 'signed', 'unsigned', 'extend', 'resize', + 'sizeof', 'uwconst', 'swconst', 'init', 'self', 'count', + 'abs', 'max', 'min'), suffix=r'(?![\w$#-])'), + Name.Builtin), + (words(('EX', 'AX', 'EF', 'AF', 'EG', 'AG', 'E', 'F', 'O', 'G', + 'H', 'X', 'Y', 'Z', 'A', 'U', 'S', 'V', 'T', 'BU', 'EBF', + 'ABF', 'EBG', 'ABG', 'next', 'mod', 'union', 'in', 'xor', + 'xnor'), suffix=r'(?![\w$#-])'), + Operator.Word), + (words(('TRUE', 'FALSE'), suffix=r'(?![\w$#-])'), Keyword.Constant), + + # Names + (r'[a-zA-Z_][\w$#-]*', Name.Variable), + + # Operators + (r':=', Operator), + (r'[-&|+*/<>!=]', Operator), + + # Literals + (r'\-?\d+\b', Number.Integer), + (r'0[su][bB]\d*_[01_]+', Number.Bin), + (r'0[su][oO]\d*_[0-7_]+', Number.Oct), (r'0[su][dD]\d*_[\d_]+', Number.Decimal), - (r'0[su][hH]\d*_[\da-fA-F_]+', Number.Hex), - - # Whitespace, punctuation and the rest - (r'\s+', Text.Whitespace), - (r'[()\[\]{};?:.,]', Punctuation), - ], - } + (r'0[su][hH]\d*_[\da-fA-F_]+', Number.Hex), + + # Whitespace, punctuation and the rest + (r'\s+', Text.Whitespace), + (r'[()\[\]{};?:.,]', Punctuation), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/special.py b/contrib/python/Pygments/py3/pygments/lexers/special.py index 62906cc304..bff6652c56 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/special.py +++ b/contrib/python/Pygments/py3/pygments/lexers/special.py @@ -27,13 +27,13 @@ class TextLexer(Lexer): aliases = ['text'] filenames = ['*.txt'] mimetypes = ['text/plain'] - priority = 0.01 + priority = 0.01 def get_tokens_unprocessed(self, text): yield 0, Text, text - def analyse_text(text): - return TextLexer.priority + def analyse_text(text): + return TextLexer.priority class OutputLexer(Lexer): diff --git a/contrib/python/Pygments/py3/pygments/lexers/sql.py b/contrib/python/Pygments/py3/pygments/lexers/sql.py index 894a15a533..752f135005 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sql.py @@ -53,33 +53,33 @@ from pygments.lexers._mysql_builtins import \ MYSQL_KEYWORDS, \ MYSQL_OPTIMIZER_HINTS -from pygments.lexers import _tsql_builtins +from pygments.lexers import _tsql_builtins __all__ = ['PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer', - 'SqlLexer', 'TransactSqlLexer', 'MySqlLexer', - 'SqliteConsoleLexer', 'RqlLexer'] + 'SqlLexer', 'TransactSqlLexer', 'MySqlLexer', + 'SqliteConsoleLexer', 'RqlLexer'] line_re = re.compile('.*?\n') sqlite_prompt_re = re.compile(r'^(?:sqlite| ...)>(?= )') language_re = re.compile(r"\s+LANGUAGE\s+'?(\w+)'?", re.IGNORECASE) -do_re = re.compile(r'\bDO\b', re.IGNORECASE) +do_re = re.compile(r'\bDO\b', re.IGNORECASE) + +# Regular expressions for analyse_text() +name_between_bracket_re = re.compile(r'\[[a-zA-Z_]\w*\]') +name_between_backtick_re = re.compile(r'`[a-zA-Z_]\w*`') +tsql_go_re = re.compile(r'\bgo\b', re.IGNORECASE) +tsql_declare_re = re.compile(r'\bdeclare\s+@', re.IGNORECASE) +tsql_variable_re = re.compile(r'@[a-zA-Z_]\w*\b') + -# Regular expressions for analyse_text() -name_between_bracket_re = re.compile(r'\[[a-zA-Z_]\w*\]') -name_between_backtick_re = re.compile(r'`[a-zA-Z_]\w*`') -tsql_go_re = re.compile(r'\bgo\b', re.IGNORECASE) -tsql_declare_re = re.compile(r'\bdeclare\s+@', re.IGNORECASE) -tsql_variable_re = re.compile(r'@[a-zA-Z_]\w*\b') - - def language_callback(lexer, match): """Parse the content of a $-string using a lexer - The lexer is chosen looking for a nearby LANGUAGE or assumed as - plpgsql if inside a DO statement and no LANGUAGE has been found. + The lexer is chosen looking for a nearby LANGUAGE or assumed as + plpgsql if inside a DO statement and no LANGUAGE has been found. """ lx = None m = language_re.match(lexer.text[match.end():match.end()+100]) @@ -90,25 +90,25 @@ def language_callback(lexer, match): lexer.text[max(0, match.start()-100):match.start()])) if m: lx = lexer._get_lexer(m[-1].group(1)) - else: - m = list(do_re.finditer( - lexer.text[max(0, match.start()-25):match.start()])) - if m: + else: + m = list(do_re.finditer( + lexer.text[max(0, match.start()-25):match.start()])) + if m: lx = lexer._get_lexer('plpgsql') - # 1 = $, 2 = delimiter, 3 = $ - yield (match.start(1), String, match.group(1)) - yield (match.start(2), String.Delimiter, match.group(2)) - yield (match.start(3), String, match.group(3)) - # 4 = string contents + # 1 = $, 2 = delimiter, 3 = $ + yield (match.start(1), String, match.group(1)) + yield (match.start(2), String.Delimiter, match.group(2)) + yield (match.start(3), String, match.group(3)) + # 4 = string contents if lx: yield from lx.get_tokens_unprocessed(match.group(4)) else: - yield (match.start(4), String, match.group(4)) - # 5 = $, 6 = delimiter, 7 = $ - yield (match.start(5), String, match.group(5)) - yield (match.start(6), String.Delimiter, match.group(6)) - yield (match.start(7), String, match.group(7)) + yield (match.start(4), String, match.group(4)) + # 5 = $, 6 = delimiter, 7 = $ + yield (match.start(5), String, match.group(5)) + yield (match.start(6), String.Delimiter, match.group(6)) + yield (match.start(7), String, match.group(7)) class PostgresBase: @@ -163,9 +163,9 @@ class PostgresLexer(PostgresBase, RegexLexer): tokens = { 'root': [ (r'\s+', Whitespace), - (r'--.*\n?', Comment.Single), + (r'--.*\n?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), - (r'(' + '|'.join(s.replace(" ", r"\s+") + (r'(' + '|'.join(s.replace(" ", r"\s+") for s in DATATYPES + PSEUDO_TYPES) + r')\b', Name.Builtin), (words(KEYWORDS, suffix=r'\b'), Keyword), @@ -174,10 +174,10 @@ class PostgresLexer(PostgresBase, RegexLexer): (r'\$\d+', Name.Variable), (r'([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?', Number.Float), (r'[0-9]+', Number.Integer), - (r"((?:E|U&)?)(')", bygroups(String.Affix, String.Single), 'string'), - # quoted identifier - (r'((?:U&)?)(")', bygroups(String.Affix, String.Name), 'quoted-ident'), - (r'(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)', language_callback), + (r"((?:E|U&)?)(')", bygroups(String.Affix, String.Single), 'string'), + # quoted identifier + (r'((?:U&)?)(")', bygroups(String.Affix, String.Name), 'quoted-ident'), + (r'(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)', language_callback), (r'[a-z_]\w*', Name), # psql variable in SQL @@ -191,16 +191,16 @@ class PostgresLexer(PostgresBase, RegexLexer): (r'[^/*]+', Comment.Multiline), (r'[/*]', Comment.Multiline) ], - 'string': [ - (r"[^']+", String.Single), - (r"''", String.Single), - (r"'", String.Single, '#pop'), - ], - 'quoted-ident': [ - (r'[^"]+', String.Name), - (r'""', String.Name), - (r'"', String.Name, '#pop'), - ], + 'string': [ + (r"[^']+", String.Single), + (r"''", String.Single), + (r"'", String.Single, '#pop'), + ], + 'quoted-ident': [ + (r'[^"]+', String.Name), + (r'""', String.Name), + (r'"', String.Name, '#pop'), + ], } @@ -319,7 +319,7 @@ class PostgresConsoleLexer(Lexer): # and continue until the end of command is detected curcode = '' insertions = [] - for line in lines: + for line in lines: # Identify a shell prompt in case of psql commandline example if line.startswith('$') and not curcode: lexer = get_lexer_by_name('console', **self.options) @@ -348,7 +348,7 @@ class PostgresConsoleLexer(Lexer): # Emit the output lines out_token = Generic.Output - for line in lines: + for line in lines: mprompt = re_prompt.match(line) if mprompt is not None: # push the line back to have it processed by the prompt @@ -364,8 +364,8 @@ class PostgresConsoleLexer(Lexer): yield (mmsg.start(2), out_token, mmsg.group(2)) else: yield (0, out_token, line) - else: - return + else: + return class SqlLexer(RegexLexer): @@ -383,7 +383,7 @@ class SqlLexer(RegexLexer): tokens = { 'root': [ (r'\s+', Whitespace), - (r'--.*\n?', Comment.Single), + (r'--.*\n?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), (words(( 'ABORT', 'ABS', 'ABSOLUTE', 'ACCESS', 'ADA', 'ADD', 'ADMIN', 'AFTER', @@ -500,90 +500,90 @@ class SqlLexer(RegexLexer): return -class TransactSqlLexer(RegexLexer): - """ - Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to - SQL. - - The list of keywords includes ODBC and keywords reserved for future use.. - """ - - name = 'Transact-SQL' - aliases = ['tsql', 't-sql'] - filenames = ['*.sql'] - mimetypes = ['text/x-tsql'] - - # Use re.UNICODE to allow non ASCII letters in names. - flags = re.IGNORECASE | re.UNICODE - tokens = { - 'root': [ - (r'\s+', Whitespace), +class TransactSqlLexer(RegexLexer): + """ + Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to + SQL. + + The list of keywords includes ODBC and keywords reserved for future use.. + """ + + name = 'Transact-SQL' + aliases = ['tsql', 't-sql'] + filenames = ['*.sql'] + mimetypes = ['text/x-tsql'] + + # Use re.UNICODE to allow non ASCII letters in names. + flags = re.IGNORECASE | re.UNICODE + tokens = { + 'root': [ + (r'\s+', Whitespace), (r'--.*?$\n?', Comment.Single), - (r'/\*', Comment.Multiline, 'multiline-comments'), - (words(_tsql_builtins.OPERATORS), Operator), - (words(_tsql_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word), - (words(_tsql_builtins.TYPES, suffix=r'\b'), Name.Class), - (words(_tsql_builtins.FUNCTIONS, suffix=r'\b'), Name.Function), - (r'(goto)(\s+)(\w+\b)', bygroups(Keyword, Whitespace, Name.Label)), - (words(_tsql_builtins.KEYWORDS, suffix=r'\b'), Keyword), - (r'(\[)([^]]+)(\])', bygroups(Operator, Name, Operator)), - (r'0x[0-9a-f]+', Number.Hex), - # Float variant 1, for example: 1., 1.e2, 1.2e3 - (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float), - # Float variant 2, for example: .1, .1e2 - (r'\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), - # Float variant 3, for example: 123e45 - (r'[0-9]+e[+-]?[0-9]+', Number.Float), - (r'[0-9]+', Number.Integer), - (r"'(''|[^'])*'", String.Single), - (r'"(""|[^"])*"', String.Symbol), - (r'[;(),.]', Punctuation), - # Below we use \w even for the first "real" character because - # tokens starting with a digit have already been recognized - # as Number above. - (r'@@\w+', Name.Builtin), - (r'@\w+', Name.Variable), - (r'(\w+)(:)', bygroups(Name.Label, Punctuation)), - (r'#?#?\w+', Name), # names for temp tables and anything else - (r'\?', Name.Variable.Magic), # parameter for prepared statements - ], - 'multiline-comments': [ - (r'/\*', Comment.Multiline, 'multiline-comments'), - (r'\*/', Comment.Multiline, '#pop'), - (r'[^/*]+', Comment.Multiline), - (r'[/*]', Comment.Multiline) - ] - } - - def analyse_text(text): - rating = 0 - if tsql_declare_re.search(text): - # Found T-SQL variable declaration. - rating = 1.0 - else: - name_between_backtick_count = len( + (r'/\*', Comment.Multiline, 'multiline-comments'), + (words(_tsql_builtins.OPERATORS), Operator), + (words(_tsql_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word), + (words(_tsql_builtins.TYPES, suffix=r'\b'), Name.Class), + (words(_tsql_builtins.FUNCTIONS, suffix=r'\b'), Name.Function), + (r'(goto)(\s+)(\w+\b)', bygroups(Keyword, Whitespace, Name.Label)), + (words(_tsql_builtins.KEYWORDS, suffix=r'\b'), Keyword), + (r'(\[)([^]]+)(\])', bygroups(Operator, Name, Operator)), + (r'0x[0-9a-f]+', Number.Hex), + # Float variant 1, for example: 1., 1.e2, 1.2e3 + (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float), + # Float variant 2, for example: .1, .1e2 + (r'\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), + # Float variant 3, for example: 123e45 + (r'[0-9]+e[+-]?[0-9]+', Number.Float), + (r'[0-9]+', Number.Integer), + (r"'(''|[^'])*'", String.Single), + (r'"(""|[^"])*"', String.Symbol), + (r'[;(),.]', Punctuation), + # Below we use \w even for the first "real" character because + # tokens starting with a digit have already been recognized + # as Number above. + (r'@@\w+', Name.Builtin), + (r'@\w+', Name.Variable), + (r'(\w+)(:)', bygroups(Name.Label, Punctuation)), + (r'#?#?\w+', Name), # names for temp tables and anything else + (r'\?', Name.Variable.Magic), # parameter for prepared statements + ], + 'multiline-comments': [ + (r'/\*', Comment.Multiline, 'multiline-comments'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[^/*]+', Comment.Multiline), + (r'[/*]', Comment.Multiline) + ] + } + + def analyse_text(text): + rating = 0 + if tsql_declare_re.search(text): + # Found T-SQL variable declaration. + rating = 1.0 + else: + name_between_backtick_count = len( name_between_backtick_re.findall(text)) - name_between_bracket_count = len( - name_between_bracket_re.findall(text)) - # We need to check if there are any names using - # backticks or brackets, as otherwise both are 0 - # and 0 >= 2 * 0, so we would always assume it's true - dialect_name_count = name_between_backtick_count + name_between_bracket_count + name_between_bracket_count = len( + name_between_bracket_re.findall(text)) + # We need to check if there are any names using + # backticks or brackets, as otherwise both are 0 + # and 0 >= 2 * 0, so we would always assume it's true + dialect_name_count = name_between_backtick_count + name_between_bracket_count if dialect_name_count >= 1 and \ name_between_bracket_count >= 2 * name_between_backtick_count: - # Found at least twice as many [name] as `name`. - rating += 0.5 - elif name_between_bracket_count > name_between_backtick_count: - rating += 0.2 - elif name_between_bracket_count > 0: - rating += 0.1 - if tsql_variable_re.search(text) is not None: - rating += 0.1 - if tsql_go_re.search(text) is not None: - rating += 0.1 - return rating - - + # Found at least twice as many [name] as `name`. + rating += 0.5 + elif name_between_bracket_count > name_between_backtick_count: + rating += 0.2 + elif name_between_bracket_count > 0: + rating += 0.1 + if tsql_variable_re.search(text) is not None: + rating += 0.1 + if tsql_go_re.search(text) is not None: + rating += 0.1 + return rating + + class MySqlLexer(RegexLexer): """The Oracle MySQL lexer. @@ -748,25 +748,25 @@ class MySqlLexer(RegexLexer): ], } - def analyse_text(text): - rating = 0 - name_between_backtick_count = len( + def analyse_text(text): + rating = 0 + name_between_backtick_count = len( name_between_backtick_re.findall(text)) - name_between_bracket_count = len( - name_between_bracket_re.findall(text)) - # Same logic as above in the TSQL analysis - dialect_name_count = name_between_backtick_count + name_between_bracket_count + name_between_bracket_count = len( + name_between_bracket_re.findall(text)) + # Same logic as above in the TSQL analysis + dialect_name_count = name_between_backtick_count + name_between_bracket_count if dialect_name_count >= 1 and \ name_between_backtick_count >= 2 * name_between_bracket_count: - # Found at least twice as many `name` as [name]. - rating += 0.5 - elif name_between_backtick_count > name_between_bracket_count: - rating += 0.2 - elif name_between_backtick_count > 0: - rating += 0.1 - return rating - - + # Found at least twice as many `name` as [name]. + rating += 0.5 + elif name_between_backtick_count > name_between_bracket_count: + rating += 0.2 + elif name_between_backtick_count > 0: + rating += 0.1 + return rating + + class SqliteConsoleLexer(Lexer): """ Lexer for example sessions using sqlite3. diff --git a/contrib/python/Pygments/py3/pygments/lexers/stata.py b/contrib/python/Pygments/py3/pygments/lexers/stata.py index c0bf3511df..4ec6cf4f75 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/stata.py +++ b/contrib/python/Pygments/py3/pygments/lexers/stata.py @@ -1,170 +1,170 @@ -""" - pygments.lexers.stata - ~~~~~~~~~~~~~~~~~~~~~ - - Lexer for Stata - +""" + pygments.lexers.stata + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Stata + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re + :license: BSD, see LICENSE for details. +""" + +import re from pygments.lexer import RegexLexer, default, include, words -from pygments.token import Comment, Keyword, Name, Number, \ - String, Text, Operator - -from pygments.lexers._stata_builtins import builtins_base, builtins_functions - -__all__ = ['StataLexer'] - - -class StataLexer(RegexLexer): - """ - For `Stata <http://www.stata.com/>`_ do files. - - .. versionadded:: 2.2 - """ - # Syntax based on - # - http://fmwww.bc.edu/RePEc/bocode/s/synlightlist.ado +from pygments.token import Comment, Keyword, Name, Number, \ + String, Text, Operator + +from pygments.lexers._stata_builtins import builtins_base, builtins_functions + +__all__ = ['StataLexer'] + + +class StataLexer(RegexLexer): + """ + For `Stata <http://www.stata.com/>`_ do files. + + .. versionadded:: 2.2 + """ + # Syntax based on + # - http://fmwww.bc.edu/RePEc/bocode/s/synlightlist.ado # - https://github.com/isagalaev/highlight.js/blob/master/src/languages/stata.js # - https://github.com/jpitblado/vim-stata/blob/master/syntax/stata.vim - - name = 'Stata' - aliases = ['stata', 'do'] - filenames = ['*.do', '*.ado'] - mimetypes = ['text/x-stata', 'text/stata', 'application/x-stata'] - flags = re.MULTILINE | re.DOTALL - - tokens = { - 'root': [ - include('comments'), - include('strings'), - include('macros'), - include('numbers'), - include('keywords'), - include('operators'), - include('format'), - (r'.', Text), - ], - # Comments are a complicated beast in Stata because they can be - # nested and there are a few corner cases with that. See: - # - github.com/kylebarron/language-stata/issues/90 - # - statalist.org/forums/forum/general-stata-discussion/general/1448244 - 'comments': [ - (r'(^//|(?<=\s)//)(?!/)', Comment.Single, 'comments-double-slash'), - (r'^\s*\*', Comment.Single, 'comments-star'), - (r'/\*', Comment.Multiline, 'comments-block'), - (r'(^///|(?<=\s)///)', Comment.Special, 'comments-triple-slash') - ], - 'comments-block': [ - (r'/\*', Comment.Multiline, '#push'), - # this ends and restarts a comment block. but need to catch this so - # that it doesn\'t start _another_ level of comment blocks - (r'\*/\*', Comment.Multiline), - (r'(\*/\s+\*(?!/)[^\n]*)|(\*/)', Comment.Multiline, '#pop'), - # Match anything else as a character inside the comment - (r'.', Comment.Multiline), - ], - 'comments-star': [ - (r'///.*?\n', Comment.Single, - ('#pop', 'comments-triple-slash')), - (r'(^//|(?<=\s)//)(?!/)', Comment.Single, - ('#pop', 'comments-double-slash')), - (r'/\*', Comment.Multiline, 'comments-block'), - (r'.(?=\n)', Comment.Single, '#pop'), - (r'.', Comment.Single), - ], - 'comments-triple-slash': [ - (r'\n', Comment.Special, '#pop'), - # A // breaks out of a comment for the rest of the line - (r'//.*?(?=\n)', Comment.Single, '#pop'), - (r'.', Comment.Special), - ], - 'comments-double-slash': [ - (r'\n', Text, '#pop'), - (r'.', Comment.Single), - ], - # `"compound string"' and regular "string"; note the former are - # nested. - 'strings': [ - (r'`"', String, 'string-compound'), - (r'(?<!`)"', String, 'string-regular'), - ], - 'string-compound': [ - (r'`"', String, '#push'), - (r'"\'', String, '#pop'), - (r'\\\\|\\"|\\\$|\\`|\\\n', String.Escape), - include('macros'), - (r'.', String) - ], - 'string-regular': [ - (r'(")(?!\')|(?=\n)', String, '#pop'), - (r'\\\\|\\"|\\\$|\\`|\\\n', String.Escape), - include('macros'), - (r'.', String) - ], - # A local is usually - # `\w{0,31}' - # `:extended macro' - # `=expression' - # `[rsen](results)' - # `(++--)scalar(++--)' - # - # However, there are all sorts of weird rules wrt edge - # cases. Instead of writing 27 exceptions, anything inside - # `' is a local. - # - # A global is more restricted, so we do follow rules. Note only - # locals explicitly enclosed ${} can be nested. - 'macros': [ + + name = 'Stata' + aliases = ['stata', 'do'] + filenames = ['*.do', '*.ado'] + mimetypes = ['text/x-stata', 'text/stata', 'application/x-stata'] + flags = re.MULTILINE | re.DOTALL + + tokens = { + 'root': [ + include('comments'), + include('strings'), + include('macros'), + include('numbers'), + include('keywords'), + include('operators'), + include('format'), + (r'.', Text), + ], + # Comments are a complicated beast in Stata because they can be + # nested and there are a few corner cases with that. See: + # - github.com/kylebarron/language-stata/issues/90 + # - statalist.org/forums/forum/general-stata-discussion/general/1448244 + 'comments': [ + (r'(^//|(?<=\s)//)(?!/)', Comment.Single, 'comments-double-slash'), + (r'^\s*\*', Comment.Single, 'comments-star'), + (r'/\*', Comment.Multiline, 'comments-block'), + (r'(^///|(?<=\s)///)', Comment.Special, 'comments-triple-slash') + ], + 'comments-block': [ + (r'/\*', Comment.Multiline, '#push'), + # this ends and restarts a comment block. but need to catch this so + # that it doesn\'t start _another_ level of comment blocks + (r'\*/\*', Comment.Multiline), + (r'(\*/\s+\*(?!/)[^\n]*)|(\*/)', Comment.Multiline, '#pop'), + # Match anything else as a character inside the comment + (r'.', Comment.Multiline), + ], + 'comments-star': [ + (r'///.*?\n', Comment.Single, + ('#pop', 'comments-triple-slash')), + (r'(^//|(?<=\s)//)(?!/)', Comment.Single, + ('#pop', 'comments-double-slash')), + (r'/\*', Comment.Multiline, 'comments-block'), + (r'.(?=\n)', Comment.Single, '#pop'), + (r'.', Comment.Single), + ], + 'comments-triple-slash': [ + (r'\n', Comment.Special, '#pop'), + # A // breaks out of a comment for the rest of the line + (r'//.*?(?=\n)', Comment.Single, '#pop'), + (r'.', Comment.Special), + ], + 'comments-double-slash': [ + (r'\n', Text, '#pop'), + (r'.', Comment.Single), + ], + # `"compound string"' and regular "string"; note the former are + # nested. + 'strings': [ + (r'`"', String, 'string-compound'), + (r'(?<!`)"', String, 'string-regular'), + ], + 'string-compound': [ + (r'`"', String, '#push'), + (r'"\'', String, '#pop'), + (r'\\\\|\\"|\\\$|\\`|\\\n', String.Escape), + include('macros'), + (r'.', String) + ], + 'string-regular': [ + (r'(")(?!\')|(?=\n)', String, '#pop'), + (r'\\\\|\\"|\\\$|\\`|\\\n', String.Escape), + include('macros'), + (r'.', String) + ], + # A local is usually + # `\w{0,31}' + # `:extended macro' + # `=expression' + # `[rsen](results)' + # `(++--)scalar(++--)' + # + # However, there are all sorts of weird rules wrt edge + # cases. Instead of writing 27 exceptions, anything inside + # `' is a local. + # + # A global is more restricted, so we do follow rules. Note only + # locals explicitly enclosed ${} can be nested. + 'macros': [ (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested'), - (r'\$', Name.Variable.Global, 'macro-global-name'), - (r'`', Name.Variable, 'macro-local'), - ], - 'macro-local': [ - (r'`', Name.Variable, '#push'), - (r"'", Name.Variable, '#pop'), + (r'\$', Name.Variable.Global, 'macro-global-name'), + (r'`', Name.Variable, 'macro-local'), + ], + 'macro-local': [ + (r'`', Name.Variable, '#push'), + (r"'", Name.Variable, '#pop'), (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested'), - (r'\$', Name.Variable.Global, 'macro-global-name'), - (r'.', Name.Variable), # fallback - ], - 'macro-global-nested': [ + (r'\$', Name.Variable.Global, 'macro-global-name'), + (r'.', Name.Variable), # fallback + ], + 'macro-global-nested': [ (r'\$(\{|(?=[$`]))', Name.Variable.Global, '#push'), - (r'\}', Name.Variable.Global, '#pop'), - (r'\$', Name.Variable.Global, 'macro-global-name'), - (r'`', Name.Variable, 'macro-local'), - (r'\w', Name.Variable.Global), # fallback + (r'\}', Name.Variable.Global, '#pop'), + (r'\$', Name.Variable.Global, 'macro-global-name'), + (r'`', Name.Variable, 'macro-local'), + (r'\w', Name.Variable.Global), # fallback default('#pop'), - ], - 'macro-global-name': [ + ], + 'macro-global-name': [ (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested', '#pop'), - (r'\$', Name.Variable.Global, 'macro-global-name', '#pop'), - (r'`', Name.Variable, 'macro-local', '#pop'), - (r'\w{1,32}', Name.Variable.Global, '#pop'), - ], - # Built in functions and statements - 'keywords': [ - (words(builtins_functions, prefix = r'\b', suffix = r'(?=\()'), - Name.Function), - (words(builtins_base, prefix = r'(^\s*|\s)', suffix = r'\b'), - Keyword), - ], - # http://www.stata.com/help.cgi?operators - 'operators': [ - (r'-|==|<=|>=|<|>|&|!=', Operator), - (r'\*|\+|\^|/|!|~|==|~=', Operator) - ], - # Stata numbers - 'numbers': [ - # decimal number - (r'\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[i]?\b', - Number), - ], - # Stata formats - 'format': [ - (r'%-?\d{1,2}(\.\d{1,2})?[gfe]c?', Name.Other), - (r'%(21x|16H|16L|8H|8L)', Name.Other), - (r'%-?(tc|tC|td|tw|tm|tq|th|ty|tg)\S{0,32}', Name.Other), - (r'%[-~]?\d{1,4}s', Name.Other), - ] - } + (r'\$', Name.Variable.Global, 'macro-global-name', '#pop'), + (r'`', Name.Variable, 'macro-local', '#pop'), + (r'\w{1,32}', Name.Variable.Global, '#pop'), + ], + # Built in functions and statements + 'keywords': [ + (words(builtins_functions, prefix = r'\b', suffix = r'(?=\()'), + Name.Function), + (words(builtins_base, prefix = r'(^\s*|\s)', suffix = r'\b'), + Keyword), + ], + # http://www.stata.com/help.cgi?operators + 'operators': [ + (r'-|==|<=|>=|<|>|&|!=', Operator), + (r'\*|\+|\^|/|!|~|==|~=', Operator) + ], + # Stata numbers + 'numbers': [ + # decimal number + (r'\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[i]?\b', + Number), + ], + # Stata formats + 'format': [ + (r'%-?\d{1,2}(\.\d{1,2})?[gfe]c?', Name.Other), + (r'%(21x|16H|16L|8H|8L)', Name.Other), + (r'%-?(tc|tC|td|tw|tm|tq|th|ty|tg)\S{0,32}', Name.Other), + (r'%[-~]?\d{1,4}s', Name.Other), + ] + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/supercollider.py b/contrib/python/Pygments/py3/pygments/lexers/supercollider.py index 03d6db36f6..724674f5e6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/supercollider.py +++ b/contrib/python/Pygments/py3/pygments/lexers/supercollider.py @@ -10,7 +10,7 @@ import re -from pygments.lexer import RegexLexer, include, words, default +from pygments.lexer import RegexLexer, include, words, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation @@ -42,7 +42,7 @@ class SuperColliderLexer(RegexLexer): (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/' r'([gim]+\b|\B)', String.Regex, '#pop'), (r'(?=/)', Text, ('#pop', 'badregex')), - default('#pop'), + default('#pop'), ], 'badregex': [ (r'\n', Text, '#pop') @@ -73,13 +73,13 @@ class SuperColliderLexer(RegexLexer): (words(('true', 'false', 'nil', 'inf'), suffix=r'\b'), Keyword.Constant), (words(( 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Number', - 'Object', 'Packages', 'RegExp', 'String', + 'Object', 'Packages', 'RegExp', 'String', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'super', 'thisFunctionDef', 'thisFunction', 'thisMethod', 'thisProcess', 'thisThread', 'this'), suffix=r'\b'), Name.Builtin), - (r'[$a-zA-Z_]\w*', Name.Other), - (r'\\?[$a-zA-Z_]\w*', String.Symbol), + (r'[$a-zA-Z_]\w*', Name.Other), + (r'\\?[$a-zA-Z_]\w*', String.Symbol), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+', Number.Integer), diff --git a/contrib/python/Pygments/py3/pygments/lexers/templates.py b/contrib/python/Pygments/py3/pygments/lexers/templates.py index 4cbb62b376..548e14afe2 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/templates.py +++ b/contrib/python/Pygments/py3/pygments/lexers/templates.py @@ -43,7 +43,7 @@ __all__ = ['HtmlPhpLexer', 'XmlPhpLexer', 'CssPhpLexer', 'TeaTemplateLexer', 'LassoHtmlLexer', 'LassoXmlLexer', 'LassoCssLexer', 'LassoJavascriptLexer', 'HandlebarsLexer', 'HandlebarsHtmlLexer', 'YamlJinjaLexer', 'LiquidLexer', - 'TwigLexer', 'TwigHtmlLexer', 'Angular2Lexer', 'Angular2HtmlLexer'] + 'TwigLexer', 'TwigHtmlLexer', 'Angular2Lexer', 'Angular2HtmlLexer'] class ErbLexer(Lexer): @@ -186,13 +186,13 @@ class SmartyLexer(RegexLexer): def analyse_text(text): rv = 0.0 - if re.search(r'\{if\s+.*?\}.*?\{/if\}', text): + if re.search(r'\{if\s+.*?\}.*?\{/if\}', text): rv += 0.15 - if re.search(r'\{include\s+file=.*?\}', text): + if re.search(r'\{include\s+file=.*?\}', text): rv += 0.15 - if re.search(r'\{foreach\s+.*?\}.*?\{/foreach\}', text): + if re.search(r'\{foreach\s+.*?\}.*?\{/foreach\}', text): rv += 0.15 - if re.search(r'\{\$.*?\}', text): + if re.search(r'\{\$.*?\}', text): rv += 0.01 return rv @@ -250,7 +250,7 @@ class VelocityLexer(RegexLexer): 'funcparams': [ (r'\$!?\{?', Punctuation, 'variable'), (r'\s+', Text), - (r'[,:]', Punctuation), + (r'[,:]', Punctuation), (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), (r"0[xX][0-9a-fA-F]+[Ll]?", Number), @@ -258,8 +258,8 @@ class VelocityLexer(RegexLexer): (r'(true|false|null)\b', Keyword.Constant), (r'\(', Punctuation, '#push'), (r'\)', Punctuation, '#pop'), - (r'\{', Punctuation, '#push'), - (r'\}', Punctuation, '#pop'), + (r'\{', Punctuation, '#push'), + (r'\}', Punctuation, '#pop'), (r'\[', Punctuation, '#push'), (r'\]', Punctuation, '#pop'), ] @@ -372,7 +372,7 @@ class DjangoLexer(RegexLexer): (r'\.\w+', Name.Variable), (r':?"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r":?'(\\\\|\\[^\\]|[^'\\])*'", String.Single), - (r'([{}()\[\]+\-*/%,:~]|[><=]=?|!=)', Operator), + (r'([{}()\[\]+\-*/%,:~]|[><=]=?|!=)', Operator), (r"[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|" r"0[xX][0-9a-fA-F]+[Ll]?", Number), ], @@ -418,18 +418,18 @@ class MyghtyLexer(RegexLexer): tokens = { 'root': [ (r'\s+', Text), - (r'(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)', + (r'(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)', bygroups(Name.Tag, Text, Name.Function, Name.Tag, using(this), Name.Tag)), - (r'(?s)(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)', + (r'(?s)(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)', bygroups(Name.Tag, Name.Function, Name.Tag, using(PythonLexer), Name.Tag)), (r'(<&[^|])(.*?)(,.*?)?(&>)', bygroups(Name.Tag, Name.Function, using(PythonLexer), Name.Tag)), - (r'(?s)(<&\|)(.*?)(,.*?)?(&>)', + (r'(?s)(<&\|)(.*?)(,.*?)?(&>)', bygroups(Name.Tag, Name.Function, using(PythonLexer), Name.Tag)), (r'</&>', Name.Tag), - (r'(?s)(<%!?)(.*?)(%>)', + (r'(?s)(<%!?)(.*?)(%>)', bygroups(Name.Tag, using(PythonLexer), Name.Tag)), (r'(?<=^)#[^\n]*(\n|\Z)', Comment), (r'(?<=^)(%)([^\n]*)(\n|\Z)', @@ -531,19 +531,19 @@ class MasonLexer(RegexLexer): tokens = { 'root': [ (r'\s+', Text), - (r'(?s)(<%doc>)(.*?)(</%doc>)', + (r'(?s)(<%doc>)(.*?)(</%doc>)', bygroups(Name.Tag, Comment.Multiline, Name.Tag)), - (r'(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)', + (r'(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)', bygroups(Name.Tag, Text, Name.Function, Name.Tag, using(this), Name.Tag)), (r'(?s)(<%(\w+)(.*?)(>))(.*?)(</%\2\s*>)', bygroups(Name.Tag, None, None, None, using(PerlLexer), Name.Tag)), - (r'(?s)(<&[^|])(.*?)(,.*?)?(&>)', + (r'(?s)(<&[^|])(.*?)(,.*?)?(&>)', bygroups(Name.Tag, Name.Function, using(PerlLexer), Name.Tag)), - (r'(?s)(<&\|)(.*?)(,.*?)?(&>)', + (r'(?s)(<&\|)(.*?)(,.*?)?(&>)', bygroups(Name.Tag, Name.Function, using(PerlLexer), Name.Tag)), (r'</&>', Name.Tag), - (r'(?s)(<%!?)(.*?)(%>)', + (r'(?s)(<%!?)(.*?)(%>)', bygroups(Name.Tag, using(PerlLexer), Name.Tag)), (r'(?<=^)#[^\n]*(\n|\Z)', Comment), (r'(?<=^)(%)([^\n]*)(\n|\Z)', @@ -599,7 +599,7 @@ class MakoLexer(RegexLexer): (r'(</%)([\w.:]+)(>)', bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)), (r'<%(?=([\w.:]+))', Comment.Preproc, 'ondeftags'), - (r'(?s)(<%(?:!?))(.*?)(%>)', + (r'(?s)(<%(?:!?))(.*?)(%>)', bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)), (r'(\$\{)(.*?)(\})', bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)), @@ -747,7 +747,7 @@ class CheetahLexer(RegexLexer): # TODO support other Python syntax like $foo['bar'] (r'(\$)([a-zA-Z_][\w.]*\w)', bygroups(Comment.Preproc, using(CheetahPythonLexer))), - (r'(?s)(\$\{!?)(.*?)(\})', + (r'(?s)(\$\{!?)(.*?)(\})', bygroups(Comment.Preproc, using(CheetahPythonLexer), Comment.Preproc)), (r'''(?sx) @@ -862,7 +862,7 @@ class GenshiMarkupLexer(RegexLexer): # yield style and script blocks as Other (r'<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>', Other), (r'<\s*py:[a-zA-Z0-9]+', Name.Tag, 'pytag'), - (r'<\s*[a-zA-Z0-9:.]+', Name.Tag, 'tag'), + (r'<\s*[a-zA-Z0-9:.]+', Name.Tag, 'tag'), include('variable'), (r'[<$]', Other), ], @@ -926,9 +926,9 @@ class HtmlGenshiLexer(DelegatingLexer): def analyse_text(text): rv = 0.0 - if re.search(r'\$\{.*?\}', text) is not None: + if re.search(r'\$\{.*?\}', text) is not None: rv += 0.2 - if re.search(r'py:(.*?)=["\']', text) is not None: + if re.search(r'py:(.*?)=["\']', text) is not None: rv += 0.2 return rv + HtmlLexer.analyse_text(text) - 0.01 @@ -950,9 +950,9 @@ class GenshiLexer(DelegatingLexer): def analyse_text(text): rv = 0.0 - if re.search(r'\$\{.*?\}', text) is not None: + if re.search(r'\$\{.*?\}', text) is not None: rv += 0.2 - if re.search(r'py:(.*?)=["\']', text) is not None: + if re.search(r'py:(.*?)=["\']', text) is not None: rv += 0.2 return rv + XmlLexer.analyse_text(text) - 0.01 @@ -1609,7 +1609,7 @@ class SspLexer(DelegatingLexer): def analyse_text(text): rv = 0.0 - if re.search(r'val \w+\s*:', text): + if re.search(r'val \w+\s*:', text): rv += 0.6 if looks_like_xml(text): rv += 0.2 @@ -1804,34 +1804,34 @@ class HandlebarsLexer(RegexLexer): # {{opt=something}} (r'([^\s}]+)(=)', bygroups(Name.Attribute, Operator)), - # Partials {{> ...}} - (r'(>)(\s*)(@partial-block)', bygroups(Keyword, Text, Keyword)), - (r'(#?>)(\s*)([\w-]+)', bygroups(Keyword, Text, Name.Variable)), - (r'(>)(\s*)(\()', bygroups(Keyword, Text, Punctuation), - 'dynamic-partial'), - - include('generic'), - ], - 'dynamic-partial': [ - (r'\s+', Text), - (r'\)', Punctuation, '#pop'), - - (r'(lookup)(\s+)(\.|this)(\s+)', bygroups(Keyword, Text, - Name.Variable, Text)), - (r'(lookup)(\s+)(\S+)', bygroups(Keyword, Text, - using(this, state='variable'))), - (r'[\w-]+', Name.Function), - - include('generic'), - ], - 'variable': [ + # Partials {{> ...}} + (r'(>)(\s*)(@partial-block)', bygroups(Keyword, Text, Keyword)), + (r'(#?>)(\s*)([\w-]+)', bygroups(Keyword, Text, Name.Variable)), + (r'(>)(\s*)(\()', bygroups(Keyword, Text, Punctuation), + 'dynamic-partial'), + + include('generic'), + ], + 'dynamic-partial': [ + (r'\s+', Text), + (r'\)', Punctuation, '#pop'), + + (r'(lookup)(\s+)(\.|this)(\s+)', bygroups(Keyword, Text, + Name.Variable, Text)), + (r'(lookup)(\s+)(\S+)', bygroups(Keyword, Text, + using(this, state='variable'))), + (r'[\w-]+', Name.Function), + + include('generic'), + ], + 'variable': [ (r'[()/@a-zA-Z][\w-]*', Name.Variable), - (r'\.[\w-]+', Name.Variable), - (r'(this\/|\.\/|(\.\.\/)+)[\w-]+', Name.Variable), - ], - 'generic': [ - include('variable'), - + (r'\.[\w-]+', Name.Variable), + (r'(this\/|\.\/|(\.\.\/)+)[\w-]+', Name.Variable), + ], + 'generic': [ + include('variable'), + # borrowed from DjangoLexer (r':?"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r":?'(\\\\|\\[^\\]|[^'\\])*'", String.Single), @@ -1935,7 +1935,7 @@ class LiquidLexer(RegexLexer): 'output': [ include('whitespace'), - (r'\}\}', Punctuation, '#pop'), # end of output + (r'\}\}', Punctuation, '#pop'), # end of output (r'\|', Punctuation, 'filters') ], @@ -2181,83 +2181,83 @@ class TwigHtmlLexer(DelegatingLexer): def __init__(self, **options): super().__init__(HtmlLexer, TwigLexer, **options) - - -class Angular2Lexer(RegexLexer): - """ - Generic - `angular2 <http://victorsavkin.com/post/119943127151/angular-2-template-syntax>`_ - template lexer. - - Highlights only the Angular template tags (stuff between `{{` and `}}` and - special attributes: '(event)=', '[property]=', '[(twoWayBinding)]='). - Everything else is left for a delegating lexer. - - .. versionadded:: 2.1 - """ - - name = "Angular2" - aliases = ['ng2'] - - tokens = { - 'root': [ - (r'[^{([*#]+', Other), - - # {{meal.name}} - (r'(\{\{)(\s*)', bygroups(Comment.Preproc, Text), 'ngExpression'), - - # (click)="deleteOrder()"; [value]="test"; [(twoWayTest)]="foo.bar" - (r'([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)', - bygroups(Punctuation, Name.Attribute, Punctuation, Text, Operator, Text), - 'attr'), - (r'([([]+)([\w:.-]+)([\])]+)(\s*)', - bygroups(Punctuation, Name.Attribute, Punctuation, Text)), - - # *ngIf="..."; #f="ngForm" - (r'([*#])([\w:.-]+)(\s*)(=)(\s*)', + + +class Angular2Lexer(RegexLexer): + """ + Generic + `angular2 <http://victorsavkin.com/post/119943127151/angular-2-template-syntax>`_ + template lexer. + + Highlights only the Angular template tags (stuff between `{{` and `}}` and + special attributes: '(event)=', '[property]=', '[(twoWayBinding)]='). + Everything else is left for a delegating lexer. + + .. versionadded:: 2.1 + """ + + name = "Angular2" + aliases = ['ng2'] + + tokens = { + 'root': [ + (r'[^{([*#]+', Other), + + # {{meal.name}} + (r'(\{\{)(\s*)', bygroups(Comment.Preproc, Text), 'ngExpression'), + + # (click)="deleteOrder()"; [value]="test"; [(twoWayTest)]="foo.bar" + (r'([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)', + bygroups(Punctuation, Name.Attribute, Punctuation, Text, Operator, Text), + 'attr'), + (r'([([]+)([\w:.-]+)([\])]+)(\s*)', + bygroups(Punctuation, Name.Attribute, Punctuation, Text)), + + # *ngIf="..."; #f="ngForm" + (r'([*#])([\w:.-]+)(\s*)(=)(\s*)', bygroups(Punctuation, Name.Attribute, Text, Operator, Text), 'attr'), - (r'([*#])([\w:.-]+)(\s*)', + (r'([*#])([\w:.-]+)(\s*)', bygroups(Punctuation, Name.Attribute, Text)), - ], - - 'ngExpression': [ - (r'\s+(\|\s+)?', Text), - (r'\}\}', Comment.Preproc, '#pop'), - - # Literals - (r':?(true|false)', String.Boolean), + ], + + 'ngExpression': [ + (r'\s+(\|\s+)?', Text), + (r'\}\}', Comment.Preproc, '#pop'), + + # Literals + (r':?(true|false)', String.Boolean), (r':?"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r":?'(\\\\|\\[^\\]|[^'\\])*'", String.Single), - (r"[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|" - r"0[xX][0-9a-fA-F]+[Ll]?", Number), - - # Variabletext - (r'[a-zA-Z][\w-]*(\(.*\))?', Name.Variable), - (r'\.[\w-]+(\(.*\))?', Name.Variable), - - # inline If - (r'(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)', - bygroups(Operator, Text, String, Text, Operator, Text, String, Text)), - ], - 'attr': [ - ('".*?"', String, '#pop'), - ("'.*?'", String, '#pop'), - (r'[^\s>]+', String, '#pop'), - ], - } - - -class Angular2HtmlLexer(DelegatingLexer): - """ - Subclass of the `Angular2Lexer` that highlights unlexed data with the - `HtmlLexer`. - - .. versionadded:: 2.0 - """ - - name = "HTML + Angular2" - aliases = ["html+ng2"] - filenames = ['*.ng2'] - - def __init__(self, **options): + (r"[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|" + r"0[xX][0-9a-fA-F]+[Ll]?", Number), + + # Variabletext + (r'[a-zA-Z][\w-]*(\(.*\))?', Name.Variable), + (r'\.[\w-]+(\(.*\))?', Name.Variable), + + # inline If + (r'(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)', + bygroups(Operator, Text, String, Text, Operator, Text, String, Text)), + ], + 'attr': [ + ('".*?"', String, '#pop'), + ("'.*?'", String, '#pop'), + (r'[^\s>]+', String, '#pop'), + ], + } + + +class Angular2HtmlLexer(DelegatingLexer): + """ + Subclass of the `Angular2Lexer` that highlights unlexed data with the + `HtmlLexer`. + + .. versionadded:: 2.0 + """ + + name = "HTML + Angular2" + aliases = ["html+ng2"] + filenames = ['*.ng2'] + + def __init__(self, **options): super().__init__(HtmlLexer, Angular2Lexer, **options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/teraterm.py b/contrib/python/Pygments/py3/pygments/lexers/teraterm.py index f8ad0ad7bb..feb552d314 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/teraterm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/teraterm.py @@ -1,61 +1,61 @@ -""" - pygments.lexers.teraterm - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for Tera Term macro files. - +""" + pygments.lexers.teraterm + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Tera Term macro files. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, include, bygroups -from pygments.token import Text, Comment, Operator, Name, String, \ - Number, Keyword - -__all__ = ['TeraTermLexer'] - - -class TeraTermLexer(RegexLexer): - """ - For `Tera Term <https://ttssh2.osdn.jp/>`_ macro source code. - - .. versionadded:: 2.4 - """ - name = 'Tera Term macro' + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups +from pygments.token import Text, Comment, Operator, Name, String, \ + Number, Keyword + +__all__ = ['TeraTermLexer'] + + +class TeraTermLexer(RegexLexer): + """ + For `Tera Term <https://ttssh2.osdn.jp/>`_ macro source code. + + .. versionadded:: 2.4 + """ + name = 'Tera Term macro' aliases = ['teratermmacro', 'teraterm', 'ttl'] - filenames = ['*.ttl'] - mimetypes = ['text/x-teratermmacro'] - - tokens = { - 'root': [ - include('comments'), - include('labels'), - include('commands'), - include('builtin-variables'), - include('user-variables'), - include('operators'), - include('numeric-literals'), - include('string-literals'), - include('all-whitespace'), + filenames = ['*.ttl'] + mimetypes = ['text/x-teratermmacro'] + + tokens = { + 'root': [ + include('comments'), + include('labels'), + include('commands'), + include('builtin-variables'), + include('user-variables'), + include('operators'), + include('numeric-literals'), + include('string-literals'), + include('all-whitespace'), (r'\S', Text), - ], - 'comments': [ - (r';[^\r\n]*', Comment.Single), - (r'/\*', Comment.Multiline, 'in-comment'), - ], - 'in-comment': [ - (r'\*/', Comment.Multiline, '#pop'), - (r'[^*/]+', Comment.Multiline), - (r'[*/]', Comment.Multiline) - ], - 'labels': [ + ], + 'comments': [ + (r';[^\r\n]*', Comment.Single), + (r'/\*', Comment.Multiline, 'in-comment'), + ], + 'in-comment': [ + (r'\*/', Comment.Multiline, '#pop'), + (r'[^*/]+', Comment.Multiline), + (r'[*/]', Comment.Multiline) + ], + 'labels': [ (r'(?i)^(\s*)(:[a-z0-9_]+)', bygroups(Text, Name.Label)), - ], - 'commands': [ - ( - r'(?i)\b(' + ], + 'commands': [ + ( + r'(?i)\b(' r'basename|' r'beep|' r'bplusrecv|' @@ -255,15 +255,15 @@ class TeraTermLexer(RegexLexer): r'ymodemsend|' r'zmodemrecv|' r'zmodemsend' - r')\b', - Keyword, - ), + r')\b', + Keyword, + ), (r'(?i)(call|goto)([ \t]+)([a-z0-9_]+)', bygroups(Keyword, Text, Name.Label)), - ], - 'builtin-variables': [ - ( - r'(?i)(' + ], + 'builtin-variables': [ + ( + r'(?i)(' r'groupmatchstr1|' r'groupmatchstr2|' r'groupmatchstr3|' @@ -289,46 +289,46 @@ class TeraTermLexer(RegexLexer): r'params|' r'result|' r'timeout' - r')\b', - Name.Builtin - ), - ], - 'user-variables': [ + r')\b', + Name.Builtin + ), + ], + 'user-variables': [ (r'(?i)[a-z_][a-z0-9_]*', Name.Variable), - ], - 'numeric-literals': [ - (r'(-?)([0-9]+)', bygroups(Operator, Number.Integer)), - (r'(?i)\$[0-9a-f]+', Number.Hex), - ], - 'string-literals': [ - (r'(?i)#(?:[0-9]+|\$[0-9a-f]+)', String.Char), - (r"'", String.Single, 'in-single-string'), - (r'"', String.Double, 'in-double-string'), - ], - 'in-general-string': [ + ], + 'numeric-literals': [ + (r'(-?)([0-9]+)', bygroups(Operator, Number.Integer)), + (r'(?i)\$[0-9a-f]+', Number.Hex), + ], + 'string-literals': [ + (r'(?i)#(?:[0-9]+|\$[0-9a-f]+)', String.Char), + (r"'", String.Single, 'in-single-string'), + (r'"', String.Double, 'in-double-string'), + ], + 'in-general-string': [ (r'\\[\\nt]', String.Escape), # Only three escapes are supported. - (r'.', String), - ], - 'in-single-string': [ - (r"'", String.Single, '#pop'), - include('in-general-string'), - ], - 'in-double-string': [ - (r'"', String.Double, '#pop'), - include('in-general-string'), - ], - 'operators': [ - (r'and|not|or|xor', Operator.Word), - (r'[!%&*+<=>^~\|\/-]+', Operator), - (r'[()]', String.Symbol), - ], - 'all-whitespace': [ + (r'.', String), + ], + 'in-single-string': [ + (r"'", String.Single, '#pop'), + include('in-general-string'), + ], + 'in-double-string': [ + (r'"', String.Double, '#pop'), + include('in-general-string'), + ], + 'operators': [ + (r'and|not|or|xor', Operator.Word), + (r'[!%&*+<=>^~\|\/-]+', Operator), + (r'[()]', String.Symbol), + ], + 'all-whitespace': [ (r'\s+', Text), - ], - } - - # Turtle and Tera Term macro files share the same file extension - # but each has a recognizable and distinct syntax. - def analyse_text(text): - if re.search(TeraTermLexer.tokens['commands'][0][0], text): + ], + } + + # Turtle and Tera Term macro files share the same file extension + # but each has a recognizable and distinct syntax. + def analyse_text(text): + if re.search(TeraTermLexer.tokens['commands'][0][0], text): return 0.01 diff --git a/contrib/python/Pygments/py3/pygments/lexers/testing.py b/contrib/python/Pygments/py3/pygments/lexers/testing.py index a94e51a9aa..e52f572e88 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/testing.py +++ b/contrib/python/Pygments/py3/pygments/lexers/testing.py @@ -149,7 +149,7 @@ class TAPLexer(RegexLexer): (r'^TAP version \d+\n', Name.Namespace), # Specify a plan with a plan line. - (r'^1\.\.\d+', Keyword.Declaration, 'plan'), + (r'^1\.\.\d+', Keyword.Declaration, 'plan'), # A test failure (r'^(not ok)([^\S\n]*)(\d*)', diff --git a/contrib/python/Pygments/py3/pygments/lexers/text.py b/contrib/python/Pygments/py3/pygments/lexers/text.py index 22d06def9f..68e06594f7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/text.py +++ b/contrib/python/Pygments/py3/pygments/lexers/text.py @@ -17,7 +17,7 @@ from pygments.lexers.markup import BBCodeLexer, MoinWikiLexer, RstLexer, \ from pygments.lexers.installers import DebianControlLexer, SourcesListLexer from pygments.lexers.make import MakefileLexer, BaseMakefileLexer, CMakeLexer from pygments.lexers.haxe import HxmlLexer -from pygments.lexers.sgf import SmartGameFormatLexer +from pygments.lexers.sgf import SmartGameFormatLexer from pygments.lexers.diff import DiffLexer, DarcsPatchLexer from pygments.lexers.data import YamlLexer from pygments.lexers.textfmts import IrcLogsLexer, GettextLexer, HttpLexer diff --git a/contrib/python/Pygments/py3/pygments/lexers/textfmts.py b/contrib/python/Pygments/py3/pygments/lexers/textfmts.py index b8357f6297..62d300a5b5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/textfmts.py +++ b/contrib/python/Pygments/py3/pygments/lexers/textfmts.py @@ -123,11 +123,11 @@ class HttpLexer(RegexLexer): flags = re.DOTALL - def get_tokens_unprocessed(self, text, stack=('root',)): - """Reset the content-type state.""" - self.content_type = None - return RegexLexer.get_tokens_unprocessed(self, text, stack) - + def get_tokens_unprocessed(self, text, stack=('root',)): + """Reset the content-type state.""" + self.content_type = None + return RegexLexer.get_tokens_unprocessed(self, text, stack) + def header_callback(self, match): if match.group(1).lower() == 'content-type': content_type = match.group(5).strip() @@ -267,7 +267,7 @@ class TodotxtLexer(RegexLexer): # 5. Leading project (project_regex, Project, 'incomplete'), # 6. Non-whitespace catch-all - (r'\S+', IncompleteTaskText, 'incomplete'), + (r'\S+', IncompleteTaskText, 'incomplete'), ], # Parse a complete task @@ -278,9 +278,9 @@ class TodotxtLexer(RegexLexer): (context_regex, Context), (project_regex, Project), # Tokenize non-whitespace text - (r'\S+', CompleteTaskText), + (r'\S+', CompleteTaskText), # Tokenize whitespace not containing a newline - (r'\s+', CompleteTaskText), + (r'\s+', CompleteTaskText), ], # Parse an incomplete task @@ -291,9 +291,9 @@ class TodotxtLexer(RegexLexer): (context_regex, Context), (project_regex, Project), # Tokenize non-whitespace text - (r'\S+', IncompleteTaskText), + (r'\S+', IncompleteTaskText), # Tokenize whitespace not containing a newline - (r'\s+', IncompleteTaskText), + (r'\s+', IncompleteTaskText), ], } diff --git a/contrib/python/Pygments/py3/pygments/lexers/typoscript.py b/contrib/python/Pygments/py3/pygments/lexers/typoscript.py index df4e928167..b2e4299beb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/typoscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/typoscript.py @@ -1,218 +1,218 @@ -""" - pygments.lexers.typoscript - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for TypoScript - - `TypoScriptLexer` - A TypoScript lexer. - - `TypoScriptCssDataLexer` - Lexer that highlights markers, constants and registers within css. - - `TypoScriptHtmlDataLexer` - Lexer that highlights markers, constants and registers within html tags. - +""" + pygments.lexers.typoscript + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for TypoScript + + `TypoScriptLexer` + A TypoScript lexer. + + `TypoScriptCssDataLexer` + Lexer that highlights markers, constants and registers within css. + + `TypoScriptHtmlDataLexer` + Lexer that highlights markers, constants and registers within html tags. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, include, bygroups, using -from pygments.token import Text, Comment, Name, String, Number, \ - Operator, Punctuation - -__all__ = ['TypoScriptLexer', 'TypoScriptCssDataLexer', 'TypoScriptHtmlDataLexer'] - - -class TypoScriptCssDataLexer(RegexLexer): - """ - Lexer that highlights markers, constants and registers within css blocks. - - .. versionadded:: 2.2 - """ - - name = 'TypoScriptCssData' - aliases = ['typoscriptcssdata'] - - tokens = { - 'root': [ - # marker: ###MARK### - (r'(.*)(###\w+###)(.*)', bygroups(String, Name.Constant, String)), - # constant: {$some.constant} - (r'(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})', - bygroups(String.Symbol, Operator, Name.Constant, - Name.Constant, String.Symbol)), # constant - # constant: {register:somevalue} - (r'(.*)(\{)([\w\-]+)(\s*:\s*)([\w\-]+)(\})(.*)', - bygroups(String, String.Symbol, Name.Constant, Operator, - Name.Constant, String.Symbol, String)), # constant - # whitespace - (r'\s+', Text), - # comments - (r'/\*(?:(?!\*/).)*\*/', Comment), - (r'(?<!(#|\'|"))(?:#(?!(?:[a-fA-F0-9]{6}|[a-fA-F0-9]{3}))[^\n#]+|//[^\n]*)', - Comment), - # other - (r'[<>,:=.*%+|]', String), - (r'[\w"\-!/&;(){}]+', String), - ] - } - - -class TypoScriptHtmlDataLexer(RegexLexer): - """ - Lexer that highlights markers, constants and registers within html tags. - - .. versionadded:: 2.2 - """ - - name = 'TypoScriptHtmlData' - aliases = ['typoscripthtmldata'] - - tokens = { - 'root': [ - # INCLUDE_TYPOSCRIPT - (r'(INCLUDE_TYPOSCRIPT)', Name.Class), - # Language label or extension resource FILE:... or LLL:... or EXT:... - (r'(EXT|FILE|LLL):[^}\n"]*', String), - # marker: ###MARK### - (r'(.*)(###\w+###)(.*)', bygroups(String, Name.Constant, String)), - # constant: {$some.constant} - (r'(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})', - bygroups(String.Symbol, Operator, Name.Constant, - Name.Constant, String.Symbol)), # constant - # constant: {register:somevalue} - (r'(.*)(\{)([\w\-]+)(\s*:\s*)([\w\-]+)(\})(.*)', - bygroups(String, String.Symbol, Name.Constant, Operator, - Name.Constant, String.Symbol, String)), # constant - # whitespace - (r'\s+', Text), - # other - (r'[<>,:=.*%+|]', String), - (r'[\w"\-!/&;(){}#]+', String), - ] - } - - -class TypoScriptLexer(RegexLexer): - """ - Lexer for TypoScript code. - - http://docs.typo3.org/typo3cms/TyposcriptReference/ - - .. versionadded:: 2.2 - """ - - name = 'TypoScript' - aliases = ['typoscript'] - filenames = ['*.typoscript'] - mimetypes = ['text/x-typoscript'] - - flags = re.DOTALL | re.MULTILINE - - tokens = { - 'root': [ - include('comment'), - include('constant'), - include('html'), - include('label'), - include('whitespace'), - include('keywords'), - include('punctuation'), - include('operator'), - include('structure'), - include('literal'), - include('other'), - ], - 'keywords': [ - # Conditions - (r'(?i)(\[)(browser|compatVersion|dayofmonth|dayofweek|dayofyear|' - r'device|ELSE|END|GLOBAL|globalString|globalVar|hostname|hour|IP|' - r'language|loginUser|loginuser|minute|month|page|PIDinRootline|' - r'PIDupinRootline|system|treeLevel|useragent|userFunc|usergroup|' - r'version)([^\]]*)(\])', - bygroups(String.Symbol, Name.Constant, Text, String.Symbol)), - # Functions - (r'(?=[\w\-])(HTMLparser|HTMLparser_tags|addParams|cache|encapsLines|' - r'filelink|if|imageLinkWrap|imgResource|makelinks|numRows|numberFormat|' - r'parseFunc|replacement|round|select|split|stdWrap|strPad|tableStyle|' - r'tags|textStyle|typolink)(?![\w\-])', Name.Function), - # Toplevel objects and _* - (r'(?:(=?\s*<?\s+|^\s*))(cObj|field|config|content|constants|FEData|' - r'file|frameset|includeLibs|lib|page|plugin|register|resources|sitemap|' - r'sitetitle|styles|temp|tt_[^:.\s]*|types|xmlnews|INCLUDE_TYPOSCRIPT|' - r'_CSS_DEFAULT_STYLE|_DEFAULT_PI_VARS|_LOCAL_LANG)(?![\w\-])', - bygroups(Operator, Name.Builtin)), - # Content objects - (r'(?=[\w\-])(CASE|CLEARGIF|COA|COA_INT|COBJ_ARRAY|COLUMNS|CONTENT|' - r'CTABLE|EDITPANEL|FILE|FILES|FLUIDTEMPLATE|FORM|HMENU|HRULER|HTML|' - r'IMAGE|IMGTEXT|IMG_RESOURCE|LOAD_REGISTER|MEDIA|MULTIMEDIA|OTABLE|' - r'PAGE|QTOBJECT|RECORDS|RESTORE_REGISTER|SEARCHRESULT|SVG|SWFOBJECT|' - r'TEMPLATE|TEXT|USER|USER_INT)(?![\w\-])', Name.Class), - # Menu states - (r'(?=[\w\-])(ACTIFSUBRO|ACTIFSUB|ACTRO|ACT|CURIFSUBRO|CURIFSUB|CURRO|' - r'CUR|IFSUBRO|IFSUB|NO|SPC|USERDEF1RO|USERDEF1|USERDEF2RO|USERDEF2|' - r'USRRO|USR)', Name.Class), - # Menu objects - (r'(?=[\w\-])(GMENU_FOLDOUT|GMENU_LAYERS|GMENU|IMGMENUITEM|IMGMENU|' - r'JSMENUITEM|JSMENU|TMENUITEM|TMENU_LAYERS|TMENU)', Name.Class), - # PHP objects - (r'(?=[\w\-])(PHP_SCRIPT(_EXT|_INT)?)', Name.Class), - (r'(?=[\w\-])(userFunc)(?![\w\-])', Name.Function), - ], - 'whitespace': [ - (r'\s+', Text), - ], - 'html': [ - (r'<\S[^\n>]*>', using(TypoScriptHtmlDataLexer)), - (r'&[^;\n]*;', String), - (r'(?s)(_CSS_DEFAULT_STYLE)(\s*)(\()(.*(?=\n\)))', - bygroups(Name.Class, Text, String.Symbol, using(TypoScriptCssDataLexer))), - ], - 'literal': [ - (r'0x[0-9A-Fa-f]+t?', Number.Hex), - # (r'[0-9]*\.[0-9]+([eE][0-9]+)?[fd]?\s*(?:[^=])', Number.Float), - (r'[0-9]+', Number.Integer), - (r'(###\w+###)', Name.Constant), - ], - 'label': [ - # Language label or extension resource FILE:... or LLL:... or EXT:... - (r'(EXT|FILE|LLL):[^}\n"]*', String), - # Path to a resource - (r'(?![^\w\-])([\w\-]+(?:/[\w\-]+)+/?)(\S*\n)', - bygroups(String, String)), - ], - 'punctuation': [ - (r'[,.]', Punctuation), - ], - 'operator': [ - (r'[<>,:=.*%+|]', Operator), - ], - 'structure': [ - # Brackets and braces - (r'[{}()\[\]\\]', String.Symbol), - ], - 'constant': [ - # Constant: {$some.constant} - (r'(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})', - bygroups(String.Symbol, Operator, Name.Constant, - Name.Constant, String.Symbol)), # constant - # Constant: {register:somevalue} - (r'(\{)([\w\-]+)(\s*:\s*)([\w\-]+)(\})', - bygroups(String.Symbol, Name.Constant, Operator, - Name.Constant, String.Symbol)), # constant - # Hex color: #ff0077 - (r'(#[a-fA-F0-9]{6}\b|#[a-fA-F0-9]{3}\b)', String.Char) - ], - 'comment': [ - (r'(?<!(#|\'|"))(?:#(?!(?:[a-fA-F0-9]{6}|[a-fA-F0-9]{3}))[^\n#]+|//[^\n]*)', - Comment), - (r'/\*(?:(?!\*/).)*\*/', Comment), - (r'(\s*#\s*\n)', Comment), - ], - 'other': [ - (r'[\w"\-!/&;]+', Text), - ], - } + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, using +from pygments.token import Text, Comment, Name, String, Number, \ + Operator, Punctuation + +__all__ = ['TypoScriptLexer', 'TypoScriptCssDataLexer', 'TypoScriptHtmlDataLexer'] + + +class TypoScriptCssDataLexer(RegexLexer): + """ + Lexer that highlights markers, constants and registers within css blocks. + + .. versionadded:: 2.2 + """ + + name = 'TypoScriptCssData' + aliases = ['typoscriptcssdata'] + + tokens = { + 'root': [ + # marker: ###MARK### + (r'(.*)(###\w+###)(.*)', bygroups(String, Name.Constant, String)), + # constant: {$some.constant} + (r'(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})', + bygroups(String.Symbol, Operator, Name.Constant, + Name.Constant, String.Symbol)), # constant + # constant: {register:somevalue} + (r'(.*)(\{)([\w\-]+)(\s*:\s*)([\w\-]+)(\})(.*)', + bygroups(String, String.Symbol, Name.Constant, Operator, + Name.Constant, String.Symbol, String)), # constant + # whitespace + (r'\s+', Text), + # comments + (r'/\*(?:(?!\*/).)*\*/', Comment), + (r'(?<!(#|\'|"))(?:#(?!(?:[a-fA-F0-9]{6}|[a-fA-F0-9]{3}))[^\n#]+|//[^\n]*)', + Comment), + # other + (r'[<>,:=.*%+|]', String), + (r'[\w"\-!/&;(){}]+', String), + ] + } + + +class TypoScriptHtmlDataLexer(RegexLexer): + """ + Lexer that highlights markers, constants and registers within html tags. + + .. versionadded:: 2.2 + """ + + name = 'TypoScriptHtmlData' + aliases = ['typoscripthtmldata'] + + tokens = { + 'root': [ + # INCLUDE_TYPOSCRIPT + (r'(INCLUDE_TYPOSCRIPT)', Name.Class), + # Language label or extension resource FILE:... or LLL:... or EXT:... + (r'(EXT|FILE|LLL):[^}\n"]*', String), + # marker: ###MARK### + (r'(.*)(###\w+###)(.*)', bygroups(String, Name.Constant, String)), + # constant: {$some.constant} + (r'(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})', + bygroups(String.Symbol, Operator, Name.Constant, + Name.Constant, String.Symbol)), # constant + # constant: {register:somevalue} + (r'(.*)(\{)([\w\-]+)(\s*:\s*)([\w\-]+)(\})(.*)', + bygroups(String, String.Symbol, Name.Constant, Operator, + Name.Constant, String.Symbol, String)), # constant + # whitespace + (r'\s+', Text), + # other + (r'[<>,:=.*%+|]', String), + (r'[\w"\-!/&;(){}#]+', String), + ] + } + + +class TypoScriptLexer(RegexLexer): + """ + Lexer for TypoScript code. + + http://docs.typo3.org/typo3cms/TyposcriptReference/ + + .. versionadded:: 2.2 + """ + + name = 'TypoScript' + aliases = ['typoscript'] + filenames = ['*.typoscript'] + mimetypes = ['text/x-typoscript'] + + flags = re.DOTALL | re.MULTILINE + + tokens = { + 'root': [ + include('comment'), + include('constant'), + include('html'), + include('label'), + include('whitespace'), + include('keywords'), + include('punctuation'), + include('operator'), + include('structure'), + include('literal'), + include('other'), + ], + 'keywords': [ + # Conditions + (r'(?i)(\[)(browser|compatVersion|dayofmonth|dayofweek|dayofyear|' + r'device|ELSE|END|GLOBAL|globalString|globalVar|hostname|hour|IP|' + r'language|loginUser|loginuser|minute|month|page|PIDinRootline|' + r'PIDupinRootline|system|treeLevel|useragent|userFunc|usergroup|' + r'version)([^\]]*)(\])', + bygroups(String.Symbol, Name.Constant, Text, String.Symbol)), + # Functions + (r'(?=[\w\-])(HTMLparser|HTMLparser_tags|addParams|cache|encapsLines|' + r'filelink|if|imageLinkWrap|imgResource|makelinks|numRows|numberFormat|' + r'parseFunc|replacement|round|select|split|stdWrap|strPad|tableStyle|' + r'tags|textStyle|typolink)(?![\w\-])', Name.Function), + # Toplevel objects and _* + (r'(?:(=?\s*<?\s+|^\s*))(cObj|field|config|content|constants|FEData|' + r'file|frameset|includeLibs|lib|page|plugin|register|resources|sitemap|' + r'sitetitle|styles|temp|tt_[^:.\s]*|types|xmlnews|INCLUDE_TYPOSCRIPT|' + r'_CSS_DEFAULT_STYLE|_DEFAULT_PI_VARS|_LOCAL_LANG)(?![\w\-])', + bygroups(Operator, Name.Builtin)), + # Content objects + (r'(?=[\w\-])(CASE|CLEARGIF|COA|COA_INT|COBJ_ARRAY|COLUMNS|CONTENT|' + r'CTABLE|EDITPANEL|FILE|FILES|FLUIDTEMPLATE|FORM|HMENU|HRULER|HTML|' + r'IMAGE|IMGTEXT|IMG_RESOURCE|LOAD_REGISTER|MEDIA|MULTIMEDIA|OTABLE|' + r'PAGE|QTOBJECT|RECORDS|RESTORE_REGISTER|SEARCHRESULT|SVG|SWFOBJECT|' + r'TEMPLATE|TEXT|USER|USER_INT)(?![\w\-])', Name.Class), + # Menu states + (r'(?=[\w\-])(ACTIFSUBRO|ACTIFSUB|ACTRO|ACT|CURIFSUBRO|CURIFSUB|CURRO|' + r'CUR|IFSUBRO|IFSUB|NO|SPC|USERDEF1RO|USERDEF1|USERDEF2RO|USERDEF2|' + r'USRRO|USR)', Name.Class), + # Menu objects + (r'(?=[\w\-])(GMENU_FOLDOUT|GMENU_LAYERS|GMENU|IMGMENUITEM|IMGMENU|' + r'JSMENUITEM|JSMENU|TMENUITEM|TMENU_LAYERS|TMENU)', Name.Class), + # PHP objects + (r'(?=[\w\-])(PHP_SCRIPT(_EXT|_INT)?)', Name.Class), + (r'(?=[\w\-])(userFunc)(?![\w\-])', Name.Function), + ], + 'whitespace': [ + (r'\s+', Text), + ], + 'html': [ + (r'<\S[^\n>]*>', using(TypoScriptHtmlDataLexer)), + (r'&[^;\n]*;', String), + (r'(?s)(_CSS_DEFAULT_STYLE)(\s*)(\()(.*(?=\n\)))', + bygroups(Name.Class, Text, String.Symbol, using(TypoScriptCssDataLexer))), + ], + 'literal': [ + (r'0x[0-9A-Fa-f]+t?', Number.Hex), + # (r'[0-9]*\.[0-9]+([eE][0-9]+)?[fd]?\s*(?:[^=])', Number.Float), + (r'[0-9]+', Number.Integer), + (r'(###\w+###)', Name.Constant), + ], + 'label': [ + # Language label or extension resource FILE:... or LLL:... or EXT:... + (r'(EXT|FILE|LLL):[^}\n"]*', String), + # Path to a resource + (r'(?![^\w\-])([\w\-]+(?:/[\w\-]+)+/?)(\S*\n)', + bygroups(String, String)), + ], + 'punctuation': [ + (r'[,.]', Punctuation), + ], + 'operator': [ + (r'[<>,:=.*%+|]', Operator), + ], + 'structure': [ + # Brackets and braces + (r'[{}()\[\]\\]', String.Symbol), + ], + 'constant': [ + # Constant: {$some.constant} + (r'(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})', + bygroups(String.Symbol, Operator, Name.Constant, + Name.Constant, String.Symbol)), # constant + # Constant: {register:somevalue} + (r'(\{)([\w\-]+)(\s*:\s*)([\w\-]+)(\})', + bygroups(String.Symbol, Name.Constant, Operator, + Name.Constant, String.Symbol)), # constant + # Hex color: #ff0077 + (r'(#[a-fA-F0-9]{6}\b|#[a-fA-F0-9]{3}\b)', String.Char) + ], + 'comment': [ + (r'(?<!(#|\'|"))(?:#(?!(?:[a-fA-F0-9]{6}|[a-fA-F0-9]{3}))[^\n#]+|//[^\n]*)', + Comment), + (r'/\*(?:(?!\*/).)*\*/', Comment), + (r'(\s*#\s*\n)', Comment), + ], + 'other': [ + (r'[\w"\-!/&;]+', Text), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/unicon.py b/contrib/python/Pygments/py3/pygments/lexers/unicon.py index 5d5b52de1d..4a76a0f821 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/unicon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/unicon.py @@ -1,389 +1,389 @@ -""" - pygments.lexers.unicon - ~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for the Icon and Unicon languages, including ucode VM. - +""" + pygments.lexers.unicon + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Icon and Unicon languages, including ucode VM. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer, include, bygroups, words, using, this -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation - -__all__ = ['IconLexer', 'UcodeLexer', 'UniconLexer'] - - -class UniconLexer(RegexLexer): - """ - For Unicon source code. - - .. versionadded:: 2.4 - """ - - name = 'Unicon' - aliases = ['unicon'] - filenames = ['*.icn'] - mimetypes = ['text/unicon'] - - flags = re.MULTILINE - - tokens = { - 'root': [ - (r'[^\S\n]+', Text), - (r'#.*?\n', Comment.Single), - (r'[^\S\n]+', Text), - (r'class|method|procedure', Keyword.Declaration, 'subprogram'), - (r'(record)(\s+)(\w+)', - bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'), - (r'(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|' - r'\$ifndef|\$include|\$line|\$undef)\b', Keyword.PreProc), - (r'(&null|&fail)\b', Keyword.Constant), - (r'&allocated|&ascii|&clock|&collections|&column|&col|&control|' - r'&cset|¤t|&dateline|&date|&digits|&dump|' - r'&errno|&errornumber|&errortext|&errorvalue|&error|&errout|' - r'&eventcode|&eventvalue|&eventsource|&e|' - r'&features|&file|&host|&input|&interval|&lcase|&letters|' - r'&level|&line|&ldrag|&lpress|&lrelease|' - r'&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|' - r'&phi|&pick|&pi|&pos|&progname|' - r'&random|&rdrag|®ions|&resize|&row|&rpress|&rrelease|' - r'&shift|&source|&storage|&subject|' - r'&time|&trace|&ucase|&version|' - r'&window|&x|&y', Keyword.Reserved), - (r'(by|of|not|to)\b', Keyword.Reserved), - (r'(global|local|static|abstract)\b', Keyword.Reserved), - (r'package|link|import', Keyword.Declaration), - (words(( - 'break', 'case', 'create', 'critical', 'default', 'end', 'all', - 'do', 'else', 'every', 'fail', 'if', 'import', 'initial', - 'initially', 'invocable', 'next', - 'repeat', 'return', 'suspend', - 'then', 'thread', 'until', 'while'), prefix=r'\b', suffix=r'\b'), - Keyword.Reserved), - (words(( - 'Abort', 'abs', 'acos', 'Active', 'Alert', 'any', 'Any', 'Arb', - 'Arbno', 'args', 'array', 'asin', 'atan', 'atanh', 'Attrib', - 'Bal', 'bal', 'Bg', 'Break', 'Breakx', - 'callout', 'center', 'char', 'chdir', 'chmod', 'chown', 'chroot', - 'classname', 'Clip', 'Clone', 'close', 'cofail', 'collect', - 'Color', 'ColorValue', 'condvar', 'constructor', 'copy', - 'CopyArea', 'cos', 'Couple', 'crypt', 'cset', 'ctime', - 'dbcolumns', 'dbdriver', 'dbkeys', 'dblimits', 'dbproduct', - 'dbtables', 'delay', 'delete', 'detab', 'display', 'DrawArc', - 'DrawCircle', 'DrawCube', 'DrawCurve', 'DrawCylinder', - 'DrawDisk', 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', - 'DrawRectangle', 'DrawSegment', 'DrawSphere', 'DrawString', - 'DrawTorus', 'dtor', - 'entab', 'EraseArea', 'errorclear', 'Event', 'eventmask', - 'EvGet', 'EvSend', 'exec', 'exit', 'exp', 'Eye', - 'Fail', 'fcntl', 'fdup', 'Fence', 'fetch', 'Fg', 'fieldnames', - 'filepair', 'FillArc', 'FillCircle', 'FillPolygon', - 'FillRectangle', 'find', 'flock', 'flush', 'Font', 'fork', - 'FreeColor', 'FreeSpace', 'function', - 'get', 'getch', 'getche', 'getegid', 'getenv', 'geteuid', - 'getgid', 'getgr', 'gethost', 'getpgrp', 'getpid', 'getppid', - 'getpw', 'getrusage', 'getserv', 'GetSpace', 'gettimeofday', - 'getuid', 'globalnames', 'GotoRC', 'GotoXY', 'gtime', 'hardlink', - 'iand', 'icom', 'IdentityMatrix', 'image', 'InPort', 'insert', - 'Int86', 'integer', 'ioctl', 'ior', 'ishift', 'istate', 'ixor', - 'kbhit', 'key', 'keyword', 'kill', - 'left', 'Len', 'list', 'load', 'loadfunc', 'localnames', - 'lock', 'log', 'Lower', 'lstat', - 'many', 'map', 'match', 'MatrixMode', 'max', 'member', - 'membernames', 'methodnames', 'methods', 'min', 'mkdir', 'move', - 'MultMatrix', 'mutex', - 'name', 'NewColor', 'Normals', 'NotAny', 'numeric', - 'open', 'opencl', 'oprec', 'ord', 'OutPort', - 'PaletteChars', 'PaletteColor', 'PaletteKey', 'paramnames', - 'parent', 'Pattern', 'Peek', 'Pending', 'pipe', 'Pixel', - 'PlayAudio', 'Poke', 'pop', 'PopMatrix', 'Pos', 'pos', - 'proc', 'pull', 'push', 'PushMatrix', 'PushRotate', 'PushScale', - 'PushTranslate', 'put', - 'QueryPointer', - 'Raise', 'read', 'ReadImage', 'readlink', 'reads', 'ready', - 'real', 'receive', 'Refresh', 'Rem', 'remove', 'rename', - 'repl', 'reverse', 'right', 'rmdir', 'Rotate', 'Rpos', - 'Rtab', 'rtod', 'runerr', - 'save', 'Scale', 'seek', 'select', 'send', 'seq', - 'serial', 'set', 'setenv', 'setgid', 'setgrent', - 'sethostent', 'setpgrp', 'setpwent', 'setservent', - 'setuid', 'signal', 'sin', 'sort', 'sortf', 'Span', - 'spawn', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', - 'StopAudio', 'string', 'structure', 'Succeed', 'Swi', - 'symlink', 'sys_errstr', 'system', 'syswrite', - 'Tab', 'tab', 'table', 'tan', - 'Texcoord', 'Texture', 'TextWidth', 'Translate', - 'trap', 'trim', 'truncate', 'trylock', 'type', - 'umask', 'Uncouple', 'unlock', 'upto', 'utime', - 'variable', 'VAttrib', - 'wait', 'WAttrib', 'WDefault', 'WFlush', 'where', - 'WinAssociate', 'WinButton', 'WinColorDialog', 'WindowContents', - 'WinEditRegion', 'WinFontDialog', 'WinMenuBar', 'WinOpenDialog', - 'WinPlayMedia', 'WinSaveDialog', 'WinScrollBar', 'WinSelectDialog', - 'write', 'WriteImage', 'writes', 'WSection', - 'WSync'), prefix=r'\b', suffix=r'\b'), - Name.Function), - include('numbers'), + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, words, using, this +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['IconLexer', 'UcodeLexer', 'UniconLexer'] + + +class UniconLexer(RegexLexer): + """ + For Unicon source code. + + .. versionadded:: 2.4 + """ + + name = 'Unicon' + aliases = ['unicon'] + filenames = ['*.icn'] + mimetypes = ['text/unicon'] + + flags = re.MULTILINE + + tokens = { + 'root': [ + (r'[^\S\n]+', Text), + (r'#.*?\n', Comment.Single), + (r'[^\S\n]+', Text), + (r'class|method|procedure', Keyword.Declaration, 'subprogram'), + (r'(record)(\s+)(\w+)', + bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'), + (r'(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|' + r'\$ifndef|\$include|\$line|\$undef)\b', Keyword.PreProc), + (r'(&null|&fail)\b', Keyword.Constant), + (r'&allocated|&ascii|&clock|&collections|&column|&col|&control|' + r'&cset|¤t|&dateline|&date|&digits|&dump|' + r'&errno|&errornumber|&errortext|&errorvalue|&error|&errout|' + r'&eventcode|&eventvalue|&eventsource|&e|' + r'&features|&file|&host|&input|&interval|&lcase|&letters|' + r'&level|&line|&ldrag|&lpress|&lrelease|' + r'&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|' + r'&phi|&pick|&pi|&pos|&progname|' + r'&random|&rdrag|®ions|&resize|&row|&rpress|&rrelease|' + r'&shift|&source|&storage|&subject|' + r'&time|&trace|&ucase|&version|' + r'&window|&x|&y', Keyword.Reserved), + (r'(by|of|not|to)\b', Keyword.Reserved), + (r'(global|local|static|abstract)\b', Keyword.Reserved), + (r'package|link|import', Keyword.Declaration), + (words(( + 'break', 'case', 'create', 'critical', 'default', 'end', 'all', + 'do', 'else', 'every', 'fail', 'if', 'import', 'initial', + 'initially', 'invocable', 'next', + 'repeat', 'return', 'suspend', + 'then', 'thread', 'until', 'while'), prefix=r'\b', suffix=r'\b'), + Keyword.Reserved), + (words(( + 'Abort', 'abs', 'acos', 'Active', 'Alert', 'any', 'Any', 'Arb', + 'Arbno', 'args', 'array', 'asin', 'atan', 'atanh', 'Attrib', + 'Bal', 'bal', 'Bg', 'Break', 'Breakx', + 'callout', 'center', 'char', 'chdir', 'chmod', 'chown', 'chroot', + 'classname', 'Clip', 'Clone', 'close', 'cofail', 'collect', + 'Color', 'ColorValue', 'condvar', 'constructor', 'copy', + 'CopyArea', 'cos', 'Couple', 'crypt', 'cset', 'ctime', + 'dbcolumns', 'dbdriver', 'dbkeys', 'dblimits', 'dbproduct', + 'dbtables', 'delay', 'delete', 'detab', 'display', 'DrawArc', + 'DrawCircle', 'DrawCube', 'DrawCurve', 'DrawCylinder', + 'DrawDisk', 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', + 'DrawRectangle', 'DrawSegment', 'DrawSphere', 'DrawString', + 'DrawTorus', 'dtor', + 'entab', 'EraseArea', 'errorclear', 'Event', 'eventmask', + 'EvGet', 'EvSend', 'exec', 'exit', 'exp', 'Eye', + 'Fail', 'fcntl', 'fdup', 'Fence', 'fetch', 'Fg', 'fieldnames', + 'filepair', 'FillArc', 'FillCircle', 'FillPolygon', + 'FillRectangle', 'find', 'flock', 'flush', 'Font', 'fork', + 'FreeColor', 'FreeSpace', 'function', + 'get', 'getch', 'getche', 'getegid', 'getenv', 'geteuid', + 'getgid', 'getgr', 'gethost', 'getpgrp', 'getpid', 'getppid', + 'getpw', 'getrusage', 'getserv', 'GetSpace', 'gettimeofday', + 'getuid', 'globalnames', 'GotoRC', 'GotoXY', 'gtime', 'hardlink', + 'iand', 'icom', 'IdentityMatrix', 'image', 'InPort', 'insert', + 'Int86', 'integer', 'ioctl', 'ior', 'ishift', 'istate', 'ixor', + 'kbhit', 'key', 'keyword', 'kill', + 'left', 'Len', 'list', 'load', 'loadfunc', 'localnames', + 'lock', 'log', 'Lower', 'lstat', + 'many', 'map', 'match', 'MatrixMode', 'max', 'member', + 'membernames', 'methodnames', 'methods', 'min', 'mkdir', 'move', + 'MultMatrix', 'mutex', + 'name', 'NewColor', 'Normals', 'NotAny', 'numeric', + 'open', 'opencl', 'oprec', 'ord', 'OutPort', + 'PaletteChars', 'PaletteColor', 'PaletteKey', 'paramnames', + 'parent', 'Pattern', 'Peek', 'Pending', 'pipe', 'Pixel', + 'PlayAudio', 'Poke', 'pop', 'PopMatrix', 'Pos', 'pos', + 'proc', 'pull', 'push', 'PushMatrix', 'PushRotate', 'PushScale', + 'PushTranslate', 'put', + 'QueryPointer', + 'Raise', 'read', 'ReadImage', 'readlink', 'reads', 'ready', + 'real', 'receive', 'Refresh', 'Rem', 'remove', 'rename', + 'repl', 'reverse', 'right', 'rmdir', 'Rotate', 'Rpos', + 'Rtab', 'rtod', 'runerr', + 'save', 'Scale', 'seek', 'select', 'send', 'seq', + 'serial', 'set', 'setenv', 'setgid', 'setgrent', + 'sethostent', 'setpgrp', 'setpwent', 'setservent', + 'setuid', 'signal', 'sin', 'sort', 'sortf', 'Span', + 'spawn', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', + 'StopAudio', 'string', 'structure', 'Succeed', 'Swi', + 'symlink', 'sys_errstr', 'system', 'syswrite', + 'Tab', 'tab', 'table', 'tan', + 'Texcoord', 'Texture', 'TextWidth', 'Translate', + 'trap', 'trim', 'truncate', 'trylock', 'type', + 'umask', 'Uncouple', 'unlock', 'upto', 'utime', + 'variable', 'VAttrib', + 'wait', 'WAttrib', 'WDefault', 'WFlush', 'where', + 'WinAssociate', 'WinButton', 'WinColorDialog', 'WindowContents', + 'WinEditRegion', 'WinFontDialog', 'WinMenuBar', 'WinOpenDialog', + 'WinPlayMedia', 'WinSaveDialog', 'WinScrollBar', 'WinSelectDialog', + 'write', 'WriteImage', 'writes', 'WSection', + 'WSync'), prefix=r'\b', suffix=r'\b'), + Name.Function), + include('numbers'), (r'<@|<<@|>@|>>@|\.>|->|===|~===|\*\*|\+\+|--|\.|~==|~=|<=|>=|==|' r'=|<<=|<<|>>=|>>|:=:|:=|->|<->|\+:=|\|', Operator), - (r'"(?:[^\\"]|\\.)*"', String), - (r"'(?:[^\\']|\\.)*'", String.Character), - (r'[*<>+=/&!?@~\\-]', Operator), - (r'\^', Operator), - (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))), + (r'"(?:[^\\"]|\\.)*"', String), + (r"'(?:[^\\']|\\.)*'", String.Character), + (r'[*<>+=/&!?@~\\-]', Operator), + (r'\^', Operator), + (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))), (r"[\[\]]", Punctuation), (r"<>|=>|[()|:;,.'`{}%&?]", Punctuation), - (r'\n+', Text), - ], - 'numbers': [ - (r'\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b', Number.Hex), - (r'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?', Number.Float), - (r'\b([+-]?[0-9]+[KMGTPkmgtp]?)\b', Number.Integer), - ], - 'subprogram': [ - (r'\(', Punctuation, ('#pop', 'formal_part')), - (r';', Punctuation, '#pop'), - (r'"[^"]+"|\w+', Name.Function), - include('root'), - ], - 'type_def': [ - (r'\(', Punctuation, 'formal_part'), - ], - 'formal_part': [ - (r'\)', Punctuation, '#pop'), - (r'\w+', Name.Variable), - (r',', Punctuation), - (r'(:string|:integer|:real)\b', Keyword.Reserved), - include('root'), - ], - } - - -class IconLexer(RegexLexer): - """ - Lexer for Icon. - - .. versionadded:: 1.6 - """ - name = 'Icon' - aliases = ['icon'] - filenames = ['*.icon', '*.ICON'] - mimetypes = [] - flags = re.MULTILINE - - tokens = { - 'root': [ - (r'[^\S\n]+', Text), - (r'#.*?\n', Comment.Single), - (r'[^\S\n]+', Text), - (r'class|method|procedure', Keyword.Declaration, 'subprogram'), - (r'(record)(\s+)(\w+)', - bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'), - (r'(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|' - r'\$ifndef|\$include|\$line|\$undef)\b', Keyword.PreProc), - (r'(&null|&fail)\b', Keyword.Constant), - (r'&allocated|&ascii|&clock|&collections|&column|&col|&control|' - r'&cset|¤t|&dateline|&date|&digits|&dump|' - r'&errno|&errornumber|&errortext|&errorvalue|&error|&errout|' - r'&eventcode|&eventvalue|&eventsource|&e|' - r'&features|&file|&host|&input|&interval|&lcase|&letters|' - r'&level|&line|&ldrag|&lpress|&lrelease|' - r'&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|' - r'&phi|&pick|&pi|&pos|&progname|' - r'&random|&rdrag|®ions|&resize|&row|&rpress|&rrelease|' - r'&shift|&source|&storage|&subject|' - r'&time|&trace|&ucase|&version|' - r'&window|&x|&y', Keyword.Reserved), - (r'(by|of|not|to)\b', Keyword.Reserved), - (r'(global|local|static)\b', Keyword.Reserved), - (r'link', Keyword.Declaration), - (words(( - 'break', 'case', 'create', 'default', 'end', 'all', - 'do', 'else', 'every', 'fail', 'if', 'initial', - 'invocable', 'next', - 'repeat', 'return', 'suspend', - 'then', 'until', 'while'), prefix=r'\b', suffix=r'\b'), - Keyword.Reserved), - (words(( - 'abs', 'acos', 'Active', 'Alert', 'any', - 'args', 'array', 'asin', 'atan', 'atanh', 'Attrib', - 'bal', 'Bg', - 'callout', 'center', 'char', 'chdir', 'chmod', 'chown', 'chroot', - 'Clip', 'Clone', 'close', 'cofail', 'collect', - 'Color', 'ColorValue', 'condvar', 'copy', - 'CopyArea', 'cos', 'Couple', 'crypt', 'cset', 'ctime', - 'delay', 'delete', 'detab', 'display', 'DrawArc', - 'DrawCircle', 'DrawCube', 'DrawCurve', 'DrawCylinder', - 'DrawDisk', 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', - 'DrawRectangle', 'DrawSegment', 'DrawSphere', 'DrawString', - 'DrawTorus', 'dtor', - 'entab', 'EraseArea', 'errorclear', 'Event', 'eventmask', - 'EvGet', 'EvSend', 'exec', 'exit', 'exp', 'Eye', - 'fcntl', 'fdup', 'fetch', 'Fg', 'fieldnames', - 'FillArc', 'FillCircle', 'FillPolygon', - 'FillRectangle', 'find', 'flock', 'flush', 'Font', - 'FreeColor', 'FreeSpace', 'function', - 'get', 'getch', 'getche', 'getenv', - 'GetSpace', 'gettimeofday', - 'getuid', 'globalnames', 'GotoRC', 'GotoXY', 'gtime', 'hardlink', - 'iand', 'icom', 'IdentityMatrix', 'image', 'InPort', 'insert', - 'Int86', 'integer', 'ioctl', 'ior', 'ishift', 'istate', 'ixor', - 'kbhit', 'key', 'keyword', 'kill', - 'left', 'Len', 'list', 'load', 'loadfunc', 'localnames', - 'lock', 'log', 'Lower', 'lstat', - 'many', 'map', 'match', 'MatrixMode', 'max', 'member', - 'membernames', 'methodnames', 'methods', 'min', 'mkdir', 'move', - 'MultMatrix', 'mutex', - 'name', 'NewColor', 'Normals', 'numeric', - 'open', 'opencl', 'oprec', 'ord', 'OutPort', - 'PaletteChars', 'PaletteColor', 'PaletteKey', 'paramnames', - 'parent', 'Pattern', 'Peek', 'Pending', 'pipe', 'Pixel', - 'Poke', 'pop', 'PopMatrix', 'Pos', 'pos', - 'proc', 'pull', 'push', 'PushMatrix', 'PushRotate', 'PushScale', - 'PushTranslate', 'put', - 'QueryPointer', - 'Raise', 'read', 'ReadImage', 'readlink', 'reads', 'ready', - 'real', 'receive', 'Refresh', 'Rem', 'remove', 'rename', - 'repl', 'reverse', 'right', 'rmdir', 'Rotate', 'Rpos', - 'rtod', 'runerr', - 'save', 'Scale', 'seek', 'select', 'send', 'seq', - 'serial', 'set', 'setenv', - 'setuid', 'signal', 'sin', 'sort', 'sortf', - 'spawn', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', - 'string', 'structure', 'Swi', - 'symlink', 'sys_errstr', 'system', 'syswrite', - 'tab', 'table', 'tan', - 'Texcoord', 'Texture', 'TextWidth', 'Translate', - 'trap', 'trim', 'truncate', 'trylock', 'type', - 'umask', 'Uncouple', 'unlock', 'upto', 'utime', - 'variable', - 'wait', 'WAttrib', 'WDefault', 'WFlush', 'where', - 'WinAssociate', 'WinButton', 'WinColorDialog', 'WindowContents', - 'WinEditRegion', 'WinFontDialog', 'WinMenuBar', 'WinOpenDialog', - 'WinPlayMedia', 'WinSaveDialog', 'WinScrollBar', 'WinSelectDialog', - 'write', 'WriteImage', 'writes', 'WSection', - 'WSync'), prefix=r'\b', suffix=r'\b'), - Name.Function), - include('numbers'), + (r'\n+', Text), + ], + 'numbers': [ + (r'\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b', Number.Hex), + (r'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?', Number.Float), + (r'\b([+-]?[0-9]+[KMGTPkmgtp]?)\b', Number.Integer), + ], + 'subprogram': [ + (r'\(', Punctuation, ('#pop', 'formal_part')), + (r';', Punctuation, '#pop'), + (r'"[^"]+"|\w+', Name.Function), + include('root'), + ], + 'type_def': [ + (r'\(', Punctuation, 'formal_part'), + ], + 'formal_part': [ + (r'\)', Punctuation, '#pop'), + (r'\w+', Name.Variable), + (r',', Punctuation), + (r'(:string|:integer|:real)\b', Keyword.Reserved), + include('root'), + ], + } + + +class IconLexer(RegexLexer): + """ + Lexer for Icon. + + .. versionadded:: 1.6 + """ + name = 'Icon' + aliases = ['icon'] + filenames = ['*.icon', '*.ICON'] + mimetypes = [] + flags = re.MULTILINE + + tokens = { + 'root': [ + (r'[^\S\n]+', Text), + (r'#.*?\n', Comment.Single), + (r'[^\S\n]+', Text), + (r'class|method|procedure', Keyword.Declaration, 'subprogram'), + (r'(record)(\s+)(\w+)', + bygroups(Keyword.Declaration, Text, Keyword.Type), 'type_def'), + (r'(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|' + r'\$ifndef|\$include|\$line|\$undef)\b', Keyword.PreProc), + (r'(&null|&fail)\b', Keyword.Constant), + (r'&allocated|&ascii|&clock|&collections|&column|&col|&control|' + r'&cset|¤t|&dateline|&date|&digits|&dump|' + r'&errno|&errornumber|&errortext|&errorvalue|&error|&errout|' + r'&eventcode|&eventvalue|&eventsource|&e|' + r'&features|&file|&host|&input|&interval|&lcase|&letters|' + r'&level|&line|&ldrag|&lpress|&lrelease|' + r'&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|' + r'&phi|&pick|&pi|&pos|&progname|' + r'&random|&rdrag|®ions|&resize|&row|&rpress|&rrelease|' + r'&shift|&source|&storage|&subject|' + r'&time|&trace|&ucase|&version|' + r'&window|&x|&y', Keyword.Reserved), + (r'(by|of|not|to)\b', Keyword.Reserved), + (r'(global|local|static)\b', Keyword.Reserved), + (r'link', Keyword.Declaration), + (words(( + 'break', 'case', 'create', 'default', 'end', 'all', + 'do', 'else', 'every', 'fail', 'if', 'initial', + 'invocable', 'next', + 'repeat', 'return', 'suspend', + 'then', 'until', 'while'), prefix=r'\b', suffix=r'\b'), + Keyword.Reserved), + (words(( + 'abs', 'acos', 'Active', 'Alert', 'any', + 'args', 'array', 'asin', 'atan', 'atanh', 'Attrib', + 'bal', 'Bg', + 'callout', 'center', 'char', 'chdir', 'chmod', 'chown', 'chroot', + 'Clip', 'Clone', 'close', 'cofail', 'collect', + 'Color', 'ColorValue', 'condvar', 'copy', + 'CopyArea', 'cos', 'Couple', 'crypt', 'cset', 'ctime', + 'delay', 'delete', 'detab', 'display', 'DrawArc', + 'DrawCircle', 'DrawCube', 'DrawCurve', 'DrawCylinder', + 'DrawDisk', 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', + 'DrawRectangle', 'DrawSegment', 'DrawSphere', 'DrawString', + 'DrawTorus', 'dtor', + 'entab', 'EraseArea', 'errorclear', 'Event', 'eventmask', + 'EvGet', 'EvSend', 'exec', 'exit', 'exp', 'Eye', + 'fcntl', 'fdup', 'fetch', 'Fg', 'fieldnames', + 'FillArc', 'FillCircle', 'FillPolygon', + 'FillRectangle', 'find', 'flock', 'flush', 'Font', + 'FreeColor', 'FreeSpace', 'function', + 'get', 'getch', 'getche', 'getenv', + 'GetSpace', 'gettimeofday', + 'getuid', 'globalnames', 'GotoRC', 'GotoXY', 'gtime', 'hardlink', + 'iand', 'icom', 'IdentityMatrix', 'image', 'InPort', 'insert', + 'Int86', 'integer', 'ioctl', 'ior', 'ishift', 'istate', 'ixor', + 'kbhit', 'key', 'keyword', 'kill', + 'left', 'Len', 'list', 'load', 'loadfunc', 'localnames', + 'lock', 'log', 'Lower', 'lstat', + 'many', 'map', 'match', 'MatrixMode', 'max', 'member', + 'membernames', 'methodnames', 'methods', 'min', 'mkdir', 'move', + 'MultMatrix', 'mutex', + 'name', 'NewColor', 'Normals', 'numeric', + 'open', 'opencl', 'oprec', 'ord', 'OutPort', + 'PaletteChars', 'PaletteColor', 'PaletteKey', 'paramnames', + 'parent', 'Pattern', 'Peek', 'Pending', 'pipe', 'Pixel', + 'Poke', 'pop', 'PopMatrix', 'Pos', 'pos', + 'proc', 'pull', 'push', 'PushMatrix', 'PushRotate', 'PushScale', + 'PushTranslate', 'put', + 'QueryPointer', + 'Raise', 'read', 'ReadImage', 'readlink', 'reads', 'ready', + 'real', 'receive', 'Refresh', 'Rem', 'remove', 'rename', + 'repl', 'reverse', 'right', 'rmdir', 'Rotate', 'Rpos', + 'rtod', 'runerr', + 'save', 'Scale', 'seek', 'select', 'send', 'seq', + 'serial', 'set', 'setenv', + 'setuid', 'signal', 'sin', 'sort', 'sortf', + 'spawn', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', + 'string', 'structure', 'Swi', + 'symlink', 'sys_errstr', 'system', 'syswrite', + 'tab', 'table', 'tan', + 'Texcoord', 'Texture', 'TextWidth', 'Translate', + 'trap', 'trim', 'truncate', 'trylock', 'type', + 'umask', 'Uncouple', 'unlock', 'upto', 'utime', + 'variable', + 'wait', 'WAttrib', 'WDefault', 'WFlush', 'where', + 'WinAssociate', 'WinButton', 'WinColorDialog', 'WindowContents', + 'WinEditRegion', 'WinFontDialog', 'WinMenuBar', 'WinOpenDialog', + 'WinPlayMedia', 'WinSaveDialog', 'WinScrollBar', 'WinSelectDialog', + 'write', 'WriteImage', 'writes', 'WSection', + 'WSync'), prefix=r'\b', suffix=r'\b'), + Name.Function), + include('numbers'), (r'===|~===|\*\*|\+\+|--|\.|==|~==|<=|>=|=|~=|<<=|<<|>>=|>>|' r':=:|:=|<->|<-|\+:=|\|\||\|', Operator), - (r'"(?:[^\\"]|\\.)*"', String), - (r"'(?:[^\\']|\\.)*'", String.Character), - (r'[*<>+=/&!?@~\\-]', Operator), - (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))), + (r'"(?:[^\\"]|\\.)*"', String), + (r"'(?:[^\\']|\\.)*'", String.Character), + (r'[*<>+=/&!?@~\\-]', Operator), + (r'(\w+)(\s*|[(,])', bygroups(Name, using(this))), (r"[\[\]]", Punctuation), (r"<>|=>|[()|:;,.'`{}%\^&?]", Punctuation), - (r'\n+', Text), - ], - 'numbers': [ - (r'\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b', Number.Hex), - (r'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?', Number.Float), - (r'\b([+-]?[0-9]+[KMGTPkmgtp]?)\b', Number.Integer), - ], - 'subprogram': [ - (r'\(', Punctuation, ('#pop', 'formal_part')), - (r';', Punctuation, '#pop'), - (r'"[^"]+"|\w+', Name.Function), - include('root'), - ], - 'type_def': [ - (r'\(', Punctuation, 'formal_part'), - ], - 'formal_part': [ - (r'\)', Punctuation, '#pop'), - (r'\w+', Name.Variable), - (r',', Punctuation), - (r'(:string|:integer|:real)\b', Keyword.Reserved), - include('root'), - ], - } - - -class UcodeLexer(RegexLexer): - """ - Lexer for Icon ucode files. - - .. versionadded:: 2.4 - """ - name = 'ucode' - aliases = ['ucode'] - filenames = ['*.u', '*.u1', '*.u2'] - mimetypes = [] - flags = re.MULTILINE - - tokens = { - 'root': [ - (r'(#.*\n)', Comment), - (words(( - 'con', 'declend', 'end', - 'global', - 'impl', 'invocable', - 'lab', 'link', 'local', - 'record', - 'uid', 'unions', - 'version'), - prefix=r'\b', suffix=r'\b'), - Name.Function), - (words(( - 'colm', 'filen', 'line', 'synt'), - prefix=r'\b', suffix=r'\b'), - Comment), - (words(( - 'asgn', - 'bang', 'bscan', - 'cat', 'ccase', 'chfail', - 'coact', 'cofail', 'compl', - 'coret', 'create', 'cset', - 'diff', 'div', 'dup', - 'efail', 'einit', 'end', 'eqv', 'eret', - 'error', 'escan', 'esusp', - 'field', - 'goto', - 'init', 'int', 'inter', - 'invoke', - 'keywd', - 'lconcat', 'lexeq', 'lexge', - 'lexgt', 'lexle', 'lexlt', 'lexne', - 'limit', 'llist', 'lsusp', - 'mark', 'mark0', 'minus', 'mod', 'mult', - 'neg', 'neqv', 'nonnull', 'noop', 'null', - 'number', 'numeq', 'numge', 'numgt', - 'numle', 'numlt', 'numne', - 'pfail', 'plus', 'pnull', 'pop', 'power', - 'pret', 'proc', 'psusp', 'push1', 'pushn1', - 'random', 'rasgn', 'rcv', 'rcvbk', 'real', - 'refresh', 'rswap', - 'sdup', 'sect', 'size', 'snd', 'sndbk', - 'str', 'subsc', 'swap', - 'tabmat', 'tally', 'toby', 'trace', - 'unmark', - 'value', 'var'), prefix=r'\b', suffix=r'\b'), - Keyword.Declaration), - (words(( - 'any', - 'case', - 'endcase', 'endevery', 'endif', - 'endifelse', 'endrepeat', 'endsuspend', - 'enduntil', 'endwhile', 'every', - 'if', 'ifelse', - 'repeat', - 'suspend', - 'until', - 'while'), - prefix=r'\b', suffix=r'\b'), - Name.Constant), - (r'\d+(\s*|\.$|$)', Number.Integer), - (r'[+-]?\d*\.\d+(E[-+]?\d+)?', Number.Float), - (r'[+-]?\d+\.\d*(E[-+]?\d+)?', Number.Float), - (r"(<>|=>|[()|:;,.'`]|[{}]|[%^]|[&?])", Punctuation), - (r'\s+\b', Text), - (r'[\w-]+', Text), - ], - } + (r'\n+', Text), + ], + 'numbers': [ + (r'\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b', Number.Hex), + (r'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?', Number.Float), + (r'\b([+-]?[0-9]+[KMGTPkmgtp]?)\b', Number.Integer), + ], + 'subprogram': [ + (r'\(', Punctuation, ('#pop', 'formal_part')), + (r';', Punctuation, '#pop'), + (r'"[^"]+"|\w+', Name.Function), + include('root'), + ], + 'type_def': [ + (r'\(', Punctuation, 'formal_part'), + ], + 'formal_part': [ + (r'\)', Punctuation, '#pop'), + (r'\w+', Name.Variable), + (r',', Punctuation), + (r'(:string|:integer|:real)\b', Keyword.Reserved), + include('root'), + ], + } + + +class UcodeLexer(RegexLexer): + """ + Lexer for Icon ucode files. + + .. versionadded:: 2.4 + """ + name = 'ucode' + aliases = ['ucode'] + filenames = ['*.u', '*.u1', '*.u2'] + mimetypes = [] + flags = re.MULTILINE + + tokens = { + 'root': [ + (r'(#.*\n)', Comment), + (words(( + 'con', 'declend', 'end', + 'global', + 'impl', 'invocable', + 'lab', 'link', 'local', + 'record', + 'uid', 'unions', + 'version'), + prefix=r'\b', suffix=r'\b'), + Name.Function), + (words(( + 'colm', 'filen', 'line', 'synt'), + prefix=r'\b', suffix=r'\b'), + Comment), + (words(( + 'asgn', + 'bang', 'bscan', + 'cat', 'ccase', 'chfail', + 'coact', 'cofail', 'compl', + 'coret', 'create', 'cset', + 'diff', 'div', 'dup', + 'efail', 'einit', 'end', 'eqv', 'eret', + 'error', 'escan', 'esusp', + 'field', + 'goto', + 'init', 'int', 'inter', + 'invoke', + 'keywd', + 'lconcat', 'lexeq', 'lexge', + 'lexgt', 'lexle', 'lexlt', 'lexne', + 'limit', 'llist', 'lsusp', + 'mark', 'mark0', 'minus', 'mod', 'mult', + 'neg', 'neqv', 'nonnull', 'noop', 'null', + 'number', 'numeq', 'numge', 'numgt', + 'numle', 'numlt', 'numne', + 'pfail', 'plus', 'pnull', 'pop', 'power', + 'pret', 'proc', 'psusp', 'push1', 'pushn1', + 'random', 'rasgn', 'rcv', 'rcvbk', 'real', + 'refresh', 'rswap', + 'sdup', 'sect', 'size', 'snd', 'sndbk', + 'str', 'subsc', 'swap', + 'tabmat', 'tally', 'toby', 'trace', + 'unmark', + 'value', 'var'), prefix=r'\b', suffix=r'\b'), + Keyword.Declaration), + (words(( + 'any', + 'case', + 'endcase', 'endevery', 'endif', + 'endifelse', 'endrepeat', 'endsuspend', + 'enduntil', 'endwhile', 'every', + 'if', 'ifelse', + 'repeat', + 'suspend', + 'until', + 'while'), + prefix=r'\b', suffix=r'\b'), + Name.Constant), + (r'\d+(\s*|\.$|$)', Number.Integer), + (r'[+-]?\d*\.\d+(E[-+]?\d+)?', Number.Float), + (r'[+-]?\d+\.\d*(E[-+]?\d+)?', Number.Float), + (r"(<>|=>|[()|:;,.'`]|[{}]|[%^]|[&?])", Punctuation), + (r'\s+\b', Text), + (r'[\w-]+', Text), + ], + } def analyse_text(text): """endsuspend and endrepeat are unique to this language, and diff --git a/contrib/python/Pygments/py3/pygments/lexers/varnish.py b/contrib/python/Pygments/py3/pygments/lexers/varnish.py index 3f709c0a09..618049be5b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/varnish.py +++ b/contrib/python/Pygments/py3/pygments/lexers/varnish.py @@ -1,189 +1,189 @@ -""" - pygments.lexers.varnish - ~~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for Varnish configuration - +""" + pygments.lexers.varnish + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Varnish configuration + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, include, bygroups, using, this, \ - inherit, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Literal - -__all__ = ['VCLLexer', 'VCLSnippetLexer'] - - -class VCLLexer(RegexLexer): - """ - For Varnish Configuration Language (VCL). - - .. versionadded:: 2.2 - """ - name = 'VCL' - aliases = ['vcl'] - filenames = ['*.vcl'] - mimetypes = ['text/x-vclsrc'] - - def analyse_text(text): - # If the very first line is 'vcl 4.0;' it's pretty much guaranteed - # that this is VCL - if text.startswith('vcl 4.0;'): - return 1.0 - # Skip over comments and blank lines - # This is accurate enough that returning 0.9 is reasonable. - # Almost no VCL files start without some comments. - elif '\nvcl 4.0;' in text[:1000]: - return 0.9 - - tokens = { - 'probe': [ - include('whitespace'), - include('comments'), - (r'(\.\w+)(\s*=\s*)([^;]*)(;)', - bygroups(Name.Attribute, Operator, using(this), Punctuation)), - (r'\}', Punctuation, '#pop'), - ], - 'acl': [ - include('whitespace'), - include('comments'), - (r'[!/]+', Operator), - (r';', Punctuation), - (r'\d+', Number), - (r'\}', Punctuation, '#pop'), - ], - 'backend': [ - include('whitespace'), - (r'(\.probe)(\s*=\s*)(\w+)(;)', - bygroups(Name.Attribute, Operator, Name.Variable.Global, Punctuation)), - (r'(\.probe)(\s*=\s*)(\{)', - bygroups(Name.Attribute, Operator, Punctuation), 'probe'), + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, bygroups, using, this, \ + inherit, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Literal + +__all__ = ['VCLLexer', 'VCLSnippetLexer'] + + +class VCLLexer(RegexLexer): + """ + For Varnish Configuration Language (VCL). + + .. versionadded:: 2.2 + """ + name = 'VCL' + aliases = ['vcl'] + filenames = ['*.vcl'] + mimetypes = ['text/x-vclsrc'] + + def analyse_text(text): + # If the very first line is 'vcl 4.0;' it's pretty much guaranteed + # that this is VCL + if text.startswith('vcl 4.0;'): + return 1.0 + # Skip over comments and blank lines + # This is accurate enough that returning 0.9 is reasonable. + # Almost no VCL files start without some comments. + elif '\nvcl 4.0;' in text[:1000]: + return 0.9 + + tokens = { + 'probe': [ + include('whitespace'), + include('comments'), + (r'(\.\w+)(\s*=\s*)([^;]*)(;)', + bygroups(Name.Attribute, Operator, using(this), Punctuation)), + (r'\}', Punctuation, '#pop'), + ], + 'acl': [ + include('whitespace'), + include('comments'), + (r'[!/]+', Operator), + (r';', Punctuation), + (r'\d+', Number), + (r'\}', Punctuation, '#pop'), + ], + 'backend': [ + include('whitespace'), + (r'(\.probe)(\s*=\s*)(\w+)(;)', + bygroups(Name.Attribute, Operator, Name.Variable.Global, Punctuation)), + (r'(\.probe)(\s*=\s*)(\{)', + bygroups(Name.Attribute, Operator, Punctuation), 'probe'), (r'(\.\w+\b)(\s*=\s*)([^;\s]*)(\s*;)', - bygroups(Name.Attribute, Operator, using(this), Punctuation)), - (r'\{', Punctuation, '#push'), - (r'\}', Punctuation, '#pop'), - ], - 'statements': [ - (r'(\d\.)?\d+[sdwhmy]', Literal.Date), - (r'(\d\.)?\d+ms', Literal.Date), - (r'(vcl_pass|vcl_hash|vcl_hit|vcl_init|vcl_backend_fetch|vcl_pipe|' - r'vcl_backend_response|vcl_synth|vcl_deliver|vcl_backend_error|' - r'vcl_fini|vcl_recv|vcl_purge|vcl_miss)\b', Name.Function), - (r'(pipe|retry|hash|synth|deliver|purge|abandon|lookup|pass|fail|ok|' - r'miss|fetch|restart)\b', Name.Constant), - (r'(beresp|obj|resp|req|req_top|bereq)\.http\.[a-zA-Z_-]+\b', Name.Variable), - (words(( - 'obj.status', 'req.hash_always_miss', 'beresp.backend', 'req.esi_level', - 'req.can_gzip', 'beresp.ttl', 'obj.uncacheable', 'req.ttl', 'obj.hits', - 'client.identity', 'req.hash_ignore_busy', 'obj.reason', 'req.xid', - 'req_top.proto', 'beresp.age', 'obj.proto', 'obj.age', 'local.ip', - 'beresp.uncacheable', 'req.method', 'beresp.backend.ip', 'now', - 'obj.grace', 'req.restarts', 'beresp.keep', 'req.proto', 'resp.proto', - 'bereq.xid', 'bereq.between_bytes_timeout', 'req.esi', - 'bereq.first_byte_timeout', 'bereq.method', 'bereq.connect_timeout', - 'beresp.do_gzip', 'resp.status', 'beresp.do_gunzip', - 'beresp.storage_hint', 'resp.is_streaming', 'beresp.do_stream', - 'req_top.method', 'bereq.backend', 'beresp.backend.name', 'beresp.status', - 'req.url', 'obj.keep', 'obj.ttl', 'beresp.reason', 'bereq.retries', - 'resp.reason', 'bereq.url', 'beresp.do_esi', 'beresp.proto', 'client.ip', - 'bereq.proto', 'server.hostname', 'remote.ip', 'req.backend_hint', - 'server.identity', 'req_top.url', 'beresp.grace', 'beresp.was_304', - 'server.ip', 'bereq.uncacheable'), suffix=r'\b'), - Name.Variable), - (r'[!%&+*\-,/<.}{>=|~]+', Operator), - (r'[();]', Punctuation), - - (r'[,]+', Punctuation), - (words(('hash_data', 'regsub', 'regsuball', 'if', 'else', - 'elsif', 'elif', 'synth', 'synthetic', 'ban', - 'return', 'set', 'unset', 'import', 'include', 'new', - 'rollback', 'call'), suffix=r'\b'), - Keyword), - (r'storage\.\w+\.\w+\b', Name.Variable), - (words(('true', 'false')), Name.Builtin), - (r'\d+\b', Number), - (r'(backend)(\s+\w+)(\s*\{)', - bygroups(Keyword, Name.Variable.Global, Punctuation), 'backend'), - (r'(probe\s)(\s*\w+\s)(\{)', - bygroups(Keyword, Name.Variable.Global, Punctuation), 'probe'), - (r'(acl\s)(\s*\w+\s)(\{)', - bygroups(Keyword, Name.Variable.Global, Punctuation), 'acl'), - (r'(vcl )(4.0)(;)$', - bygroups(Keyword.Reserved, Name.Constant, Punctuation)), - (r'(sub\s+)([a-zA-Z]\w*)(\s*\{)', - bygroups(Keyword, Name.Function, Punctuation)), - (r'([a-zA-Z_]\w*)' - r'(\.)' - r'([a-zA-Z_]\w*)' - r'(\s*\(.*\))', - bygroups(Name.Function, Punctuation, Name.Function, using(this))), - (r'[a-zA-Z_]\w*', Name), - ], - 'comment': [ - (r'[^*/]+', Comment.Multiline), - (r'/\*', Comment.Multiline, '#push'), - (r'\*/', Comment.Multiline, '#pop'), - (r'[*/]', Comment.Multiline), - ], - 'comments': [ - (r'#.*$', Comment), - (r'/\*', Comment.Multiline, 'comment'), - (r'//.*$', Comment), - ], - 'string': [ - (r'"', String, '#pop'), - (r'[^"\n]+', String), # all other characters - ], - 'multistring': [ - (r'[^"}]', String), - (r'"\}', String, '#pop'), - (r'["}]', String), - ], - 'whitespace': [ - (r'L?"', String, 'string'), - (r'\{"', String, 'multistring'), - (r'\n', Text), - (r'\s+', Text), - (r'\\\n', Text), # line continuation - ], - 'root': [ - include('whitespace'), - include('comments'), - include('statements'), - (r'\s+', Text), - ], - } - - -class VCLSnippetLexer(VCLLexer): - """ - For Varnish Configuration Language snippets. - - .. versionadded:: 2.2 - """ - name = 'VCLSnippets' - aliases = ['vclsnippets', 'vclsnippet'] - mimetypes = ['text/x-vclsnippet'] - filenames = [] - - def analyse_text(text): - # override method inherited from VCLLexer - return 0 - - tokens = { - 'snippetspre': [ - (r'\.\.\.+', Comment), - (r'(bereq|req|req_top|resp|beresp|obj|client|server|local|remote|' - r'storage)($|\.\*)', Name.Variable), - ], - 'snippetspost': [ - (r'(backend)\b', Keyword.Reserved), - ], - 'root': [ - include('snippetspre'), - inherit, - include('snippetspost'), - ], - } + bygroups(Name.Attribute, Operator, using(this), Punctuation)), + (r'\{', Punctuation, '#push'), + (r'\}', Punctuation, '#pop'), + ], + 'statements': [ + (r'(\d\.)?\d+[sdwhmy]', Literal.Date), + (r'(\d\.)?\d+ms', Literal.Date), + (r'(vcl_pass|vcl_hash|vcl_hit|vcl_init|vcl_backend_fetch|vcl_pipe|' + r'vcl_backend_response|vcl_synth|vcl_deliver|vcl_backend_error|' + r'vcl_fini|vcl_recv|vcl_purge|vcl_miss)\b', Name.Function), + (r'(pipe|retry|hash|synth|deliver|purge|abandon|lookup|pass|fail|ok|' + r'miss|fetch|restart)\b', Name.Constant), + (r'(beresp|obj|resp|req|req_top|bereq)\.http\.[a-zA-Z_-]+\b', Name.Variable), + (words(( + 'obj.status', 'req.hash_always_miss', 'beresp.backend', 'req.esi_level', + 'req.can_gzip', 'beresp.ttl', 'obj.uncacheable', 'req.ttl', 'obj.hits', + 'client.identity', 'req.hash_ignore_busy', 'obj.reason', 'req.xid', + 'req_top.proto', 'beresp.age', 'obj.proto', 'obj.age', 'local.ip', + 'beresp.uncacheable', 'req.method', 'beresp.backend.ip', 'now', + 'obj.grace', 'req.restarts', 'beresp.keep', 'req.proto', 'resp.proto', + 'bereq.xid', 'bereq.between_bytes_timeout', 'req.esi', + 'bereq.first_byte_timeout', 'bereq.method', 'bereq.connect_timeout', + 'beresp.do_gzip', 'resp.status', 'beresp.do_gunzip', + 'beresp.storage_hint', 'resp.is_streaming', 'beresp.do_stream', + 'req_top.method', 'bereq.backend', 'beresp.backend.name', 'beresp.status', + 'req.url', 'obj.keep', 'obj.ttl', 'beresp.reason', 'bereq.retries', + 'resp.reason', 'bereq.url', 'beresp.do_esi', 'beresp.proto', 'client.ip', + 'bereq.proto', 'server.hostname', 'remote.ip', 'req.backend_hint', + 'server.identity', 'req_top.url', 'beresp.grace', 'beresp.was_304', + 'server.ip', 'bereq.uncacheable'), suffix=r'\b'), + Name.Variable), + (r'[!%&+*\-,/<.}{>=|~]+', Operator), + (r'[();]', Punctuation), + + (r'[,]+', Punctuation), + (words(('hash_data', 'regsub', 'regsuball', 'if', 'else', + 'elsif', 'elif', 'synth', 'synthetic', 'ban', + 'return', 'set', 'unset', 'import', 'include', 'new', + 'rollback', 'call'), suffix=r'\b'), + Keyword), + (r'storage\.\w+\.\w+\b', Name.Variable), + (words(('true', 'false')), Name.Builtin), + (r'\d+\b', Number), + (r'(backend)(\s+\w+)(\s*\{)', + bygroups(Keyword, Name.Variable.Global, Punctuation), 'backend'), + (r'(probe\s)(\s*\w+\s)(\{)', + bygroups(Keyword, Name.Variable.Global, Punctuation), 'probe'), + (r'(acl\s)(\s*\w+\s)(\{)', + bygroups(Keyword, Name.Variable.Global, Punctuation), 'acl'), + (r'(vcl )(4.0)(;)$', + bygroups(Keyword.Reserved, Name.Constant, Punctuation)), + (r'(sub\s+)([a-zA-Z]\w*)(\s*\{)', + bygroups(Keyword, Name.Function, Punctuation)), + (r'([a-zA-Z_]\w*)' + r'(\.)' + r'([a-zA-Z_]\w*)' + r'(\s*\(.*\))', + bygroups(Name.Function, Punctuation, Name.Function, using(this))), + (r'[a-zA-Z_]\w*', Name), + ], + 'comment': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline), + ], + 'comments': [ + (r'#.*$', Comment), + (r'/\*', Comment.Multiline, 'comment'), + (r'//.*$', Comment), + ], + 'string': [ + (r'"', String, '#pop'), + (r'[^"\n]+', String), # all other characters + ], + 'multistring': [ + (r'[^"}]', String), + (r'"\}', String, '#pop'), + (r'["}]', String), + ], + 'whitespace': [ + (r'L?"', String, 'string'), + (r'\{"', String, 'multistring'), + (r'\n', Text), + (r'\s+', Text), + (r'\\\n', Text), # line continuation + ], + 'root': [ + include('whitespace'), + include('comments'), + include('statements'), + (r'\s+', Text), + ], + } + + +class VCLSnippetLexer(VCLLexer): + """ + For Varnish Configuration Language snippets. + + .. versionadded:: 2.2 + """ + name = 'VCLSnippets' + aliases = ['vclsnippets', 'vclsnippet'] + mimetypes = ['text/x-vclsnippet'] + filenames = [] + + def analyse_text(text): + # override method inherited from VCLLexer + return 0 + + tokens = { + 'snippetspre': [ + (r'\.\.\.+', Comment), + (r'(bereq|req|req_top|resp|beresp|obj|client|server|local|remote|' + r'storage)($|\.\*)', Name.Variable), + ], + 'snippetspost': [ + (r'(backend)\b', Keyword.Reserved), + ], + 'root': [ + include('snippetspre'), + inherit, + include('snippetspost'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/verification.py b/contrib/python/Pygments/py3/pygments/lexers/verification.py index 5a502efb47..2d473ae812 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/verification.py +++ b/contrib/python/Pygments/py3/pygments/lexers/verification.py @@ -1,113 +1,113 @@ -""" - pygments.lexers.verification - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for Intermediate Verification Languages (IVLs). - +""" + pygments.lexers.verification + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Intermediate Verification Languages (IVLs). + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, include, words -from pygments.token import Comment, Operator, Keyword, Name, Number, \ + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, words +from pygments.token import Comment, Operator, Keyword, Name, Number, \ Punctuation, Text, Generic - -__all__ = ['BoogieLexer', 'SilverLexer'] - - -class BoogieLexer(RegexLexer): - """ - For `Boogie <https://boogie.codeplex.com/>`_ source code. - - .. versionadded:: 2.1 - """ - name = 'Boogie' - aliases = ['boogie'] - filenames = ['*.bpl'] - - tokens = { - 'root': [ - # Whitespace and Comments + +__all__ = ['BoogieLexer', 'SilverLexer'] + + +class BoogieLexer(RegexLexer): + """ + For `Boogie <https://boogie.codeplex.com/>`_ source code. + + .. versionadded:: 2.1 + """ + name = 'Boogie' + aliases = ['boogie'] + filenames = ['*.bpl'] + + tokens = { + 'root': [ + # Whitespace and Comments (r'\n', Text), (r'\s+', Text), (r'\\\n', Text), # line continuation - (r'//[/!](.*?)\n', Comment.Doc), - (r'//(.*?)\n', Comment.Single), - (r'/\*', Comment.Multiline, 'comment'), - - (words(( - 'axiom', 'break', 'call', 'ensures', 'else', 'exists', 'function', - 'forall', 'if', 'invariant', 'modifies', 'procedure', 'requires', - 'then', 'var', 'while'), - suffix=r'\b'), Keyword), - (words(('const',), suffix=r'\b'), Keyword.Reserved), - - (words(('bool', 'int', 'ref'), suffix=r'\b'), Keyword.Type), - include('numbers'), - (r"(>=|<=|:=|!=|==>|&&|\|\||[+/\-=>*<\[\]])", Operator), + (r'//[/!](.*?)\n', Comment.Doc), + (r'//(.*?)\n', Comment.Single), + (r'/\*', Comment.Multiline, 'comment'), + + (words(( + 'axiom', 'break', 'call', 'ensures', 'else', 'exists', 'function', + 'forall', 'if', 'invariant', 'modifies', 'procedure', 'requires', + 'then', 'var', 'while'), + suffix=r'\b'), Keyword), + (words(('const',), suffix=r'\b'), Keyword.Reserved), + + (words(('bool', 'int', 'ref'), suffix=r'\b'), Keyword.Type), + include('numbers'), + (r"(>=|<=|:=|!=|==>|&&|\|\||[+/\-=>*<\[\]])", Operator), (r'\{.*?\}', Generic.Emph), #triggers - (r"([{}():;,.])", Punctuation), - # Identifier - (r'[a-zA-Z_]\w*', Name), - ], - 'comment': [ - (r'[^*/]+', Comment.Multiline), - (r'/\*', Comment.Multiline, '#push'), - (r'\*/', Comment.Multiline, '#pop'), - (r'[*/]', Comment.Multiline), - ], - 'numbers': [ - (r'[0-9]+', Number.Integer), - ], - } - - -class SilverLexer(RegexLexer): - """ - For `Silver <https://bitbucket.org/viperproject/silver>`_ source code. - - .. versionadded:: 2.2 - """ - name = 'Silver' - aliases = ['silver'] - filenames = ['*.sil', '*.vpr'] - - tokens = { - 'root': [ - # Whitespace and Comments + (r"([{}():;,.])", Punctuation), + # Identifier + (r'[a-zA-Z_]\w*', Name), + ], + 'comment': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline), + ], + 'numbers': [ + (r'[0-9]+', Number.Integer), + ], + } + + +class SilverLexer(RegexLexer): + """ + For `Silver <https://bitbucket.org/viperproject/silver>`_ source code. + + .. versionadded:: 2.2 + """ + name = 'Silver' + aliases = ['silver'] + filenames = ['*.sil', '*.vpr'] + + tokens = { + 'root': [ + # Whitespace and Comments (r'\n', Text), (r'\s+', Text), (r'\\\n', Text), # line continuation - (r'//[/!](.*?)\n', Comment.Doc), - (r'//(.*?)\n', Comment.Single), - (r'/\*', Comment.Multiline, 'comment'), - - (words(( - 'result', 'true', 'false', 'null', 'method', 'function', - 'predicate', 'program', 'domain', 'axiom', 'var', 'returns', + (r'//[/!](.*?)\n', Comment.Doc), + (r'//(.*?)\n', Comment.Single), + (r'/\*', Comment.Multiline, 'comment'), + + (words(( + 'result', 'true', 'false', 'null', 'method', 'function', + 'predicate', 'program', 'domain', 'axiom', 'var', 'returns', 'field', 'define', 'fold', 'unfold', 'inhale', 'exhale', 'new', 'assert', - 'assume', 'goto', 'while', 'if', 'elseif', 'else', 'fresh', - 'constraining', 'Seq', 'Set', 'Multiset', 'union', 'intersection', - 'setminus', 'subset', 'unfolding', 'in', 'old', 'forall', 'exists', - 'acc', 'wildcard', 'write', 'none', 'epsilon', 'perm', 'unique', - 'apply', 'package', 'folding', 'label', 'forperm'), - suffix=r'\b'), Keyword), + 'assume', 'goto', 'while', 'if', 'elseif', 'else', 'fresh', + 'constraining', 'Seq', 'Set', 'Multiset', 'union', 'intersection', + 'setminus', 'subset', 'unfolding', 'in', 'old', 'forall', 'exists', + 'acc', 'wildcard', 'write', 'none', 'epsilon', 'perm', 'unique', + 'apply', 'package', 'folding', 'label', 'forperm'), + suffix=r'\b'), Keyword), (words(('requires', 'ensures', 'invariant'), suffix=r'\b'), Name.Decorator), (words(('Int', 'Perm', 'Bool', 'Ref', 'Rational'), suffix=r'\b'), Keyword.Type), - include('numbers'), - (r'[!%&*+=|?:<>/\-\[\]]', Operator), + include('numbers'), + (r'[!%&*+=|?:<>/\-\[\]]', Operator), (r'\{.*?\}', Generic.Emph), #triggers - (r'([{}():;,.])', Punctuation), - # Identifier - (r'[\w$]\w*', Name), - ], - 'comment': [ - (r'[^*/]+', Comment.Multiline), - (r'/\*', Comment.Multiline, '#push'), - (r'\*/', Comment.Multiline, '#pop'), - (r'[*/]', Comment.Multiline), - ], - 'numbers': [ - (r'[0-9]+', Number.Integer), - ], - } + (r'([{}():;,.])', Punctuation), + # Identifier + (r'[\w$]\w*', Name), + ], + 'comment': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline), + ], + 'numbers': [ + (r'[0-9]+', Number.Integer), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/webmisc.py b/contrib/python/Pygments/py3/pygments/lexers/webmisc.py index 7f91160a2e..b1fd455525 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webmisc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webmisc.py @@ -360,10 +360,10 @@ class XQueryLexer(ExtendedRegexLexer): bygroups(Keyword, Text, Keyword), 'itemtype'), (r'(treat)(\s+)(as)\b', bygroups(Keyword, Text, Keyword), 'itemtype'), - (r'(case)(\s+)(' + stringdouble + ')', - bygroups(Keyword, Text, String.Double), 'itemtype'), - (r'(case)(\s+)(' + stringsingle + ')', - bygroups(Keyword, Text, String.Single), 'itemtype'), + (r'(case)(\s+)(' + stringdouble + ')', + bygroups(Keyword, Text, String.Double), 'itemtype'), + (r'(case)(\s+)(' + stringsingle + ')', + bygroups(Keyword, Text, String.Single), 'itemtype'), (r'(case|as)\b', Keyword, 'itemtype'), (r'(\))(\s*)(as)', bygroups(Punctuation, Text, Keyword), 'itemtype'), @@ -371,8 +371,8 @@ class XQueryLexer(ExtendedRegexLexer): (r'(for|let|previous|next)(\s+)(\$)', bygroups(Keyword, Text, Name.Variable), 'varname'), (r'(for)(\s+)(tumbling|sliding)(\s+)(window)(\s+)(\$)', - bygroups(Keyword, Text, Keyword, Text, Keyword, Text, Name.Variable), - 'varname'), + bygroups(Keyword, Text, Keyword, Text, Keyword, Text, Name.Variable), + 'varname'), # (r'\)|\?|\]', Punctuation, '#push'), (r'\)|\?|\]', Punctuation), (r'(empty)(\s+)(greatest|least)', bygroups(Keyword, Text, Keyword)), @@ -422,25 +422,25 @@ class XQueryLexer(ExtendedRegexLexer): (r'preserve|no-preserve', Keyword), (r',', Punctuation), ], - 'annotationname': [ + 'annotationname': [ (r'\(:', Comment, 'comment'), (qname, Name.Decorator), (r'(\()(' + stringdouble + ')', bygroups(Punctuation, String.Double)), (r'(\()(' + stringsingle + ')', bygroups(Punctuation, String.Single)), - (r'(\,)(\s+)(' + stringdouble + ')', - bygroups(Punctuation, Text, String.Double)), - (r'(\,)(\s+)(' + stringsingle + ')', - bygroups(Punctuation, Text, String.Single)), + (r'(\,)(\s+)(' + stringdouble + ')', + bygroups(Punctuation, Text, String.Double)), + (r'(\,)(\s+)(' + stringsingle + ')', + bygroups(Punctuation, Text, String.Single)), (r'\)', Punctuation), (r'(\s+)(\%)', bygroups(Text, Name.Decorator), 'annotationname'), - (r'(\s+)(variable)(\s+)(\$)', - bygroups(Text, Keyword.Declaration, Text, Name.Variable), 'varname'), - (r'(\s+)(function)(\s+)', - bygroups(Text, Keyword.Declaration, Text), 'root') + (r'(\s+)(variable)(\s+)(\$)', + bygroups(Text, Keyword.Declaration, Text, Name.Variable), 'varname'), + (r'(\s+)(function)(\s+)', + bygroups(Text, Keyword.Declaration, Text), 'root') ], 'varname': [ (r'\(:', Comment, 'comment'), - (r'(' + qname + r')(\()?', bygroups(Name, Punctuation), 'operator'), + (r'(' + qname + r')(\()?', bygroups(Name, Punctuation), 'operator'), ], 'singletype': [ include('whitespace'), @@ -482,10 +482,10 @@ class XQueryLexer(ExtendedRegexLexer): bygroups(Keyword, Text, Keyword), 'singletype'), (r'(treat)(\s+)(as)', bygroups(Keyword, Text, Keyword)), (r'(instance)(\s+)(of)', bygroups(Keyword, Text, Keyword)), - (r'(case)(\s+)(' + stringdouble + ')', - bygroups(Keyword, Text, String.Double), 'itemtype'), - (r'(case)(\s+)(' + stringsingle + ')', - bygroups(Keyword, Text, String.Single), 'itemtype'), + (r'(case)(\s+)(' + stringdouble + ')', + bygroups(Keyword, Text, String.Double), 'itemtype'), + (r'(case)(\s+)(' + stringsingle + ')', + bygroups(Keyword, Text, String.Single), 'itemtype'), (r'case|as', Keyword, 'itemtype'), (r'(\))(\s*)(as)', bygroups(Operator, Text, Keyword), 'itemtype'), (ncname + r':\*', Keyword.Type, 'operator'), @@ -645,9 +645,9 @@ class XQueryLexer(ExtendedRegexLexer): bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'), (r'(declare)(\s+)(context)(\s+)(item)', bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'), - (ncname + r':\*', Name, 'operator'), - (r'\*:'+ncname, Name.Tag, 'operator'), - (r'\*', Name.Tag, 'operator'), + (ncname + r':\*', Name, 'operator'), + (r'\*:'+ncname, Name.Tag, 'operator'), + (r'\*', Name.Tag, 'operator'), (stringdouble, String.Double, 'operator'), (stringsingle, String.Single, 'operator'), @@ -663,8 +663,8 @@ class XQueryLexer(ExtendedRegexLexer): # NAMESPACE KEYWORD (r'(declare)(\s+)(default)(\s+)(element|function)', - bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), - 'namespacekeyword'), + bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), + 'namespacekeyword'), (r'(import)(\s+)(schema|module)', bygroups(Keyword.Pseudo, Text, Keyword.Pseudo), 'namespacekeyword'), (r'(declare)(\s+)(copy-namespaces)', @@ -864,7 +864,7 @@ class QmlLexer(RegexLexer): class CirruLexer(RegexLexer): - r""" + r""" Syntax rules of Cirru can be found at: http://cirru.org/ diff --git a/contrib/python/Pygments/py3/pygments/lexers/whiley.py b/contrib/python/Pygments/py3/pygments/lexers/whiley.py index e5baab5b38..82b100bc45 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/whiley.py +++ b/contrib/python/Pygments/py3/pygments/lexers/whiley.py @@ -1,115 +1,115 @@ -""" - pygments.lexers.whiley - ~~~~~~~~~~~~~~~~~~~~~~ - - Lexers for the Whiley language. - +""" + pygments.lexers.whiley + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Whiley language. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, bygroups, words -from pygments.token import Comment, Keyword, Name, Number, Operator, \ - Punctuation, String, Text - -__all__ = ['WhileyLexer'] - - -class WhileyLexer(RegexLexer): - """ - Lexer for the Whiley programming language. - - .. versionadded:: 2.2 - """ - name = 'Whiley' - filenames = ['*.whiley'] - aliases = ['whiley'] - mimetypes = ['text/x-whiley'] - - # See the language specification: - # http://whiley.org/download/WhileyLanguageSpec.pdf - - tokens = { - 'root': [ - # Whitespace - (r'\s+', Text), - - # Comments - (r'//.*', Comment.Single), - # don't parse empty comment as doc comment - (r'/\*\*/', Comment.Multiline), - (r'(?s)/\*\*.*?\*/', String.Doc), - (r'(?s)/\*.*?\*/', Comment.Multiline), - - # Keywords - (words(( - 'if', 'else', 'while', 'for', 'do', 'return', - 'switch', 'case', 'default', 'break', 'continue', - 'requires', 'ensures', 'where', 'assert', 'assume', - 'all', 'no', 'some', 'in', 'is', 'new', - 'throw', 'try', 'catch', 'debug', 'skip', 'fail', - 'finite', 'total'), suffix=r'\b'), Keyword.Reserved), - (words(( - 'function', 'method', 'public', 'private', 'protected', - 'export', 'native'), suffix=r'\b'), Keyword.Declaration), - # "constant" & "type" are not keywords unless used in declarations - (r'(constant|type)(\s+)([a-zA-Z_]\w*)(\s+)(is)\b', - bygroups(Keyword.Declaration, Text, Name, Text, Keyword.Reserved)), - (r'(true|false|null)\b', Keyword.Constant), - (r'(bool|byte|int|real|any|void)\b', Keyword.Type), - # "from" is not a keyword unless used with import - (r'(import)(\s+)(\*)([^\S\n]+)(from)\b', - bygroups(Keyword.Namespace, Text, Punctuation, Text, Keyword.Namespace)), - (r'(import)(\s+)([a-zA-Z_]\w*)([^\S\n]+)(from)\b', - bygroups(Keyword.Namespace, Text, Name, Text, Keyword.Namespace)), - (r'(package|import)\b', Keyword.Namespace), - - # standard library: https://github.com/Whiley/WhileyLibs/ - (words(( - # types defined in whiley.lang.Int - 'i8', 'i16', 'i32', 'i64', - 'u8', 'u16', 'u32', 'u64', - 'uint', 'nat', - - # whiley.lang.Any - 'toString'), suffix=r'\b'), Name.Builtin), - - # byte literal - (r'[01]+b', Number.Bin), - - # decimal literal - (r'[0-9]+\.[0-9]+', Number.Float), - # match "1." but not ranges like "3..5" - (r'[0-9]+\.(?!\.)', Number.Float), - - # integer literal - (r'0x[0-9a-fA-F]+', Number.Hex), - (r'[0-9]+', Number.Integer), - - # character literal - (r"""'[^\\]'""", String.Char), - (r"""(')(\\['"\\btnfr])(')""", - bygroups(String.Char, String.Escape, String.Char)), - - # string literal - (r'"', String, 'string'), - - # operators and punctuation - (r'[{}()\[\],.;]', Punctuation), + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Comment, Keyword, Name, Number, Operator, \ + Punctuation, String, Text + +__all__ = ['WhileyLexer'] + + +class WhileyLexer(RegexLexer): + """ + Lexer for the Whiley programming language. + + .. versionadded:: 2.2 + """ + name = 'Whiley' + filenames = ['*.whiley'] + aliases = ['whiley'] + mimetypes = ['text/x-whiley'] + + # See the language specification: + # http://whiley.org/download/WhileyLanguageSpec.pdf + + tokens = { + 'root': [ + # Whitespace + (r'\s+', Text), + + # Comments + (r'//.*', Comment.Single), + # don't parse empty comment as doc comment + (r'/\*\*/', Comment.Multiline), + (r'(?s)/\*\*.*?\*/', String.Doc), + (r'(?s)/\*.*?\*/', Comment.Multiline), + + # Keywords + (words(( + 'if', 'else', 'while', 'for', 'do', 'return', + 'switch', 'case', 'default', 'break', 'continue', + 'requires', 'ensures', 'where', 'assert', 'assume', + 'all', 'no', 'some', 'in', 'is', 'new', + 'throw', 'try', 'catch', 'debug', 'skip', 'fail', + 'finite', 'total'), suffix=r'\b'), Keyword.Reserved), + (words(( + 'function', 'method', 'public', 'private', 'protected', + 'export', 'native'), suffix=r'\b'), Keyword.Declaration), + # "constant" & "type" are not keywords unless used in declarations + (r'(constant|type)(\s+)([a-zA-Z_]\w*)(\s+)(is)\b', + bygroups(Keyword.Declaration, Text, Name, Text, Keyword.Reserved)), + (r'(true|false|null)\b', Keyword.Constant), + (r'(bool|byte|int|real|any|void)\b', Keyword.Type), + # "from" is not a keyword unless used with import + (r'(import)(\s+)(\*)([^\S\n]+)(from)\b', + bygroups(Keyword.Namespace, Text, Punctuation, Text, Keyword.Namespace)), + (r'(import)(\s+)([a-zA-Z_]\w*)([^\S\n]+)(from)\b', + bygroups(Keyword.Namespace, Text, Name, Text, Keyword.Namespace)), + (r'(package|import)\b', Keyword.Namespace), + + # standard library: https://github.com/Whiley/WhileyLibs/ + (words(( + # types defined in whiley.lang.Int + 'i8', 'i16', 'i32', 'i64', + 'u8', 'u16', 'u32', 'u64', + 'uint', 'nat', + + # whiley.lang.Any + 'toString'), suffix=r'\b'), Name.Builtin), + + # byte literal + (r'[01]+b', Number.Bin), + + # decimal literal + (r'[0-9]+\.[0-9]+', Number.Float), + # match "1." but not ranges like "3..5" + (r'[0-9]+\.(?!\.)', Number.Float), + + # integer literal + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'[0-9]+', Number.Integer), + + # character literal + (r"""'[^\\]'""", String.Char), + (r"""(')(\\['"\\btnfr])(')""", + bygroups(String.Char, String.Escape, String.Char)), + + # string literal + (r'"', String, 'string'), + + # operators and punctuation + (r'[{}()\[\],.;]', Punctuation), (r'[+\-*/%&|<>^!~@=:?' - # unicode operators + # unicode operators r'\u2200\u2203\u2205\u2282\u2286\u2283\u2287' r'\u222A\u2229\u2264\u2265\u2208\u2227\u2228' r']', Operator), - - # identifier - (r'[a-zA-Z_]\w*', Name), - ], - 'string': [ - (r'"', String, '#pop'), - (r'\\[btnfr]', String.Escape), - (r'\\u[0-9a-fA-F]{4}', String.Escape), - (r'\\.', String), - (r'[^\\"]+', String), - ], - } + + # identifier + (r'[a-zA-Z_]\w*', Name), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\[btnfr]', String.Escape), + (r'\\u[0-9a-fA-F]{4}', String.Escape), + (r'\\.', String), + (r'[^\\"]+', String), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/xorg.py b/contrib/python/Pygments/py3/pygments/lexers/xorg.py index 2bab102b76..490b7c1d18 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/xorg.py +++ b/contrib/python/Pygments/py3/pygments/lexers/xorg.py @@ -1,36 +1,36 @@ -""" - pygments.lexers.xorg - ~~~~~~~~~~~~~~~~~~~~ - - Lexers for Xorg configs. - +""" + pygments.lexers.xorg + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for Xorg configs. + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, bygroups -from pygments.token import Comment, String, Name, Text - -__all__ = ['XorgLexer'] - - -class XorgLexer(RegexLexer): - """Lexer for xorg.conf file.""" - name = 'Xorg' - aliases = ['xorg.conf'] - filenames = ['xorg.conf'] - mimetypes = [] - - tokens = { - 'root': [ - (r'\s+', Text), - (r'#.*$', Comment), - - (r'((?:Sub)?Section)(\s+)("\w+")', - bygroups(String.Escape, Text, String.Escape)), + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups +from pygments.token import Comment, String, Name, Text + +__all__ = ['XorgLexer'] + + +class XorgLexer(RegexLexer): + """Lexer for xorg.conf file.""" + name = 'Xorg' + aliases = ['xorg.conf'] + filenames = ['xorg.conf'] + mimetypes = [] + + tokens = { + 'root': [ + (r'\s+', Text), + (r'#.*$', Comment), + + (r'((?:Sub)?Section)(\s+)("\w+")', + bygroups(String.Escape, Text, String.Escape)), (r'(End(?:Sub)?Section)', String.Escape), - - (r'(\w+)(\s+)([^\n#]+)', - bygroups(Name.Builtin, Text, Name.Constant)), - ], - } + + (r'(\w+)(\s+)([^\n#]+)', + bygroups(Name.Builtin, Text, Name.Constant)), + ], + } |