public class OgnlHighlightingLexer extends LayeredLexer {
public OgnlHighlightingLexer() {
super(new OgnlLexer());
final StringLiteralLexer stringLiteralLexer = new StringLiteralLexer('\"', OgnlTypes.STRING_LITERAL);
registerSelfStoppingLayer(stringLiteralLexer,
new IElementType[]{OgnlTypes.STRING_LITERAL},
IElementType.EMPTY_ARRAY);
final StringLiteralLexer characterLiteralLexer = new StringLiteralLexer('\'', OgnlTypes.CHARACTER_LITERAL);
registerSelfStoppingLayer(characterLiteralLexer,
new IElementType[]{OgnlTypes.CHARACTER_LITERAL},
IElementType.EMPTY_ARRAY);
}