var e=/^-+$/,t=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,n=/^[\w+.-]+@[\w.-]+/,r={name:`rpmchanges`,token:function(r){return r.sol()&&(r.match(e)||r.match(t))?`tag`:r.match(n)?`string`:(r.next(),null)}},i=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,a=/^[a-zA-Z0-9()]+:/,o=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,s=/^%(ifnarch|ifarch|if)/,c=/^%(else|endif)/,l=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/,u={name:`rpmspec`,startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(e,t){if(e.peek()==`#`)return e.skipToEnd(),`comment`;if(e.sol()){if(e.match(a))return`header`;if(e.match(o))return`atom`}if(e.match(/^\$\w+/)||e.match(/^\$\{\w+\}/))return`def`;if(e.match(c))return`keyword`;if(e.match(s))return t.controlFlow=!0,`keyword`;if(t.controlFlow){if(e.match(l))return`operator`;if(e.match(/^(\d+)/))return`number`;e.eol()&&(t.controlFlow=!1)}if(e.match(i))return e.eol()&&(t.controlFlow=!1),`number`;if(e.match(/^%[\w]+/))return e.match(`(`)&&(t.macroParameters=!0),`keyword`;if(t.macroParameters){if(e.match(/^\d+/))return`number`;if(e.match(`)`))return t.macroParameters=!1,`keyword`}return e.match(/^%\{\??[\w \-\:\!]+\}/)?(e.eol()&&(t.controlFlow=!1),`def`):(e.next(),null)}};export{r as rpmChanges,u as rpmSpec};