I'm fairly new to JFlex and JSyntaxPane although I have managed to hack together a lexer for XPath.
The problem I find myself in is that I'm working on a project that supports a subset of XPath with a few proprietary features. Nasty I know.
If this were a regular Java problem I'd turn to inheritance but it doesn't seem possible to achieve inheritance by having one lexer extend a previously generated one.
e.g
import jsyntaxpane.Token;
import jsyntaxpane.TokenType;
%%
%public
%class ProprietaryLexer
%extends XPathLexer
%unicode
%char
%type Token
This seems to cause a load of errors telling me I can't extend some final methods. Is this a problem specific to the DefaultJFlexLexer in JSyntaxpane or am I just doing it wrong? Has anyone been in a similar situation and found a way to achieve some kind of ad hoc inheritance in a bunch of lexers?