function e(e){return RegExp(`^((`+e.join(`)|(`)+`))\\b`)}var t=RegExp(`^[\\+\\-\\*/&|\\^~<>!@'\\\\]`),n=RegExp(`^[\\(\\[\\{\\},:=;\\.]`),r=RegExp(`^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))`),i=RegExp(`^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))`),a=RegExp(`^((>>=)|(<<=))`),o=RegExp(`^[\\]\\)]`),s=RegExp(`^[_A-Za-z¡-][_A-Za-z0-9¡-]*`),c=e(`error.eval.function.abs.acos.atan.asin.cos.cosh.exp.log.prod.sum.log10.max.min.sign.sin.sinh.sqrt.tan.reshape.break.zeros.default.margin.round.ones.rand.syn.ceil.floor.size.clear.zeros.eye.mean.std.cov.det.eig.inv.norm.rank.trace.expm.logm.sqrtm.linspace.plot.title.xlabel.ylabel.legend.text.grid.meshgrid.mesh.num2str.fft.ifft.arrayfun.cellfun.input.fliplr.flipud.ismember`.split(`.`)),l=e(`return.case.switch.else.elseif.end.endif.endfunction.if.otherwise.do.for.while.try.catch.classdef.properties.events.methods.global.persistent.endfor.endwhile.printf.sprintf.disp.until.continue.pkg`.split(`.`));function u(e,t){return!e.sol()&&e.peek()===`'`?(e.next(),t.tokenize=f,`operator`):(t.tokenize=f,f(e,t))}function d(e,t){return e.match(/^.*%}/)?(t.tokenize=f,`comment`):(e.skipToEnd(),`comment`)}function f(p,m){if(p.eatSpace())return null;if(p.match(`%{`))return m.tokenize=d,p.skipToEnd(),`comment`;if(p.match(/^[%#]/))return p.skipToEnd(),`comment`;if(p.match(/^[0-9\.+-]/,!1)){if(p.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return p.tokenize=f,`number`;if(p.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)||p.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return`number`}if(p.match(e([`nan`,`NaN`,`inf`,`Inf`])))return`number`;var h=p.match(/^"(?:[^"]|"")*("|$)/)||p.match(/^'(?:[^']|'')*('|$)/);return h?h[1]?`string`:`error`:p.match(l)?`keyword`:p.match(c)?`builtin`:p.match(s)?`variable`:p.match(t)||p.match(r)?`operator`:p.match(n)||p.match(i)||p.match(a)?null:p.match(o)?(m.tokenize=u,null):(p.next(),`error`)}var p={name:`octave`,startState:function(){return{tokenize:f}},token:function(e,t){var n=t.tokenize(e,t);return(n===`number`||n===`variable`)&&(t.tokenize=u),n},languageData:{commentTokens:{line:`%`}}};export{p as octave};