lib/rouge/lexers/mosel.rb in rouge-3.5.1 vs lib/rouge/lexers/mosel.rb in rouge-3.6.0

- old
+ new

@@ -5,11 +5,11 @@ module Lexers class Mosel < RegexLexer tag 'mosel' filenames '*.mos' title "Mosel" - desc "An optimization language used by Fico's Xpress." + desc "An optimization language used by Fico's Xpress." # http://www.fico.com/en/products/fico-xpress-optimization-suite filenames '*.mos' mimetypes 'text/x-mosel' @@ -22,50 +22,50 @@ ############################################################################################################################ # General language lements ############################################################################################################################ core_keywords = %w( - and array as - boolean break - case count counter - declarations div do dynamic - elif else end evaluation exit - false forall forward from function - if imports in include initialisations initializations integer inter is_binary is_continuous is_free is_integer is_partint is_semcont is_semint is_sos1 is_sos2 - linctr list + and array as + boolean break + case count counter + declarations div do dynamic + elif else end evaluation exit + false forall forward from function + if imports in include initialisations initializations integer inter is_binary is_continuous is_free is_integer is_partint is_semcont is_semint is_sos1 is_sos2 + linctr list max min mod model mpvar next not of options or - package parameters procedure - public prod range real record repeat requirements + package parameters procedure + public prod range real record repeat requirements set string sum then to true union until uses version while with ) - + core_functions = %w( abs arctan assert bitflip bitneg bitset bitshift bittest bitval ceil cos create currentdate currenttime cuthead cuttail delcell exists exit exp exportprob - fclose fflush finalize findfirst findlast floor fopen fselect fskipline + fclose fflush finalize findfirst findlast floor fopen fselect fskipline getact getcoeff getcoeffs getdual getfid getfirst gethead getfname getlast getobjval getparam getrcost getreadcnt getreverse getsize getslack getsol gettail gettype getvars - iseof ishidden isodd ln log - makesos1 makesos2 maxlist minlist - publish + iseof ishidden isodd ln log + makesos1 makesos2 maxlist minlist + publish random read readln reset reverse round - setcoeff sethidden setioerr setname setparam setrandseed settype sin splithead splittail sqrt strfmt substr - timestamp - unpublish + setcoeff sethidden setioerr setname setparam setrandseed settype sin splithead splittail sqrt strfmt substr + timestamp + unpublish write writeln ) - + ############################################################################################################################ # mmxprs module elements ############################################################################################################################ - + mmxprs_functions = %w( addmipsol basisstability calcsolinfo clearmipdir clearmodcut command copysoltoinit defdelayedrows defsecurevecs @@ -77,92 +77,92 @@ maximize minimize postsolve readbasis readdirs readsol refinemipsol rejectintsol repairinfeas resetbasis resetiis resetsol savebasis savemipsol savesol savestate selectsol setbstat setcallback setcbcutoff setgndata setlb setmipdir setmodcut setsol setub setucbdata stopoptimize unloadprob - writebasis writedirs writeprob writesol + writebasis writedirs writeprob writesol xor ) - + mmxpres_constants = %w(XPRS_OPT XPRS_UNF XPRS_INF XPRS_UNB XPRS_OTH) - + mmxprs_parameters = %w(XPRS_colorder XPRS_enumduplpol XPRS_enummaxsol XPRS_enumsols XPRS_fullversion XPRS_loadnames XPRS_problem XPRS_probname XPRS_verbose) - - + + ############################################################################################################################ # mmsystem module elements ############################################################################################################################ - + mmsystem_functions = %w( addmonths copytext cuttext - deltext + deltext endswith expandpath fcopy fdelete findfiles findtext fmove - getasnumber getchar getcwd getdate getday getdaynum getdays getdirsep + getasnumber getchar getcwd getdate getday getdaynum getdays getdirsep getendparse setendparse getenv getfsize getfstat getftime gethour getminute getmonth getmsec getpathsep getqtype setqtype getsecond getsepchar setsepchar getsize getstart setstart getsucc setsucc getsysinfo getsysstat gettime - gettmpdir + gettmpdir gettrim settrim getweekday getyear inserttext isvalid makedir makepath newtar newzip nextfield - openpipe + openpipe parseextn parseint parsereal parsetext pastetext pathmatch pathsplit qsort quote - readtextline regmatch regreplace removedir removefiles + readtextline regmatch regreplace removedir removefiles setchar setdate setday setenv sethour setminute setmonth setmsec setsecond settime setyear sleep startswith system tarlist textfmt tolower toupper trim untar unzip ziplist ) - + mmsystem_parameters = %w(datefmt datetimefmt monthnames sys_endparse sys_fillchar sys_pid sys_qtype sys_regcache sys_sepchar) ############################################################################################################################ # mmjobs module elements ############################################################################################################################ - + mmjobs_instance_mgmt_functions = %w( clearaliases connect disconnect findxsrvs getaliases getbanner gethostalias sethostalias ) - + mmjobs_model_mgmt_functions = %w( compile detach getannidents getannotations getexitcode getgid getid getnode getrmtid getstatus getuid load reset resetmodpar run setcontrol setdefstream setmodpar setworkdir stop unload ) - + mmjobs_synchornization_functions = %w( dropnextevent getclass getfromgid getfromid getfromuid getnextevent getvalue isqueueempty nullevent peeknextevent send setgid setuid wait waitfor ) - + mmjobs_functions = mmjobs_instance_mgmt_functions + mmjobs_model_mgmt_functions + mmjobs_synchornization_functions - + mmjobs_parameters = %w(conntmpl defaultnode fsrvdelay fsrvnbiter fsrvport jobid keepalive nodenumber parentnumber) state :whitespace do # Spaces @@ -199,25 +199,25 @@ rule %r{((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?}, Num rule %r{[~!@#\$%\^&\*\(\)\+`\-={}\[\]:;<>\?,\.\/\|\\]}, Punctuation # rule %r{'([^']|'')*'}, Str # rule %r/"(\\\\|\\"|[^"])*"/, Str - + rule %r/(true|false)\b/i, Name::Builtin rule %r/\b(#{core_keywords.join('|')})\b/i, Keyword rule %r/\b(#{core_functions.join('|')})\b/, Name::Builtin - - + + rule %r/\b(#{mmxprs_functions.join('|')})\b/, Name::Function rule %r/\b(#{mmxpres_constants.join('|')})\b/, Name::Constant rule %r/\b(#{mmxprs_parameters.join('|')})\b/i, Name::Property - + rule %r/\b(#{mmsystem_functions.join('|')})\b/i, Name::Function rule %r/\b(#{mmsystem_parameters.join('|')})\b/, Name::Property - + rule %r/\b(#{mmjobs_functions.join('|')})\b/i, Name::Function rule %r/\b(#{mmjobs_parameters.join('|')})\b/, Name::Property rule id, Name end