text: ﻿(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("mathematica",function(b,c){var d="[a-zA-Z\\$][a-zA-Z0-9\\$]*";var e="(?:\\d+)";var f="(?:\\.\\d+|\\d+\\.\\d*|\\d+)";var g="(?:\\.\\w+|\\w+\\.\\w*|\\w+)";var h="(?:`(?:`?"+f+")?)";var i=new RegExp("(?:"+e+"(?:\\^\\^"+g+h+"?(?:\\*\\^[+-]?\\d+)?))");var j=new RegExp("(?:"+f+h+"?(?:\\*\\^[+-]?\\d+)?)");var k=new RegExp("(?:`?)(?:"+d+")(?:`(?:"+d+"))*(?:`?)");function l(q,p){var o;o=q.next();if(o==='"'){p.tokenize=n;return p.tokenize(q,p)}if(o==="("){if(q.eat("*")){p.commentLevel++;p.tokenize=m;return p.tokenize(q,p)}}q.backUp(1);if(q.match(i,true,false)){return"number"}if(q.match(j,true,false)){return"number"}if(q.match(/(?:In|Out)\[[0-9]*\]/,true,false)){return"atom"}if(q.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::usage)/,true,false)){return"meta"}if(q.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,true,false)){return"string-2"}if(q.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,true,false)){return"variable-2"}if(q.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,true,false)){return"variable-2"}if(q.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,true,false)){return"variable-2"}if(q.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,true,false)){return"variable-2"}if(q.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,true,false)){return"variable-3"}if(q.match(/(?:\[|\]|{|}|\(|\))/,true,false)){return"bracket"}if(q.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,true,false)){return"variable-2"}if(q.match(k,true,false)){return"keyword"}if(q.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,true,false)){return"operator"}q.next();return"error"}function n(s,r){var q,o=false,p=false;while((q=s.next())!=null){if(q==='"'&&!p){o=true;break}p=!p&&q==="\\"}if(o&&!p){r.tokenize=l}return"string"}function m(r,q){var p,o;while(q.commentLevel>0&&(o=r.next())!=null){if(p==="("&&o==="*"){q.commentLevel++}if(p==="*"&&o===")"){q.commentLevel--}p=o}if(q.commentLevel<=0){q.tokenize=l}return"comment"}return{startState:function(){return{tokenize:l,commentLevel:0}},token:function(p,o){if(p.eatSpace()){return null}return o.tokenize(p,o)},blockCommentStart:"(*",blockCommentEnd:"*)"}});a.defineMIME("text/x-mathematica",{name:"mathematica"})});