mirror of
https://github.com/cheat/cheat.git
synced 2024-11-18 09:50:39 +01:00
98 lines
32 KiB
XML
98 lines
32 KiB
XML
|
<lexer>
|
||
|
<config>
|
||
|
<name>Scilab</name>
|
||
|
<alias>scilab</alias>
|
||
|
<filename>*.sci</filename>
|
||
|
<filename>*.sce</filename>
|
||
|
<filename>*.tst</filename>
|
||
|
<mime_type>text/scilab</mime_type>
|
||
|
</config>
|
||
|
<rules>
|
||
|
<state name="root">
|
||
|
<rule pattern="//.*?$">
|
||
|
<token type="CommentSingle"/>
|
||
|
</rule>
|
||
|
<rule pattern="^\s*function">
|
||
|
<token type="Keyword"/>
|
||
|
<push state="deffunc"/>
|
||
|
</rule>
|
||
|
<rule pattern="(unwind_protect_cleanup|end_unwind_protect|unwind_protect|end_try_catch|endproperties|endclassdef|endfunction|persistent|properties|endmethods|otherwise|endevents|endswitch|__FILE__|continue|classdef|__LINE__|endwhile|function|methods|elseif|return|static|events|global|endfor|switch|until|endif|while|catch|break|case|else|set|end|try|for|get|do|if)\b">
|
||
|
<token type="Keyword"/>
|
||
|
</rule>
|
||
|
<rule pattern="(gencompilationflags_unix|neldermead_defaultoutput|optimbase_isinnonlincons|tbx_builder_gateway_lang|optimbase_hasconstraints|getinstalledlookandfeels|tbx_build_gateway_loader|xcosValidateCompareBlock|assert_checkalmostequal|optimsimplex_deltafvmax|optimsimplex_gradientfv|tbx_build_gateway_clean|add_module_help_chapter|optimsimplex_fvvariance|optimsimplex_compsomefv|del_module_help_chapter|saveconsecutivecommands|removeModulePreferences|xcosPalGenerateAllIcons|get_absolute_file_path|%Block_xcosUpdateBlock|optimbase_checkcostfun|nyquistfrequencybounds|with_modelica_compiler|optimsimplex_computefv|assert_checkfilesequal|tbx_build_localization|formatSgridDampingTip|block_parameter_error|xcosConfigureModelica|formatNicholsPhaseTip|addlocalizationdomain|optimbase_checkbounds|scicos_workspace_init|formatZgridDampingTip|neldermead_updatesimp|optimbase_logshutdown|optimsimplex_setallfv|xcosSimulationStarted|datatipSetOrientation|extract_help_examples|tbx_builder_help_lang|arobasestring2strings|initial_scicos_tables|optimsimplex_getallfv|fire_closing_finished|atomsGetInstalledPath|tbx_build_help_loader|assert_cond2reqdigits|nmplot_simplexhistory|assert_comparecomplex|optimsimplex_setnbve|assert_computedigits|optimsimplex_getallx|optimsimplex_fvstdev|optimsimplex_deltafv|optimsimplex_setallx|xcosConfigureXmlFile|optimbase_isfeasible|parallel_concurrency|output_nsga2_default|addModulePreferences|xcosValidateBlockSet|compute_initial_temp|crossover_ga_default|optimsimplex_destroy|optimsimplex_reflect|devtools_run_builder|selection_ga_elitist|xcosShowBlockWarning|optimbase_isinbounds|formatNicholsGainTip|jallowClassReloading|detectmsifort64tools|demo_function_choice|optimbase_logstartup|optimsimplex_getnbve|%H5Object_fieldnames|tbx_builder_src_lang|neldermead_configure|createXConfiguration|tbx_build_pal_loader|optimsimplex_dirmat|optimsimplex_fvmean|output_nsga_default|crossover_ga_binary|getPreferencesValue|formatHallModuleTip|getrelativefilename|output_moga_default|optimbase_configure|atomsRepositoryList|xcosPalGenerateIcon|accept_func_default|xcosDiagramToScilab|optimbase_hasbounds|find_scicos_version|fftwlibraryisloaded|optimsimplex_setall|optimbase_hasnlcons|optimbase_outstruct|mutation_ga_default|optimsimplex_shrink|neldermead_function|tbx_generate_pofile|setPreferencesValue|selection_ga_random|matfile_varreadnext|importScicosDiagram|tbx_builder_gateway|optimsimplex_center|optimsimplex_getall|optimbase_terminate|optimbase_proj2bnds|optimbase_outputcmd|findmsifortcompiler|generateBlockImages|getvariablesonstack|getdefaultlanguage|formatBodePhaseTip|nmplot_historyplot|formatHallPhaseTip|formatPhaseplotTip|coding_ga_identity|xcosCodeGeneration|formatSgridFreqTip|xcosBlockInterface|formatZgridFreqTip|generateBlockImage|saveafterncommands|optimsimplex_setve|scicos_debug_count|setdefaultlanguage|neldermead_restart|get_scicos_version|atomsGetLoadedPath|with_macros_source|atomsRestoreConfig|optimbase_function|assert_cond2reltol|datatipManagerMode|optimsimplex_setfv|optimsimplex_getfv|atomsRepositoryDel|xcosPalCategoryAdd|system_getproperty|system_setproperty|mutation_ga_binary|atomsRepositoryAdd|optimsimplex_check|ilib_gen_Make_unix|optimbase_incriter|%XMLList_i_XMLList|%XMLList_i_XMLElem|neldermead_destroy|%XMLElem_i_XMLList|%XMLElem_i_XMLElem|demo_folder_choice|tbx_builder_macros|optimplotfunccount|disposefftwlibrary|neigh_func_default|optimsimplex_getve|%XMLAttr_i_XMLElem|%hmS_k_hmS_generic|fftw_forget_wisdom|assert_checkequal|optimsimplex_getx|optimbase_stoplog|atomsGetInstalled|detectmsvc64tools|importXcosDiagram|%XMLDoc_i_XMLList|%XMLElem_i_XMLDoc|optimsimplex_setn|atomsAutoloadList|atomsSystemUpdate|optimsimplex_getn|number_properties|neldermead_search|ilib_include_flag|optimsimplex_setx|firstnonsingleton|getcallbackobject|x_choose_modeless|optimbase_histset|atomsCategoryList|optimbase_histget|recompilefunction|datatipSetDisplay|optimbase_destroy|check_modules_xml|pointer_xproperty|optimbase_checkx0|formatGainplotTip|csvStringToDouble|jconvMatrixMethod|optimsimplex_sort|getscilabkeywords|removelinehistory|op
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(differential_equationlib|compatibility_functilib|elementary_functionslib|simulated_annealinglib|genetic_algorithmslib|development_toolslib|signal_processinglib|special_functionslib|external_objectslib|modules_managerlib|data_structureslib|linear_algebralib|interpolationlib|output_streamlib|dynamic_linklib|optimizationlib|scicos_utilslib|optimsimplexlib|spreadsheetlib|scicos_autolib|preferenceslib|polynomialslib|overloadinglib|%toolboxes_dir|neldermeadlib|%modalWarning|parameterslib|demo_toolslib|statisticslib|functionslib|helptoolslib|optimbaselib|scinoteslib|%toolboxes|arnoldilib|integerlib|umfpacklib|randliblib|sparselib|assertlib|fileiolib|stringlib|tclscilib|soundlib|m2scilib|cacsdlib|atomslib|matiolib|timelib|SCIHOME|xcoslib|corelib|TMPDIR|jvoid|iolib|evoid|enull|%fftw|jnull|%nan|home|%eps|%gui|%inf|%io|%tk|SCI|PWD|%pi|fd|%z|%i|%s|%f|%t|%e|%T|%F|\$)\b">
|
||
|
<token type="NameConstant"/>
|
||
|
</rule>
|
||
|
<rule pattern="-|==|~=|<|>|<=|>=|&&|&|~|\|\|?">
|
||
|
<token type="Operator"/>
|
||
|
</rule>
|
||
|
<rule pattern="\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\">
|
||
|
<token type="Operator"/>
|
||
|
</rule>
|
||
|
<rule pattern="[\[\](){}@.,=:;]">
|
||
|
<token type="Punctuation"/>
|
||
|
</rule>
|
||
|
<rule pattern=""[^"]*"">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?<=[\w)\].])\'+">
|
||
|
<token type="Operator"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?<![\w)\].])\'">
|
||
|
<token type="LiteralString"/>
|
||
|
<push state="string"/>
|
||
|
</rule>
|
||
|
<rule pattern="(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?">
|
||
|
<token type="LiteralNumberFloat"/>
|
||
|
</rule>
|
||
|
<rule pattern="\d+[eEf][+-]?[0-9]+">
|
||
|
<token type="LiteralNumberFloat"/>
|
||
|
</rule>
|
||
|
<rule pattern="\d+">
|
||
|
<token type="LiteralNumberInteger"/>
|
||
|
</rule>
|
||
|
<rule pattern="[a-zA-Z_]\w*">
|
||
|
<token type="Name"/>
|
||
|
</rule>
|
||
|
<rule pattern=".">
|
||
|
<token type="Text"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="string">
|
||
|
<rule pattern="[^']*'">
|
||
|
<token type="LiteralString"/>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
<rule pattern=".">
|
||
|
<token type="LiteralString"/>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="deffunc">
|
||
|
<rule pattern="(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)">
|
||
|
<bygroups>
|
||
|
<token type="TextWhitespace"/>
|
||
|
<token type="Text"/>
|
||
|
<token type="TextWhitespace"/>
|
||
|
<token type="Punctuation"/>
|
||
|
<token type="TextWhitespace"/>
|
||
|
<token type="NameFunction"/>
|
||
|
<token type="Punctuation"/>
|
||
|
<token type="Text"/>
|
||
|
<token type="Punctuation"/>
|
||
|
<token type="TextWhitespace"/>
|
||
|
</bygroups>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
<rule pattern="(\s*)([a-zA-Z_]\w*)">
|
||
|
<bygroups>
|
||
|
<token type="Text"/>
|
||
|
<token type="NameFunction"/>
|
||
|
</bygroups>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
</rules>
|
||
|
</lexer>
|