| 481 | var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type |
| 482 | |
| 483 | function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;) |
| 484 | state.chain=null; // 12 3tail |
| 485 | state.style=null; |
| 486 | state.tail=null; |
| 487 | state.tokenize=function(stream,state){ |
| 488 | var e=false,c,i=0; |
| 489 | while(c=stream.next()){ |
| 490 | if(c===chain[i]&&!e){ |
| 491 | if(chain[++i]!==undefined){ |
| 492 | state.chain=chain[i]; |
| 493 | state.style=style; |
| 494 | state.tail=tail;} |
| 495 | else if(tail) |
| 496 | stream.eatWhile(tail); |
| 497 | state.tokenize=tokenPerl; |
| 498 | return style;} |
| 499 | e=!e&&c=="\\";} |
| 500 | return style;}; |
| 501 | return state.tokenize(stream,state);} |
| 502 | |
| 503 | function tokenSOMETHING(stream,state,string){ |
| 504 | state.tokenize=function(stream,state){ |