// Add generic whitespace rule.
rules.add(new WhitespaceRule(new ProcessingWhitespaceDetector()));
// Add a rule for each keyword explaining how to color it
WordRule wordRule= new WordRule(new ProcessingWordDetector(), other);
for (int i= 0; i < fgKeywords1.length; i++)
wordRule.addWord(fgKeywords1[i], keyword1);
for (int i= 0; i < fgKeywords2.length; i++)
wordRule.addWord(fgKeywords2[i], keyword2);
for (int i= 0; i < fgKeywords3.length; i++)