The main abstract class in the Lexer SPI that must be implemented is {@link org.netbeans.spi.lexer.LanguageHierarchy} that mainly defines set of token ids and token categories for the new language and its {@link org.netbeans.spi.lexer.Lexer}.
The language hierarchy may also define embedded languages.