'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){d.defineMode("apl",function(){var d={".":"innerProduct","\\":"scan","/":"reduce","\u233f":"reduce1Axis","\u2340":"scan1Axis","\u00a8":"each","\u2363":"power"},e={"+":["conjugate","add"],"\u2212":["negate","subtract"],"\u00d7":["signOf","multiply"],"\u00f7":["reciprocal","divide"],"\u2308":["ceiling",
"greaterOf"],"\u230a":["floor","lesserOf"],"\u2223":["absolute","residue"],"\u2373":["indexGenerate","indexOf"],"?":["roll","deal"],"\u22c6":["exponentiate","toThePowerOf"],"\u235f":["naturalLog","logToTheBase"],"\u25cb":["piTimes","circularFuncs"],"!":["factorial","binomial"],"\u2339":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"\u2264":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"\u2265":[null,"greaterThanOrEqual"],"\u2260":[null,"notEqual"],"\u2261":["depth",
"match"],"\u2262":[null,"notMatch"],"\u2208":["enlist","membership"],"\u2377":[null,"find"],"\u222a":["unique","union"],"\u2229":[null,"intersection"],"\u223c":["not","without"],"\u2228":[null,"or"],"\u2227":[null,"and"],"\u2371":[null,"nor"],"\u2372":[null,"nand"],"\u2374":["shapeOf","reshape"],",":["ravel","catenate"],"\u236a":[null,"firstAxisCatenate"],"\u233d":["reverse","rotate"],"\u2296":["axis1Reverse","axis1Rotate"],"\u2349":["transpose",null],"\u2191":["first","take"],"\u2193":[null,"drop"],
"\u2282":["enclose","partitionWithAxis"],"\u2283":["diclose","pick"],"\u2337":[null,"index"],"\u234b":["gradeUp",null],"\u2352":["gradeDown",null],"\u22a4":["encode",null],"\u22a5":["decode",null],"\u2355":["format","formatByExample"],"\u234e":["execute",null],"\u22a3":["stop","left"],"\u22a2":["pass","right"]},f=/[\.\/\u233f\u2340\u00a8\u2363]/,g=/\u236c/,h=/[\+\u2212\u00d7\u00f7\u2308\u230a\u2223\u2373\?\u22c6\u235f\u25cb!\u2339<\u2264=>\u2265\u2260\u2261\u2262\u2208\u2377\u222a\u2229\u223c\u2228\u2227\u2371\u2372\u2374,\u236a\u233d\u2296\u2349\u2191\u2193\u2282\u2283\u2337\u234b\u2352\u22a4\u22a5\u2355\u234e\u22a3\u22a2]/,
k=/\u2190/,l=/[\u235d#].*$/,m=function(b){var c=!1;return function(a){c=a;return a===b?"\\"===c:!0}};return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(b,c){if(b.eatSpace())return null;var a=b.next();if('"'===a||"'"===a)return b.eatWhile(m(a)),b.next(),c.prev=!0,"string";if(/[\[{\(]/.test(a))return c.prev=!1,null;if(/[\]}\)]/.test(a))return c.prev=!0,null;if(g.test(a))return c.prev=!1,"niladic";if(/[\u00af\d]/.test(a))return c.func?(c.func=!1,c.prev=!1):
c.prev=!0,b.eatWhile(/[\w\.]/),"number";if(f.test(a))return"operator apl-"+d[a];if(k.test(a))return"apl-arrow";if(h.test(a))return b="apl-",null!=e[a]&&(b=c.prev?b+e[a][1]:b+e[a][0]),c.func=!0,c.prev=!1,"function "+b;if(l.test(a))return b.skipToEnd(),"comment";if("\u2218"===a&&"."===b.peek())return b.next(),"function jot-dot";b.eatWhile(/[\w\$_]/);c.prev=!0;return"keyword"}}});d.defineMIME("text/apl","apl")});
