File manager - Edit - /home/opticamezl/www/newok/mathematica.tar
Back
mathematica.min.js 0000644 00000004135 15174607106 0010153 0 ustar 00 (function(a){typeof exports=="object"&&typeof module=="object"?a(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){"use strict";a.defineMode("mathematica",function(d,h){var o="[a-zA-Z\\$][a-zA-Z0-9\\$]*",l="(?:\\d+)",u="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",z="(?:\\.\\w+|\\w+\\.\\w*|\\w+)",c="(?:`(?:`?"+u+")?)",m=new RegExp("(?:"+l+"(?:\\^\\^"+z+c+"?(?:\\*\\^[+-]?\\d+)?))"),A=new RegExp("(?:"+u+c+"?(?:\\*\\^[+-]?\\d+)?)"),Z=new RegExp("(?:`?)(?:"+o+")(?:`(?:"+o+"))*(?:`?)");function f(e,n){var r;return r=e.next(),r==='"'?(n.tokenize=$,n.tokenize(e,n)):r==="("&&e.eat("*")?(n.commentLevel++,n.tokenize=v,n.tokenize(e,n)):(e.backUp(1),e.match(m,!0,!1)||e.match(A,!0,!1)?"number":e.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/,!0,!1)?"meta":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string-2":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)||e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)||e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)||e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"variable-3":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variable-2":e.match(Z,!0,!1)?"keyword":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(e.next(),"error"))}function $(e,n){for(var r,t=!1,i=!1;(r=e.next())!=null;){if(r==='"'&&!i){t=!0;break}i=!i&&r==="\\"}return t&&!i&&(n.tokenize=f),"string"}function v(e,n){for(var r,t;n.commentLevel>0&&(t=e.next())!=null;)r==="("&&t==="*"&&n.commentLevel++,r==="*"&&t===")"&&n.commentLevel--,r=t;return n.commentLevel<=0&&(n.tokenize=f),"comment"}return{startState:function(){return{tokenize:f,commentLevel:0}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},blockCommentStart:"(*",blockCommentEnd:"*)"}}),a.defineMIME("text/x-mathematica",{name:"mathematica"})}); mathematica.min.js.gz 0000644 00000001605 15174607106 0010571 0 ustar 00 � �U�r�8}߯������!;OcF��0U�ڪM�K��[$^�� � Ϸo���!�^���sN�����i��,%���Bfӎ�,2���A6�S�,��$Y���!���_y�$��nO�a�$V*S��5�HN㴤� �e�1W$�_/��m�� ���E�`��sȗ���*5�[��e�$��,��P �s"��ەP���H�^nz�_�r�P�l�s�8��7�ܛ�^ۦ� ���k�Z#а<�?���h�R��.�n7R��;�Ҙ�18/N�_l��#��UI�ޜ���@����cE����z�v��fיI�zzj���U�QL���h�T1�.��'����L��.�aS��+a@���+�&`��0K��_�J���V�D��X�+��M��IB�ڽBcv��&�C�'���e�����\#���̓�.t��w'�uP.�jF������K�$�H-���94z��D� �O�_�M����e���)�c�]�����6G>�%�)7�k�O��?���9��O"o��Yه�P���ek8����o�߷���)'���˞(Τn�ߝ�e�9����� ?�3�m���U;�p����}C��p�x�n��6�e�1_ͣ�4|l�o��磚�B*�3��|� +/�pQ;�4S�r�Y��Ƭ{5$'�.K�|��xJW��n�[ͺ��DI1+b֍-�2Ρh�D�8�:��)��xá��I#ö�\,��Ӗ��˅ �ub=j�� x�bzg���G68��r��B�{-��n���M鱰7( Z��jM���/D( ��z�L���y�>ך�eZ��4�F( ������--7���.�m*�.���7+�J`] mathematica.js 0000644 00000013011 15174607106 0007362 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/5/LICENSE // Mathematica mode copyright (c) 2015 by Calin Barbat // Based on code by Patrick Scheibe (halirutan) // See: https://github.com/halirutan/Mathematica-Source-Highlighting/tree/master/src/lang-mma.js (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.defineMode('mathematica', function(_config, _parserConfig) { // used pattern building blocks var Identifier = '[a-zA-Z\\$][a-zA-Z0-9\\$]*'; var pBase = "(?:\\d+)"; var pFloat = "(?:\\.\\d+|\\d+\\.\\d*|\\d+)"; var pFloatBase = "(?:\\.\\w+|\\w+\\.\\w*|\\w+)"; var pPrecision = "(?:`(?:`?"+pFloat+")?)"; // regular expressions var reBaseForm = new RegExp('(?:'+pBase+'(?:\\^\\^'+pFloatBase+pPrecision+'?(?:\\*\\^[+-]?\\d+)?))'); var reFloatForm = new RegExp('(?:' + pFloat + pPrecision + '?(?:\\*\\^[+-]?\\d+)?)'); var reIdInContext = new RegExp('(?:`?)(?:' + Identifier + ')(?:`(?:' + Identifier + '))*(?:`?)'); function tokenBase(stream, state) { var ch; // get next character ch = stream.next(); // string if (ch === '"') { state.tokenize = tokenString; return state.tokenize(stream, state); } // comment if (ch === '(') { if (stream.eat('*')) { state.commentLevel++; state.tokenize = tokenComment; return state.tokenize(stream, state); } } // go back one character stream.backUp(1); // look for numbers // Numbers in a baseform if (stream.match(reBaseForm, true, false)) { return 'number'; } // Mathematica numbers. Floats (1.2, .2, 1.) can have optionally a precision (`float) or an accuracy definition // (``float). Note: while 1.2` is possible 1.2`` is not. At the end an exponent (float*^+12) can follow. if (stream.match(reFloatForm, true, false)) { return 'number'; } /* In[23] and Out[34] */ if (stream.match(/(?:In|Out)\[[0-9]*\]/, true, false)) { return 'atom'; } // usage if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/, true, false)) { return 'meta'; } // message if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/, true, false)) { return 'string-2'; } // this makes a look-ahead match for something like variable:{_Integer} // the match is then forwarded to the mma-patterns tokenizer. if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/, true, false)) { return 'variable-2'; } // catch variables which are used together with Blank (_), BlankSequence (__) or BlankNullSequence (___) // Cannot start with a number, but can have numbers at any other position. Examples // blub__Integer, a1_, b34_Integer32 if (stream.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/, true, false)) { return 'variable-2'; } if (stream.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/, true, false)) { return 'variable-2'; } if (stream.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/, true, false)) { return 'variable-2'; } // Named characters in Mathematica, like \[Gamma]. if (stream.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/, true, false)) { return 'variable-3'; } // Match all braces separately if (stream.match(/(?:\[|\]|{|}|\(|\))/, true, false)) { return 'bracket'; } // Catch Slots (#, ##, #3, ##9 and the V10 named slots #name). I have never seen someone using more than one digit after #, so we match // only one. if (stream.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/, true, false)) { return 'variable-2'; } // Literals like variables, keywords, functions if (stream.match(reIdInContext, true, false)) { return 'keyword'; } // operators. Note that operators like @@ or /; are matched separately for each symbol. if (stream.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/, true, false)) { return 'operator'; } // everything else is an error stream.next(); // advance the stream. return 'error'; } function tokenString(stream, state) { var next, end = false, escaped = false; while ((next = stream.next()) != null) { if (next === '"' && !escaped) { end = true; break; } escaped = !escaped && next === '\\'; } if (end && !escaped) { state.tokenize = tokenBase; } return 'string'; }; function tokenComment(stream, state) { var prev, next; while(state.commentLevel > 0 && (next = stream.next()) != null) { if (prev === '(' && next === '*') state.commentLevel++; if (prev === '*' && next === ')') state.commentLevel--; prev = next; } if (state.commentLevel <= 0) { state.tokenize = tokenBase; } return 'comment'; } return { startState: function() {return {tokenize: tokenBase, commentLevel: 0};}, token: function(stream, state) { if (stream.eatSpace()) return null; return state.tokenize(stream, state); }, blockCommentStart: "(*", blockCommentEnd: "*)" }; }); CodeMirror.defineMIME('text/x-mathematica', { name: 'mathematica' }); });
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings