var i=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/,a=/[\|\!\+\-\*\?\~\^\&]/,c=/^(OR|AND|NOT|TO)$/;function k(n){return parseFloat(n).toString()===n}function s(n){return function(t,e){for(var r=!1,u;(u=t.next())!=null&&!(u==n&&!r);)r=!r&&u=="\\";return r||(e.tokenize=o),"string"}}function f(n){return function(t,e){return n=="|"?t.eat(/\|/):n=="&"&&t.eat(/\&/),e.tokenize=o,"operator"}}function l(n){return function(t,e){for(var r=n;(n=t.peek())&&n.match(i)!=null;)r+=t.next();return e.tokenize=o,c.test(r)?"operator":k(r)?"number":t.peek()==":"?"propertyName":"string"}}function o(n,t){var e=n.next();return e=='"'?t.tokenize=s(e):a.test(e)?t.tokenize=f(e):i.test(e)&&(t.tokenize=l(e)),t.tokenize==o?null:t.tokenize(n,t)}const z={name:"solr",startState:function(){return{tokenize:o}},token:function(n,t){return n.eatSpace()?null:t.tokenize(n,t)}};export{z as solr};
