));
List rules = new ArrayList();
//style the whole block with some default colors
rules.add(new SingleLineRule("<script", ">", scripttag));
rules.add(new SingleLineRule("</script", ">", scripttag));
rules.add(new SingleLineRule("<SCRIPT", ">", scripttag));
rules.add(new SingleLineRule("</SCRIPT", ">", scripttag));
rules.add(new MultiLineRule("<cf",">", new Token(CFPartitionScanner.CF_START_TAG)));
rules.add(new MultiLineRule("<CF",">", new Token(CFPartitionScanner.CF_START_TAG)));
rules.add(new SingleLineRule("</cf",">", new Token(CFPartitionScanner.CF_END_TAG)));
rules.add(new SingleLineRule("</CF",">", new Token(CFPartitionScanner.CF_END_TAG)));
JSSyntaxDictionary jssd = (JSSyntaxDictionary)DictionaryManager.getDictionary(DictionaryManager.JSDIC);
///////////////////////////////////////////////////////////////////////
//do any keywords
//get any script specific keywords (if, case, while, et cetra)
Set set = jssd.getScriptKeywords();
String allkeys[] = new String[set.size()];
int i=0;
Iterator it = set.iterator();
while(it.hasNext())
{
allkeys[i++] = (String)it.next();
}
CFKeywordDetector cfkd = new CFKeywordDetector();
PredicateWordRule words = new PredicateWordRule(
cfkd,
defaulttoken,
allkeys,
keyword
);
///////////////////////////////////////////////////////////////////////
//do any known functions
//get any script specific functions (alert, parseInt, confirm, et cetra)
set = jssd.getFunctions();
i=0;
//String allfuncs[] = new String[set.size()];
it = set.iterator();
while(it.hasNext())
{
//allfuncs[i++] = (String)it.next();
String op = (String)it.next();
//wr.addWord(op,function);
words.addWord(op,function);
}
rules.add(words);
///////////////////////////////////////////////////////////////////////
//do any operatores
WordRule wr = new WordRule(new OperatorDetector());
//get any script specific operators (*, +, =, et cetra)
set = jssd.getOperators();
it = set.iterator();
while(it.hasNext())
{
String op = (String)it.next();
wr.addWord(op,keyword);
}
rules.add(wr);
///////////////////////////////////////////////////////////////////////
rules.add(new MultiLineRule("/*", "*/", comment));
rules.add(new EndOfLineRule("//", comment));
rules.add(new SingleLineRule("\"", "\"", string, '\\'));
rules.add(new SingleLineRule("'", "'", string, '\\'));
rules.add(new NumberRule(cfnumber));
IRule[] rulearry = new IRule[rules.size()];
rules.toArray(rulearry);