function a(t){return RegExp("^(("+t.join(")|(")+"))\\b","i")}var n=RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),r=RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),o=RegExp("^[\\.,:]"),c=RegExp("[()]"),m=RegExp("^[%A-Za-z][A-Za-z0-9]*"),i="break.close.do.else.for.goto.halt.hang.if.job.kill.lock.merge.new.open.quit.read.set.tcommit.trollback.tstart.use.view.write.xecute.b.c.d.e.f.g.h.i.j.k.l.m.n.o.q.r.s.tc.tro.ts.u.v.w.x".split("."),l=a("\\$ascii.\\$char.\\$data.\\$ecode.\\$estack.\\$etrap.\\$extract.\\$find.\\$fnumber.\\$get.\\$horolog.\\$io.\\$increment.\\$job.\\$justify.\\$length.\\$name.\\$next.\\$order.\\$piece.\\$qlength.\\$qsubscript.\\$query.\\$quit.\\$random.\\$reverse.\\$select.\\$stack.\\$test.\\$text.\\$translate.\\$view.\\$x.\\$y.\\$a.\\$c.\\$d.\\$e.\\$ec.\\$es.\\$et.\\$f.\\$fn.\\$g.\\$h.\\$i.\\$j.\\$l.\\$n.\\$na.\\$o.\\$p.\\$q.\\$ql.\\$qs.\\$r.\\$re.\\$s.\\$st.\\$t.\\$tr.\\$v.\\$z".split(".")),d=a(i);function s(t,e){t.sol()&&(e.label=!0,e.commandMode=0);var $=t.peek();return $==" "||$=="	"?(e.label=!1,e.commandMode==0?e.commandMode=1:(e.commandMode<0||e.commandMode==2)&&(e.commandMode=0)):$!="."&&e.commandMode>0&&($==":"?e.commandMode=-1:e.commandMode=2),($==="("||$==="	")&&(e.label=!1),$===";"?(t.skipToEnd(),"comment"):t.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":$=='"'?t.skipTo('"')?(t.next(),"string"):(t.skipToEnd(),"error"):t.match(r)||t.match(n)?"operator":t.match(o)?null:c.test($)?(t.next(),"bracket"):e.commandMode>0&&t.match(d)?"controlKeyword":t.match(l)?"builtin":t.match(m)?"variable":$==="$"||$==="^"?(t.next(),"builtin"):$==="@"?(t.next(),"string.special"):/[\w%]/.test($)?(t.eatWhile(/[\w%]/),"variable"):(t.next(),"error")}const u={name:"mumps",startState:function(){return{label:!1,commandMode:0}},token:function(t,e){var $=s(t,e);return e.label?"tag":$}};export{u as t};
