Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/mode/ebnf/ebnf",["module","exports","require","../../lib/codemirror"],(function(e,t,a){var r,c=void 0;window;r=function(e){"use strict";e.defineMode("ebnf",(function(t){var a=0,r=1,c=0,n=1,i=2,o=null;return t.bracesMode&&(o=e.getMode(t,t.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(t,s){if(t){switch(0===s.stack.length&&('"'==t.peek()||"'"==t.peek()?(s.stringType=t.peek(),t.next(),s.stack.unshift(n)):t.match("/*")?(s.stack.unshift(c),s.commentType=a):t.match("(*")&&(s.stack.unshift(c),s.commentType=r)),s.stack[0]){case n:for(;s.stack[0]===n&&!t.eol();)t.peek()===s.stringType?(t.next(),s.stack.shift()):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return s.lhs?"property string":"string";case c:for(;s.stack[0]===c&&!t.eol();)s.commentType===a&&t.match("*/")||s.commentType===r&&t.match("*)")?(s.stack.shift(),s.commentType=null):t.match(/^.[^\*]*/);return"comment";case i:for(;s.stack[0]===i&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(".")||s.stack.shift();return"operator"}var m=t.peek();if(null!==o&&(s.braced||"{"===m)){null===s.localState&&(s.localState=e.startState(o));var f=o.token(t,s.localState),u=t.current();if(!f)for(var l=0;l<u.length;l++)"{"===u[l]?(0===s.braced&&(f="matchingbracket"),s.braced++):"}"===u[l]&&(s.braced--,0===s.braced&&(f="matchingbracket"));return f}switch(m){case"[":return t.next(),s.stack.unshift(i),"bracket";case":":case"|":case";":return t.next(),"operator";case"%":if(t.match("%%"))return"header";if(t.match(/[%][A-Za-z]+/))return"keyword";if(t.match(/[%][}]/))return"matchingbracket";break;case"/":if(t.match(/[\/][A-Za-z]+/))return"keyword";case"\\":if(t.match(/[\][a-z]+/))return"string-2";case".":if(t.match("."))return"atom";case"*":case"-":case"+":case"^":if(t.match(m))return"atom";case"$":if(t.match("$$"))return"builtin";if(t.match(/[$][0-9]+/))return"variable-3";case"<":if(t.match(/<<[a-zA-Z_]+>>/))return"builtin"}return t.match("//")?(t.skipToEnd(),"comment"):t.match("return")?"operator":t.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?t.match(/(?=[\(.])/)?"variable":t.match(/(?=[\s\n]*[:=])/)?"def":"variable-2":-1!=["[","]","(",")"].indexOf(t.peek())?(t.next(),"bracket"):(t.eatSpace()||t.next(),null)}}}})),e.defineMIME("text/x-ebnf","ebnf")},"object"==typeof t&&"object"==typeof e?r(a("../../lib/codemirror")):"function"==typeof c&&c.amd?c(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=ebnf.js.map