//Language: Ruby in HTML


// tokens
Token=tnone
Token=tstring
Token=tcomment
Token=tident
Token=tresword
Token=tsymbol
Token=thtmlstyle
Token=thtmlscript
Token=tentity
Token=tunknown
Token=tdoctype
Token=tXMLinstr

// tokens - ruby
Token=trbstring
Token=trbcomment
Token=trbident
Token=trbglobal
Token=trbinstance
Token=trbclassvar
Token=trbinteger
Token=trbfloat
Token=trbresword
Token=trbsymbol
Token=trbtag

// tokens - css
Token=tcssstring
Token=tcsscomment
Token=tcssinteger
Token=tcssfloat
Token=tcssresword
Token=tcssbracket
Token=tcssselector
Token=tcssproperty
Token=tcssvalue
Token=tcsssymbol
Token=tcssonelinerule
Token=tcssembedrules

// tokens - js
Token=tjsstring
Token=tjscomment
Token=tjsident
Token=tjsinteger
Token=tjsfloat
Token=tjsresword

// tokens - other
Token=turl
Token=twhitespace


// states
State=snormal
State=sstring1
State=sstring2
State=scomment1
State=stagname
State=shtmltag
State=shtmlvalue
State=shtmlCSS
State=shtmlCSSval
State=shtmlJS
State=shtmlJSval
State=shtmlRB
State=sdoctype
State=sdoctypeval
State=sxmlinstr
State=sxmlinstrval

// states - ruby
State=srbglobal
State=srbinstance
State=srbclassvar
State=srbstring1
State=srbstring2
State=srbstring3
State=srbcomment1
State=srbcomment2

// states - css
State=scssstyle
State=scssvalue
State=scssstring1
State=scssstring2
State=scsscomment1
State=scsscomment2
State=scssatonelinerule
State=scssembedrules
State=scssurl


// states - js
State=sjsnormal
State=sjsstring1
State=sjsstring2
State=sjscomment1
State=sjscomment2

//delims
Delimiters=;.,:'"{}[]()<>?!@#$%^&*-+=|\/


//Common
snormal <                          stagname    tsymbol
stagname [a-z_A-Z][a-z_A-Z0-9]*    shtmltag    tunknown
shtmltag [^\>^\'^\"^#32^\=]*       shtmltag    tident
stagname /                         stagname    tsymbol
shtmltag /                         shtmltag    tsymbol
shtmltag =                         shtmlvalue  tsymbol
shtmlvalue [^\>^#32^\=]*           shtmltag    tstring
shtmlvalue >                       snormal     tsymbol
stagname >                         snormal     tsymbol
shtmltag >                         snormal     tsymbol


//white space
snormal #32*                      snormal   twhitespace
shtmltag #32*                     shtmltag  tsymbol


//strings
shtmltag   \'                     sstring1   tstring
shtmlvalue \'                     sstring1   tstring
sstring1   [^\'^<]*               sstring1   tstring
sstring1   <[^%]                  sstring1   tstring
sstring1   \'                     shtmltag   tstring
sstring1   \'\'                   sstring1   tstring
sstring1   \\                     sstring1   tstring

shtmlvalue  \"                    sstring2   tstring
shtmltag    \"                    sstring2   tstring
sstring2   [^\"^<]*               sstring2   tstring
sstring2   <[^%]                  sstring2   tstring
sstring2   \"                     shtmltag   tstring
sstring2   \"\"                   sstring2   tstring
sstring2   \\                     sstring2   tstring


// numbers
//shtmltag [0-9][0-9]*              shtmltag  tinteger
//shtmltag \#[0-9A-F]+              shtmltag  tinteger
//shtmltag [1-9][0-9]*\.[0-9]*                    shtmltag  tfloat
//shtmltag [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmltag  tfloat


// comments
snormal   <\!--                scomment1 tcomment
scomment1 -                    scomment1 tcomment
scomment1  -->                 snormal   tcomment
scomment1 [^\-]*               scomment1 tcomment

// DOCTYPE

snormal <\!DOCTYPE                 sdoctype    tdoctype
sdoctype [^>^\"]*                  sdoctype    tdoctype
sdoctype >                         snormal     tdoctype

sdoctype  \"                       sdoctypeval  tdoctype
sdoctypeval  [^\"]*                sdoctypeval  tdoctype
sdoctypeval  \"                    sdoctype     tdoctype

// XML

snormal <?xml                       sxmlinstr    tXMLinstr
sxmlinstr [^>^\"]*                  sxmlinstr    tXMLinstr
sxmlinstr >                         snormal      tXMLinstr

sxmlinstr  \"                       sxmlinstrval  tXMLinstr
sxmlinstrval  [^\"]*                sxmlinstrval  tXMLinstr
sxmlinstrval  \"                    sxmlinstr     tXMLinstr

//reswords
//@@@HTM
stagname  'a'           shtmltag  tresword
stagname  'abbr'        shtmltag  tresword
stagname  'acronym'     shtmltag  tresword
stagname  'address'     shtmltag  tresword
stagname  'applet'      shtmltag  tresword
stagname  'area'        shtmltag  tresword
stagname  'article'     shtmltag  tresword
stagname  'aside'       shtmltag  tresword
stagname  'audio'       shtmltag  tresword
stagname  'b'           shtmltag  tresword
stagname  'base'        shtmltag  tresword
stagname  'basefont'    shtmltag  tresword
stagname  'bdo'         shtmltag  tresword
stagname  'big'         shtmltag  tresword
stagname  'blockquote'  shtmltag  tresword
stagname  'body'        shtmltag  tresword
stagname  'br'          shtmltag  tresword
stagname  'button'      shtmltag  tresword
stagname  'canvas'      shtmltag  tresword
stagname  'caption'     shtmltag  tresword
stagname  'center'      shtmltag  tresword
stagname  'cite'        shtmltag  tresword
stagname  'code'        shtmltag  tresword
stagname  'col'         shtmltag  tresword
stagname  'colgroup'    shtmltag  tresword
stagname  'command'     shtmltag  tresword
stagname  'datalist'    shtmltag  tresword
stagname  'dd'          shtmltag  tresword
stagname  'del'         shtmltag  tresword
stagname  'details'     shtmltag  tresword
stagname  'dfn'         shtmltag  tresword
stagname  'dir'         shtmltag  tresword
stagname  'div'         shtmltag  tresword
stagname  'dl'          shtmltag  tresword
stagname  'dt'          shtmltag  tresword
stagname  'em'          shtmltag  tresword
stagname  'embed'       shtmltag  tresword
stagname  'fieldset'    shtmltag  tresword
stagname  'figcaption'  shtmltag  tresword
stagname  'figure'      shtmltag  tresword
stagname  'footer'      shtmltag  tresword
stagname  'font'        shtmltag  tresword
stagname  'form'        shtmltag  tresword
stagname  'frame'       shtmltag  tresword
stagname  'frameset'    shtmltag  tresword
stagname  'h1'          shtmltag  tresword
stagname  'h2'          shtmltag  tresword
stagname  'h3'          shtmltag  tresword
stagname  'h4'          shtmltag  tresword
stagname  'h5'          shtmltag  tresword
stagname  'h6'          shtmltag  tresword
stagname  'head'        shtmltag  tresword
stagname  'header'      shtmltag  tresword
stagname  'hgroup'      shtmltag  tresword
stagname  'hr'          shtmltag  tresword
stagname  'html'        shtmltag  tresword
stagname  'i'           shtmltag  tresword
stagname  'iframe'      shtmltag  tresword
stagname  'img'         shtmltag  tresword
stagname  'input'       shtmltag  tresword
stagname  'ins'         shtmltag  tresword
stagname  'isindex'     shtmltag  tresword
stagname  'kbd'         shtmltag  tresword
stagname  'keygen'      shtmltag  tresword
stagname  'label'       shtmltag  tresword
stagname  'legend'      shtmltag  tresword
stagname  'li'          shtmltag  tresword
stagname  'link'        shtmltag  tresword
stagname  'map'         shtmltag  tresword
stagname  'mark'        shtmltag  tresword
stagname  'menu'        shtmltag  tresword
stagname  'meta'        shtmltag  tresword
stagname  'meter'       shtmltag  tresword
stagname  'nav'         shtmltag  tresword
stagname  'noframes'    shtmltag  tresword
stagname  'noscript'    shtmltag  tresword
stagname  'object'      shtmltag  tresword
stagname  'ol'          shtmltag  tresword
stagname  'optgroup'    shtmltag  tresword
stagname  'option'      shtmltag  tresword
stagname  'output'      shtmltag  tresword
stagname  'p'           shtmltag  tresword
stagname  'param'       shtmltag  tresword
stagname  'pre'         shtmltag  tresword
stagname  'progress'    shtmltag  tresword
stagname  'q'           shtmltag  tresword
stagname  'rp'          shtmltag  tresword
stagname  'rt'          shtmltag  tresword
stagname  'ruby'        shtmltag  tresword
stagname  's'           shtmltag  tresword
stagname  'samp'        shtmltag  tresword
stagname  'script'      shtmltag  tresword
stagname  'section'     shtmltag  tresword
stagname  'select'      shtmltag  tresword
stagname  'small'       shtmltag  tresword
stagname  'source'      shtmltag  tresword
stagname  'span'        shtmltag  tresword
stagname  'strike'      shtmltag  tresword
stagname  'strong'      shtmltag  tresword
stagname  'style'       shtmltag  tresword
stagname  'sub'         shtmltag  tresword
stagname  'summary'     shtmltag  tresword
stagname  'sup'         shtmltag  tresword
stagname  'table'       shtmltag  tresword
stagname  'tbody'       shtmltag  tresword
stagname  'td'          shtmltag  tresword
stagname  'textarea'    shtmltag  tresword
stagname  'tfoot'       shtmltag  tresword
stagname  'th'          shtmltag  tresword
stagname  'thead'       shtmltag  tresword
stagname  'time'        shtmltag  tresword
stagname  'title'       shtmltag  tresword
stagname  'tr'          shtmltag  tresword
stagname  'tt'          shtmltag  tresword
stagname  'u'           shtmltag  tresword
stagname  'ul'          shtmltag  tresword
stagname  'var'         shtmltag  tresword
stagname  'video'       shtmltag  tresword
stagname  'wbr'         shtmltag  tresword
//HTM@@@

// non HTML 4.01 reswords
stagname  'marquee'     shtmltag  tresword

// entities
snormal  &AElig;    snormal  tentity
snormal  &Aacute;   snormal  tentity
snormal  &Acirc;    snormal  tentity
snormal  &Agrave;   snormal  tentity
snormal  &Alpha;    snormal  tentity
snormal  &Aring;    snormal  tentity
snormal  &Atilde;   snormal  tentity
snormal  &Auml;     snormal  tentity
snormal  &Beta;     snormal  tentity
snormal  &Ccedil;   snormal  tentity
snormal  &Chi;      snormal  tentity
snormal  &Dagger;   snormal  tentity
snormal  &Delta;    snormal  tentity
snormal  &ETH;      snormal  tentity
snormal  &Eacute;   snormal  tentity
snormal  &Ecirc;    snormal  tentity
snormal  &Egrave;   snormal  tentity
snormal  &Epsilon;  snormal  tentity
snormal  &Eta;      snormal  tentity
snormal  &Euml;     snormal  tentity
snormal  &Gamma;    snormal  tentity
snormal  &Iacute;   snormal  tentity
snormal  &Icirc;    snormal  tentity
snormal  &Igrave;   snormal  tentity
snormal  &Iota;     snormal  tentity
snormal  &Iuml;     snormal  tentity
snormal  &Kappa;    snormal  tentity
snormal  &Lambda;   snormal  tentity
snormal  &Mu;       snormal  tentity
snormal  &Ntilde;   snormal  tentity
snormal  &Nu;       snormal  tentity
snormal  &OElig;    snormal  tentity
snormal  &Oacute;   snormal  tentity
snormal  &Ocirc;    snormal  tentity
snormal  &Ograve;   snormal  tentity
snormal  &Omega;    snormal  tentity
snormal  &Omicron;  snormal  tentity
snormal  &Oslash;   snormal  tentity
snormal  &Otilde;   snormal  tentity
snormal  &Ouml;     snormal  tentity
snormal  &Phi;      snormal  tentity
snormal  &Pi;       snormal  tentity
snormal  &Prime;    snormal  tentity
snormal  &Psi;      snormal  tentity
snormal  &Rho;      snormal  tentity
snormal  &Scaron;   snormal  tentity
snormal  &Sigma;    snormal  tentity
snormal  &THORN;    snormal  tentity
snormal  &Tau;      snormal  tentity
snormal  &Theta;    snormal  tentity
snormal  &Uacute;   snormal  tentity
snormal  &Ucirc;    snormal  tentity
snormal  &Ugrave;   snormal  tentity
snormal  &Upsilon;  snormal  tentity
snormal  &Uuml;     snormal  tentity
snormal  &Xi;       snormal  tentity
snormal  &Yacute;   snormal  tentity
snormal  &Yuml;     snormal  tentity
snormal  &Zeta;     snormal  tentity
snormal  &aacute;   snormal  tentity
snormal  &acirc;    snormal  tentity
snormal  &acute;    snormal  tentity
snormal  &aelig;    snormal  tentity
snormal  &agrave;   snormal  tentity
snormal  &alefsym;  snormal  tentity
snormal  &alpha;    snormal  tentity
snormal  &amp;      snormal  tentity
snormal  &and;      snormal  tentity
snormal  &ang;      snormal  tentity
snormal  &aring;    snormal  tentity
snormal  &asymp;    snormal  tentity
snormal  &atilde;   snormal  tentity
snormal  &auml;     snormal  tentity
snormal  &bdquo;    snormal  tentity
snormal  &beta;     snormal  tentity
snormal  &brvbar;   snormal  tentity
snormal  &bull;     snormal  tentity
snormal  &cap;      snormal  tentity
snormal  &ccedil;   snormal  tentity
snormal  &cedil;    snormal  tentity
snormal  &cent;     snormal  tentity
snormal  &chi;      snormal  tentity
snormal  &circ;     snormal  tentity
snormal  &clubs;    snormal  tentity
snormal  &cong;     snormal  tentity
snormal  &copy;     snormal  tentity
snormal  &crarr;    snormal  tentity
snormal  &cup;      snormal  tentity
snormal  &curren;   snormal  tentity
snormal  &dArr;     snormal  tentity
snormal  &dagger;   snormal  tentity
snormal  &darr;     snormal  tentity
snormal  &deg;      snormal  tentity
snormal  &delta;    snormal  tentity
snormal  &diams;    snormal  tentity
snormal  &divide;   snormal  tentity
snormal  &eacute;   snormal  tentity
snormal  &ecirc;    snormal  tentity
snormal  &egrave;   snormal  tentity
snormal  &empty;    snormal  tentity
snormal  &emsp;     snormal  tentity
snormal  &ensp;     snormal  tentity
snormal  &epsilon;  snormal  tentity
snormal  &equiv;    snormal  tentity
snormal  &eta;      snormal  tentity
snormal  &eth;      snormal  tentity
snormal  &euml;     snormal  tentity
snormal  &euro;     snormal  tentity
snormal  &exist;    snormal  tentity
snormal  &fnof;     snormal  tentity
snormal  &forall;   snormal  tentity
snormal  &frac12;   snormal  tentity
snormal  &frac14;   snormal  tentity
snormal  &frac34;   snormal  tentity
snormal  &frasl;    snormal  tentity
snormal  &gamma;    snormal  tentity
snormal  &ge;       snormal  tentity
snormal  &gt;       snormal  tentity
snormal  &hArr;     snormal  tentity
snormal  &harr;     snormal  tentity
snormal  &hearts;   snormal  tentity
snormal  &hellip;   snormal  tentity
snormal  &iacute;   snormal  tentity
snormal  &icirc;    snormal  tentity
snormal  &iexcl;    snormal  tentity
snormal  &igrave;   snormal  tentity
snormal  &image;    snormal  tentity
snormal  &infin;    snormal  tentity
snormal  &int;      snormal  tentity
snormal  &iota;     snormal  tentity
snormal  &iquest;   snormal  tentity
snormal  &isin;     snormal  tentity
snormal  &iuml;     snormal  tentity
snormal  &kappa;    snormal  tentity
snormal  &lArr;     snormal  tentity
snormal  &lambda;   snormal  tentity
snormal  &lang;     snormal  tentity
snormal  &laquo;    snormal  tentity
snormal  &larr;     snormal  tentity
snormal  &lceil;    snormal  tentity
snormal  &ldquo;    snormal  tentity
snormal  &le;       snormal  tentity
snormal  &lfloor;   snormal  tentity
snormal  &lowast;   snormal  tentity
snormal  &loz;      snormal  tentity
snormal  &lrm;      snormal  tentity
snormal  &lsaquo;   snormal  tentity
snormal  &lsquo;    snormal  tentity
snormal  &lt;       snormal  tentity
snormal  &macr;     snormal  tentity
snormal  &mdash;    snormal  tentity
snormal  &micro;    snormal  tentity
snormal  &middot;   snormal  tentity
snormal  &minus;    snormal  tentity
snormal  &mu;       snormal  tentity
snormal  &nabla;    snormal  tentity
snormal  &nbsp;     snormal  tentity
snormal  &ndash;    snormal  tentity
snormal  &ne;       snormal  tentity
snormal  &ni;       snormal  tentity
snormal  &not;      snormal  tentity
snormal  &notin;    snormal  tentity
snormal  &nsub;     snormal  tentity
snormal  &ntilde;   snormal  tentity
snormal  &nu;       snormal  tentity
snormal  &oacute;   snormal  tentity
snormal  &ocirc;    snormal  tentity
snormal  &oelig;    snormal  tentity
snormal  &ograve;   snormal  tentity
snormal  &oline;    snormal  tentity
snormal  &omega;    snormal  tentity
snormal  &omicron;  snormal  tentity
snormal  &oplus;    snormal  tentity
snormal  &or;       snormal  tentity
snormal  &ordf;     snormal  tentity
snormal  &ordm;     snormal  tentity
snormal  &oslash;   snormal  tentity
snormal  &otilde;   snormal  tentity
snormal  &otimes;   snormal  tentity
snormal  &ouml;     snormal  tentity
snormal  &para;     snormal  tentity
snormal  &part;     snormal  tentity
snormal  &permil;   snormal  tentity
snormal  &perp;     snormal  tentity
snormal  &phi;      snormal  tentity
snormal  &pi;       snormal  tentity
snormal  &piv;      snormal  tentity
snormal  &plusmn;   snormal  tentity
snormal  &pound;    snormal  tentity
snormal  &prime;    snormal  tentity
snormal  &prod;     snormal  tentity
snormal  &prop;     snormal  tentity
snormal  &psi;      snormal  tentity
snormal  &quot;     snormal  tentity
snormal  &rArr;     snormal  tentity
snormal  &radic;    snormal  tentity
snormal  &rang;     snormal  tentity
snormal  &raquo;    snormal  tentity
snormal  &rarr;     snormal  tentity
snormal  &rceil;    snormal  tentity
snormal  &rdquo;    snormal  tentity
snormal  &real;     snormal  tentity
snormal  &reg;      snormal  tentity
snormal  &rfloor;   snormal  tentity
snormal  &rho;      snormal  tentity
snormal  &rlm;      snormal  tentity
snormal  &rsaquo;   snormal  tentity
snormal  &rsquo;    snormal  tentity
snormal  &sbquo;    snormal  tentity
snormal  &scaron;   snormal  tentity
snormal  &sdot;     snormal  tentity
snormal  &sect;     snormal  tentity
snormal  &shy;      snormal  tentity
snormal  &sigma;    snormal  tentity
snormal  &sigmaf;   snormal  tentity
snormal  &sim;      snormal  tentity
snormal  &spades;   snormal  tentity
snormal  &sub;      snormal  tentity
snormal  &sube;     snormal  tentity
snormal  &sum;      snormal  tentity
snormal  &sup1;     snormal  tentity
snormal  &sup2;     snormal  tentity
snormal  &sup3;     snormal  tentity
snormal  &sup;      snormal  tentity
snormal  &supe;     snormal  tentity
snormal  &szlig;    snormal  tentity
snormal  &tau;      snormal  tentity
snormal  &there4;   snormal  tentity
snormal  &theta;    snormal  tentity
snormal  &thetasym; snormal  tentity
snormal  &thinsp;   snormal  tentity
snormal  &thorn;    snormal  tentity
snormal  &tilde;    snormal  tentity
snormal  &times;    snormal  tentity
snormal  &trade;    snormal  tentity
snormal  &uArr;     snormal  tentity
snormal  &uacute;   snormal  tentity
snormal  &uarr;     snormal  tentity
snormal  &ucirc;    snormal  tentity
snormal  &ugrave;   snormal  tentity
snormal  &uml;      snormal  tentity
snormal  &upsih;    snormal  tentity
snormal  &upsilon;  snormal  tentity
snormal  &uuml;     snormal  tentity
snormal  &weierp;   snormal  tentity
snormal  &xi;       snormal  tentity
snormal  &yacute;   snormal  tentity
snormal  &yen;      snormal  tentity
snormal  &yuml;     snormal  tentity
snormal  &zeta;     snormal  tentity
snormal  &zwj;      snormal  tentity
snormal  &zwnj;     snormal  tentity
snormal  &\#[0-9]*;  snormal  tentity

// Ruby ------------------------------------------------------------------------

snormal  <%[^x]                      shtmlRB    trbtag    SaveState
shtmlRB %>                          snormal     trbtag    LoadState

stagname  <%                         shtmlRB   trbtag   SaveState
shtmltag  <%                         shtmlRB   trbtag   SaveState
shtmlvalue  <%                       shtmlRB   trbtag   SaveState
sstring1  <%                         shtmlRB   trbtag   SaveState
sstring2  <%                         shtmlRB   trbtag   SaveState

// Ruby ------------------------------------------------------------------------

// reswords
shtmlRB 'BEGIN'     shtmlRB trbresword
shtmlRB 'END'       shtmlRB trbresword
shtmlRB 'alias'     shtmlRB trbresword
shtmlRB 'and'       shtmlRB trbresword
shtmlRB 'begin'     shtmlRB trbresword
shtmlRB 'break'     shtmlRB trbresword
shtmlRB 'case'      shtmlRB trbresword
shtmlRB 'class'     shtmlRB trbresword
shtmlRB 'def'       shtmlRB trbresword
shtmlRB 'defined'   shtmlRB trbresword
shtmlRB 'do'        shtmlRB trbresword
shtmlRB 'else'      shtmlRB trbresword
shtmlRB 'elsif'     shtmlRB trbresword
shtmlRB 'end'       shtmlRB trbresword
shtmlRB 'ensure'    shtmlRB trbresword
shtmlRB 'for'       shtmlRB trbresword
shtmlRB 'if'        shtmlRB trbresword
shtmlRB 'in'        shtmlRB trbresword
shtmlRB 'module'    shtmlRB trbresword
shtmlRB 'next'      shtmlRB trbresword
shtmlRB 'nil'       shtmlRB trbresword
shtmlRB 'not'       shtmlRB trbresword
shtmlRB 'or'        shtmlRB trbresword
shtmlRB 'redo'      shtmlRB trbresword
shtmlRB 'rescue'    shtmlRB trbresword
shtmlRB 'retry'     shtmlRB trbresword
shtmlRB 'return'    shtmlRB trbresword
shtmlRB 'self'      shtmlRB trbresword
shtmlRB 'super'     shtmlRB trbresword
shtmlRB 'then'      shtmlRB trbresword
shtmlRB 'undef'     shtmlRB trbresword
shtmlRB 'unless'    shtmlRB trbresword
shtmlRB 'until'     shtmlRB trbresword
shtmlRB 'when'      shtmlRB trbresword
shtmlRB 'while'     shtmlRB trbresword
shtmlRB 'yield'     shtmlRB trbresword
shtmlRB 'FALSE'     shtmlRB trbresword
shtmlRB 'TRUE'      shtmlRB trbresword

// numbers
shtmlRB [0-9][0-9]*                            shtmlRB trbinteger
shtmlRB 0b[1-9]+                               shtmlRB trbinteger
shtmlRB 0x[1-9][0-9A-F]+                       shtmlRB trbinteger
shtmlRB [0-9][0-9]*\.[0-9]*                    shtmlRB trbfloat
shtmlRB [0-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmlRB trbfloat

//idents
shtmlRB   [a-zA-Z][a-z_A-Z0-9]*  shtmlRB   trbident

// global variables
shtmlRB \$[a-z_A-Z][a-z_A-Z0-9\.]*    shtmlRB    trbglobal

// instance variables
shtmlRB @[a-z_A-Z][a-z_A-Z0-9\.]*     shtmlRB     trbinstance

// class variables
shtmlRB @@[a-z_A-Z][a-z_A-Z0-9\.]*  shtmlRB     trbclassvar

//white space
//shtmlRB #32*                      shtmlRB   twhitespace

//symbols  (must be before heredoc)
shtmlRB  [=<>()\[\]\{\}\./?,:;|+\-\*]     shtmlRB     trbsymbol

//comments
shtmlRB    \#                       srbcomment1 trbcomment
srbcomment1  .*                     shtmlRB   trbcomment
srbcomment1 $                       shtmlRB   trbcomment

shtmlRB    =begin      srbcomment2  trbcomment
srbcomment2     [^=]*    srbcomment2  trbcomment
srbcomment2     =[^e]    srbcomment2  trbcomment
srbcomment2     =end     shtmlRB    trbcomment

//heredoc
shtmlRB <<<EO[A-Z]$             srbstring3   tphpstring
srbstring3  .*$                 srbstring3   trbstring
srbstring3  ^EO[A-Z];$          shtmlRB      trbstring
srbstring3  ^EO[A-Z]$           shtmlRB      trbstring

//strings
shtmlRB  \'                     srbstring1   trbstring
srbstring1  [^\']*              srbstring1   trbstring
srbstring1  \'                  shtmlRB    trbstring
srbstring1  \'\'                srbstring1   trbstring
srbstring1   \\\\               srbstring1   trbstring
srbstring1   \\\'               srbstring1   trbstring
srbstring1   \\[^\\]            srbstring1   trbstring

shtmlRB  \"                     srbstring2   trbstring
srbstring2  [^\"]*              srbstring2   trbstring
srbstring2  \"                  shtmlRB    trbstring
srbstring2  \"\"                srbstring2   trbstring
srbstring2   \\\\               srbstring2   trbstring
srbstring2   \\\"               srbstring2   trbstring
srbstring2   \\[^\\]            srbstring2   trbstring

// CSS -------------------------------------------------------------------------

//idents
scssstyle  \-                             scssstyle   tcsssymbol
scssstyle  [A-Z_a-z][0-9A-Z_a-z\-]*       scssstyle   tcssproperty
scssstyle  [\-]*[A-Z_a-z][0-9A-Z_a-z\-]*  scssstyle   tcssproperty
scssvalue  [A-Z_a-z][0-9A-Z_a-z\-]*       scssvalue   tcssvalue

//embedrules
scssembedrules [^\{]*               scssembedrules tcssembedrules
scssembedrules \{                   scssstyle  tcssbracket

//parameters, values
scssstyle \(                        scssvalue  tcsssymbol

//brackets
scssstyle \{                        scssstyle  tcssbracket
scssvalue \{                        scssstyle  tcssbracket

//white space
scssstyle #32*                      scssstyle     tcsssymbol
scssvalue #32*                      scssvalue     tcsssymbol

//Common
scssstyle  \}                       scssstyle  tcssbracket
scssvalue  \}                       scssstyle  tcssbracket
scssstyle :                         scssvalue   tcsssymbol
scssvalue  \;                       scssstyle   tcsssymbol

// urls
scssvalue url(                      scssurl    tcssvalue
scssurl )                           scssvalue  tcssvalue
scssurl [^)]*                       scssurl    tcssvalue

//  symbols
scssvalue  [=~!@$%|&,\<\>\^\)\(\-\+\*\[\]\.\?\/] scssvalue  tcsssymbol
scssstyle  [=~!@$%|&,\<\>\^\)\+\[\]\.\?\/]     scssstyle tcsssymbol
scssstyle \*                           scssstyle tcssselector
scssstyle \.[a-z_A-Z]+[a-z_A-Z0-9\-]*  scssstyle tcssselector    
scssstyle \#[a-z_A-Z]+[a-z_A-Z0-9\-]*  scssstyle tcssselector
scssstyle \[[^\]]*\]                   scssstyle tcssselector

//import, charset, namespace
scssstyle  @import                  scssatonelinerule  tcssonelinerule
scssstyle  @charset                 scssatonelinerule  tcssonelinerule
scssstyle  @namespace               scssatonelinerule  tcssonelinerule
scssatonelinerule [^;]*             scssatonelinerule  tcssonelinerule
scssatonelinerule $                 scssstyle  tcssonelinerule
scssatonelinerule ;                 scssstyle  tcssonelinerule

//css conditional
scssstyle  @-moz-document           scssembedrules   tcssembedrules
scssstyle  @-o-keyframes            scssembedrules   tcssembedrules
scssstyle  @-webkit-keyframes       scssembedrules   tcssembedrules
scssstyle  @-moz-keyframes          scssembedrules   tcssembedrules
scssstyle  @-ms-keyframes           scssembedrules   tcssembedrules
scssstyle  @keyframes               scssembedrules   tcssembedrules
scssstyle  @supports                scssembedrules   tcssembedrules
scssstyle  @document                scssembedrules   tcssembedrules
scssstyle  @media                   scssembedrules   tcssembedrules
scssstyle  @font-face               scssembedrules   tcssembedrules

// selector reswords
scssstyle  :active                  scssstyle tcssselector
scssstyle  :checked                 scssstyle tcssselector
scssstyle  :disabled                scssstyle tcssselector
scssstyle  :empty                   scssstyle tcssselector
scssstyle  :enabled                 scssstyle tcssselector
scssstyle  :first-child             scssstyle tcssselector
scssstyle  :first-of-type           scssstyle tcssselector
scssstyle  :focus                   scssstyle tcssselector
scssstyle  :hover                   scssstyle tcssselector
scssstyle  :lang                    scssstyle tcssselector
scssstyle  :last-child              scssstyle tcssselector
scssstyle  :last-of-type            scssstyle tcssselector
scssstyle  :link                    scssstyle tcssselector
scssstyle  :not                     scssstyle tcssselector
scssstyle  :nth-child               scssstyle tcssselector
scssstyle  :nth-last-child          scssstyle tcssselector
scssstyle  :nth-last-of-type        scssstyle tcssselector
scssstyle  :nth-of-type             scssstyle tcssselector
scssstyle  :only-child              scssstyle tcssselector
scssstyle  :only-of-type            scssstyle tcssselector
scssstyle  :root                    scssstyle tcssselector
scssstyle  :target                  scssstyle tcssselector
scssstyle  :visited                 scssstyle tcssselector
scssstyle  :after                   scssstyle tcssselector
scssstyle  :before                  scssstyle tcssselector
scssstyle  :first-letter            scssstyle tcssselector
scssstyle  :first-line              scssstyle tcssselector
scssstyle  ::after                  scssstyle tcssselector
scssstyle  ::before                 scssstyle tcssselector
scssstyle  ::first-letter           scssstyle tcssselector
scssstyle  ::first-line             scssstyle tcssselector

// reswords
//@@@CSS
scssstyle  'azimuth'                scssstyle tcssresword
scssstyle  'background'             scssstyle tcssresword
scssstyle  'background-attachment'  scssstyle tcssresword
scssstyle  'background-color'       scssstyle tcssresword
scssstyle  'background-image'       scssstyle tcssresword
scssstyle  'background-position'    scssstyle tcssresword
scssstyle  'background-repeat'      scssstyle tcssresword
scssstyle  'border'                 scssstyle tcssresword
scssstyle  'border-bottom'          scssstyle tcssresword
scssstyle  'border-bottom-color'    scssstyle tcssresword
scssstyle  'border-bottom-style'    scssstyle tcssresword
scssstyle  'border-bottom-width'    scssstyle tcssresword
scssstyle  'border-collapse'        scssstyle tcssresword
scssstyle  'border-color'           scssstyle tcssresword
scssstyle  'border-left'            scssstyle tcssresword
scssstyle  'border-left-color'      scssstyle tcssresword
scssstyle  'border-left-style'      scssstyle tcssresword
scssstyle  'border-left-width'      scssstyle tcssresword
scssstyle  'border-right'           scssstyle tcssresword
scssstyle  'border-right-color'     scssstyle tcssresword
scssstyle  'border-right-style'     scssstyle tcssresword
scssstyle  'border-right-width'     scssstyle tcssresword
scssstyle  'border-spacing'         scssstyle tcssresword
scssstyle  'border-style'           scssstyle tcssresword
scssstyle  'border-top'             scssstyle tcssresword
scssstyle  'border-top-color'       scssstyle tcssresword
scssstyle  'border-top-style'       scssstyle tcssresword
scssstyle  'border-top-width'       scssstyle tcssresword
scssstyle  'border-width'           scssstyle tcssresword
scssstyle  'bottom'                 scssstyle tcssresword
scssstyle  'caption-side'           scssstyle tcssresword
scssstyle  'clear'                  scssstyle tcssresword
scssstyle  'clip'                   scssstyle tcssresword
scssstyle  'color'                  scssstyle tcssresword
scssstyle  'content'                scssstyle tcssresword
scssstyle  'counter-increment'      scssstyle tcssresword
scssstyle  'counter-reset'          scssstyle tcssresword
scssstyle  'cue'                    scssstyle tcssresword
scssstyle  'cue-after'              scssstyle tcssresword
scssstyle  'cue-before'             scssstyle tcssresword
scssstyle  'cursor'                 scssstyle tcssresword
scssstyle  'direction'              scssstyle tcssresword
scssstyle  'display'                scssstyle tcssresword
scssstyle  'elevation'              scssstyle tcssresword
scssstyle  'empty-cells'            scssstyle tcssresword
scssstyle  'float'                  scssstyle tcssresword
scssstyle  'font'                   scssstyle tcssresword
scssstyle  'font-family'            scssstyle tcssresword
scssstyle  'font-size'              scssstyle tcssresword
scssstyle  'font-size-adjust'       scssstyle tcssresword
scssstyle  'font-stretch'           scssstyle tcssresword
scssstyle  'font-style'             scssstyle tcssresword
scssstyle  'font-variant'           scssstyle tcssresword
scssstyle  'font-weight'            scssstyle tcssresword
scssstyle  'height'                 scssstyle tcssresword
scssstyle  'left'                   scssstyle tcssresword
scssstyle  'letter-spacing'         scssstyle tcssresword
scssstyle  'line-height'            scssstyle tcssresword
scssstyle  'list-style'             scssstyle tcssresword
scssstyle  'list-style-image'       scssstyle tcssresword
scssstyle  'list-style-position'    scssstyle tcssresword
scssstyle  'list-style-type'        scssstyle tcssresword
scssstyle  'margin'                 scssstyle tcssresword
scssstyle  'margin-bottom'          scssstyle tcssresword
scssstyle  'margin-left'            scssstyle tcssresword
scssstyle  'margin-right'           scssstyle tcssresword
scssstyle  'margin-top'             scssstyle tcssresword
scssstyle  'marker-offset'          scssstyle tcssresword
scssstyle  'marks'                  scssstyle tcssresword
scssstyle  'max-height'             scssstyle tcssresword
scssstyle  'max-width'              scssstyle tcssresword
scssstyle  'min-height'             scssstyle tcssresword
scssstyle  'min-width'              scssstyle tcssresword
scssstyle  'orphans'                scssstyle tcssresword
scssstyle  'outline'                scssstyle tcssresword
scssstyle  'outline-color'          scssstyle tcssresword
scssstyle  'outline-style'          scssstyle tcssresword
scssstyle  'outline-width'          scssstyle tcssresword
scssstyle  'overflow'               scssstyle tcssresword
scssstyle  'padding'                scssstyle tcssresword
scssstyle  'padding-bottom'         scssstyle tcssresword
scssstyle  'padding-left'           scssstyle tcssresword
scssstyle  'padding-right'          scssstyle tcssresword
scssstyle  'padding-top'            scssstyle tcssresword
scssstyle  'page'                   scssstyle tcssresword
scssstyle  'page-break-after'       scssstyle tcssresword
scssstyle  'page-break-before'      scssstyle tcssresword
scssstyle  'page-break-inside'      scssstyle tcssresword
scssstyle  'pause'                  scssstyle tcssresword
scssstyle  'pause-after'            scssstyle tcssresword
scssstyle  'pause-before'           scssstyle tcssresword
scssstyle  'pitch'                  scssstyle tcssresword
scssstyle  'pitch-range'            scssstyle tcssresword
scssstyle  'play-during'            scssstyle tcssresword
scssstyle  'position'               scssstyle tcssresword
scssstyle  'quotes'                 scssstyle tcssresword
scssstyle  'richness'               scssstyle tcssresword
scssstyle  'right'                  scssstyle tcssresword
scssstyle  'size'                   scssstyle tcssresword
scssstyle  'speak'                  scssstyle tcssresword
scssstyle  'speak-header'           scssstyle tcssresword
scssstyle  'speak-numeral'          scssstyle tcssresword
scssstyle  'speak-punctuation'      scssstyle tcssresword
scssstyle  'speech-rate'            scssstyle tcssresword
scssstyle  'stress'                 scssstyle tcssresword
scssstyle  'table-layout'           scssstyle tcssresword
scssstyle  'text-align'             scssstyle tcssresword
scssstyle  'text-decoration'        scssstyle tcssresword
scssstyle  'text-indent'            scssstyle tcssresword
scssstyle  'text-shadow'            scssstyle tcssresword
scssstyle  'text-transform'         scssstyle tcssresword
scssstyle  'top'                    scssstyle tcssresword
scssstyle  'unicode-bidi'           scssstyle tcssresword
scssstyle  'vertical-align'         scssstyle tcssresword
scssstyle  'visibility'             scssstyle tcssresword
scssstyle  'voice-family'           scssstyle tcssresword
scssstyle  'volume'                 scssstyle tcssresword
scssstyle  'white-space'            scssstyle tcssresword
scssstyle  'widows'                 scssstyle tcssresword
scssstyle  'width'                  scssstyle tcssresword
scssstyle  'word-spacing'           scssstyle tcssresword
scssstyle  'z-index'                scssstyle tcssresword
//CSS@@@

//@@@HTM
scssstyle  'a'           scssstyle  tcssselector
scssstyle  'abbr'        scssstyle  tcssselector
scssstyle  'acronym'     scssstyle  tcssselector
scssstyle  'address'     scssstyle  tcssselector
scssstyle  'applet'      scssstyle  tcssselector
scssstyle  'area'        scssstyle  tcssselector
scssstyle  'article'     scssstyle  tcssselector
scssstyle  'aside'       scssstyle  tcssselector
scssstyle  'audio'       scssstyle  tcssselector
scssstyle  'b'           scssstyle  tcssselector
scssstyle  'base'        scssstyle  tcssselector
scssstyle  'basefont'    scssstyle  tcssselector
scssstyle  'bdo'         scssstyle  tcssselector
scssstyle  'big'         scssstyle  tcssselector
scssstyle  'blockquote'  scssstyle  tcssselector
scssstyle  'body'        scssstyle  tcssselector
scssstyle  'br'          scssstyle  tcssselector
scssstyle  'button'      scssstyle  tcssselector
scssstyle  'canvas'      scssstyle  tcssselector
scssstyle  'caption'     scssstyle  tcssselector
scssstyle  'center'      scssstyle  tcssselector
scssstyle  'cite'        scssstyle  tcssselector
scssstyle  'code'        scssstyle  tcssselector
scssstyle  'col'         scssstyle  tcssselector
scssstyle  'colgroup'    scssstyle  tcssselector
scssstyle  'command'     scssstyle  tcssselector
scssstyle  'datalist'    scssstyle  tcssselector
scssstyle  'dd'          scssstyle  tcssselector
scssstyle  'del'         scssstyle  tcssselector
scssstyle  'details'     scssstyle  tcssselector
scssstyle  'dfn'         scssstyle  tcssselector
scssstyle  'dir'         scssstyle  tcssselector
scssstyle  'div'         scssstyle  tcssselector
scssstyle  'dl'          scssstyle  tcssselector
scssstyle  'dt'          scssstyle  tcssselector
scssstyle  'em'          scssstyle  tcssselector
scssstyle  'embed'       scssstyle  tcssselector
scssstyle  'fieldset'    scssstyle  tcssselector
scssstyle  'figcaption'  scssstyle  tcssselector
scssstyle  'figure'      scssstyle  tcssselector
scssstyle  'footer'      scssstyle  tcssselector
scssstyle  'form'        scssstyle  tcssselector
scssstyle  'frame'       scssstyle  tcssselector
scssstyle  'frameset'    scssstyle  tcssselector
scssstyle  'h1'          scssstyle  tcssselector
scssstyle  'h2'          scssstyle  tcssselector
scssstyle  'h3'          scssstyle  tcssselector
scssstyle  'h4'          scssstyle  tcssselector
scssstyle  'h5'          scssstyle  tcssselector
scssstyle  'h6'          scssstyle  tcssselector
scssstyle  'head'        scssstyle  tcssselector
scssstyle  'header'      scssstyle  tcssselector
scssstyle  'hgroup'      scssstyle  tcssselector
scssstyle  'hr'          scssstyle  tcssselector
scssstyle  'html'        scssstyle  tcssselector
scssstyle  'i'           scssstyle  tcssselector
scssstyle  'iframe'      scssstyle  tcssselector
scssstyle  'img'         scssstyle  tcssselector
scssstyle  'input'       scssstyle  tcssselector
scssstyle  'ins'         scssstyle  tcssselector
scssstyle  'isindex'     scssstyle  tcssselector
scssstyle  'kbd'         scssstyle  tcssselector
scssstyle  'keygen'      scssstyle  tcssselector
scssstyle  'label'       scssstyle  tcssselector
scssstyle  'legend'      scssstyle  tcssselector
scssstyle  'li'          scssstyle  tcssselector
scssstyle  'link'        scssstyle  tcssselector
scssstyle  'map'         scssstyle  tcssselector
scssstyle  'mark'        scssstyle  tcssselector
scssstyle  'menu'        scssstyle  tcssselector
scssstyle  'meta'        scssstyle  tcssselector
scssstyle  'meter'       scssstyle  tcssselector
scssstyle  'nav'         scssstyle  tcssselector
scssstyle  'noframes'    scssstyle  tcssselector
scssstyle  'noscript'    scssstyle  tcssselector
scssstyle  'object'      scssstyle  tcssselector
scssstyle  'ol'          scssstyle  tcssselector
scssstyle  'optgroup'    scssstyle  tcssselector
scssstyle  'option'      scssstyle  tcssselector
scssstyle  'output'      scssstyle  tcssselector
scssstyle  'p'           scssstyle  tcssselector
scssstyle  'param'       scssstyle  tcssselector
scssstyle  'pre'         scssstyle  tcssselector
scssstyle  'progress'    scssstyle  tcssselector
scssstyle  'q'           scssstyle  tcssselector
scssstyle  'rp'          scssstyle  tcssselector
scssstyle  'rt'          scssstyle  tcssselector
scssstyle  'ruby'        scssstyle  tcssselector
scssstyle  's'           scssstyle  tcssselector
scssstyle  'samp'        scssstyle  tcssselector
scssstyle  'section'     scssstyle  tcssselector
scssstyle  'select'      scssstyle  tcssselector
scssstyle  'small'       scssstyle  tcssselector
scssstyle  'source'      scssstyle  tcssselector
scssstyle  'span'        scssstyle  tcssselector
scssstyle  'strike'      scssstyle  tcssselector
scssstyle  'strong'      scssstyle  tcssselector
scssstyle  'sub'         scssstyle  tcssselector
scssstyle  'summary'     scssstyle  tcssselector
scssstyle  'sup'         scssstyle  tcssselector
scssstyle  'table'       scssstyle  tcssselector
scssstyle  'tbody'       scssstyle  tcssselector
scssstyle  'td'          scssstyle  tcssselector
scssstyle  'textarea'    scssstyle  tcssselector
scssstyle  'tfoot'       scssstyle  tcssselector
scssstyle  'th'          scssstyle  tcssselector
scssstyle  'thead'       scssstyle  tcssselector
scssstyle  'time'        scssstyle  tcssselector
scssstyle  'title'       scssstyle  tcssselector
scssstyle  'tr'          scssstyle  tcssselector
scssstyle  'tt'          scssstyle  tcssselector
scssstyle  'u'           scssstyle  tcssselector
scssstyle  'ul'          scssstyle  tcssselector
scssstyle  'var'         scssstyle  tcssselector
scssstyle  'video'       scssstyle  tcssselector
scssstyle  'wbr'         scssstyle  tcssselector
//HTM@@@

//Keyframes
scssstyle  'from'       scssstyle  tcssselector
scssstyle  'to'         scssstyle  tcssselector


// numbers

scssvalue [0-9]*                            scssvalue  tcssinteger
scssvalue \#[0-9A-F]+                       scssvalue  tcssinteger
scssvalue [0-9]*\.[0-9]*                    scssvalue  tcssfloat
scssvalue [0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ scssvalue  tcssfloat

//comments

scssstyle    /\*                   scsscomment1  tcsscomment
scsscomment1 [^\*]*                scsscomment1  tcsscomment
scsscomment1 \*[^/]                scsscomment1  tcsscomment
scsscomment1 [\*]*/                scssstyle     tcsscomment

scssvalue    /\*                   scsscomment2  tcsscomment
scsscomment2 [^\*]*                scsscomment2  tcsscomment
scsscomment2 \*[^/]                scsscomment2  tcsscomment
scsscomment2 [\*]*/                scssvalue     tcsscomment

//strings

scssvalue     \"                   scssstring1    tcssstring
scssstring1    [^\"]*              scssstring1    tcssstring
scssstring1    \"                  scssvalue      tcssstring
scssstring1    \"\"                scssstring1    tcssstring
scssstring1    $                   scssvalue      tcssstring

scssvalue      \'                  scssstring2    tcssstring
scssstring2    [^\']*              scssstring2    tcssstring
scssstring2    \'                  scssvalue      tcssstring
scssstring2    \'\'                scssstring2    tcssstring
scssstring2    $                   scssvalue      tcssstring

scssstyle   <\!--                  scssstyle   tcsscomment
scssvalue   <\!--                  scssvalue   tcsscomment
scssstyle  -->                     scssstyle   tcsscomment
scssvalue  -->                     scssvalue   tcsscomment

// switch

snormal <style                     shtmlCSS    thtmlstyle
shtmlCSS [^>^\"]*                  shtmlCSS    thtmlstyle
shtmlCSS >                         scssstyle   thtmlstyle
scssstyle </style>                 snormal     thtmlstyle
scssvalue </style>                 snormal     thtmlstyle
scsscomment1 </style>              snormal     thtmlstyle
scsscomment2 </style>              snormal     thtmlstyle
scssstring1 </style>               snormal     thtmlstyle
scssstring2 </style>               snormal     thtmlstyle

shtmlCSS  \"                       shtmlCSSval   thtmlstyle
shtmlCSSval   [^\"]*               shtmlCSSval   thtmlstyle
shtmlCSSval   \"                   shtmlCSS      thtmlstyle


// JS  -------------------------------------------------------------------------

// switch

snormal <script                    shtmlJS     thtmlscript
shtmlJS [^>^\"]*                   shtmlJS     thtmlscript
shtmlJS >                          sjsnormal   thtmlscript
sjsnormal </script>                snormal     thtmlscript

shtmlJS  \"                        shtmlJSval   thtmlscript
shtmlJSval  [^\"]*                 shtmlJSval   thtmlscript
shtmlJSval  \"                     shtmlJS      thtmlscript

// reswords
sjsnormal 'break'        sjsnormal tjsresword
sjsnormal 'case'         sjsnormal tjsresword
sjsnormal 'catch'        sjsnormal tjsresword
sjsnormal 'class'        sjsnormal tjsresword
sjsnormal 'const'        sjsnormal tjsresword
sjsnormal 'continue'     sjsnormal tjsresword
sjsnormal 'debugger'     sjsnormal tjsresword
sjsnormal 'default'      sjsnormal tjsresword
sjsnormal 'delete'       sjsnormal tjsresword
sjsnormal 'do'           sjsnormal tjsresword
sjsnormal 'else'         sjsnormal tjsresword
sjsnormal 'enum'         sjsnormal tjsresword
sjsnormal 'export'       sjsnormal tjsresword
sjsnormal 'extends'      sjsnormal tjsresword
sjsnormal 'false'        sjsnormal tjsresword
sjsnormal 'finally'      sjsnormal tjsresword
sjsnormal 'for'          sjsnormal tjsresword
sjsnormal 'function'     sjsnormal tjsresword
sjsnormal 'if'           sjsnormal tjsresword
sjsnormal 'import'       sjsnormal tjsresword
sjsnormal 'in'           sjsnormal tjsresword
sjsnormal 'new'          sjsnormal tjsresword
sjsnormal 'null'         sjsnormal tjsresword
sjsnormal 'return'       sjsnormal tjsresword
sjsnormal 'super'        sjsnormal tjsresword
sjsnormal 'switch'       sjsnormal tjsresword
sjsnormal 'this'         sjsnormal tjsresword
sjsnormal 'throw'        sjsnormal tjsresword
sjsnormal 'true'         sjsnormal tjsresword
sjsnormal 'try'          sjsnormal tjsresword
sjsnormal 'typeof'       sjsnormal tjsresword
sjsnormal 'var'          sjsnormal tjsresword
sjsnormal 'void'         sjsnormal tjsresword
sjsnormal 'while'        sjsnormal tjsresword
sjsnormal 'with'         sjsnormal tjsresword

// numbers
sjsnormal [0-9][0-9]*                            sjsnormal  tjsinteger
sjsnormal 0X[0-9A-F]+                            sjsnormal  tjsinteger
sjsnormal [1-9][0-9]*\.[0-9]*                    sjsnormal  tjsfloat
sjsnormal [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ sjsnormal  tjsfloat

// idents
sjsnormal   [a-z_A-Z][a-z_A-Z0-9]*  sjsnormal   tjsident

//white space
sjsnormal #32*                      sjsnormal   twhitespace


//strings
sjsnormal    \'                     sjsstring1   tjsstring
sjsstring1   [^\']*                 sjsstring1   tjsstring
sjsstring1   \'                     sjsnormal    tjsstring
sjsstring1   \'\'                   sjsstring1   tjsstring
sjsstring1   \\                     sjsstring1   tjsstring
sjsstring1   \\\'                   sjsstring1   tjsstring
sjsstring1   $                      sjsnormal    tjsstring

//strings
sjsnormal     \"                    sjsstring2   tjsstring
sjsstring2   [^\"]*                 sjsstring2   tjsstring
sjsstring2   \"                     sjsnormal    tjsstring
sjsstring2   \"\"                   sjsstring2   tjsstring
sjsstring2   \\                     sjsstring2   tjsstring
sjsstring2   \\\"                   sjsstring2   tjsstring
sjsstring2   $                      sjsnormal    tjsstring

//comments
sjsnormal   //                    sjscomment1  tjscomment
sjscomment1 $                     sjsnormal    tjscomment
sjscomment1 <                     sjscomment1  tjscomment
sjscomment1 [^<]*                 sjscomment1  tjscomment
sjscomment1 </script>             snormal      thtmlscript

sjsnormal   /\*                   sjscomment2  tjscomment
sjscomment2 [^\*]*                sjscomment2  tjscomment
sjscomment2 \*                    sjscomment2  tjscomment
sjscomment2 \*/                   sjsnormal    tjscomment
sjscomment2 </script>             snormal      thtmlscript

sjsnormal   <\!--                 sjsnormal    tjscomment

 
 
 
 
 
 
 
 
 
