OptionalblankOptional blank node ID generator function. When set, the lexer will automatically assign blank node IDs to tokens that can generate blank nodes (LBRACKET, LPARENT, OPEN_ANNOTATION, TILDE). When undefined, blank node IDs will be automatically assigned using the default generator. Set to null to disable automatic blank node ID assignment.
Tokenizes a string input according to the lexer's defined tokens and modes, returning an object containing the resulting tokens and any lexing errors. Note that this can be called repeatedly on different strings as this method does not modify the state of the Lexer.
When blankNodeIdGenerator is set (or undefined for default), tokens that can generate blank nodes will have pre-assigned IDs stored in their payload.blankNodeId field.
The string to lex
OptionalinitialMode: stringThe initial Lexer Mode to start with, by default this will be the first mode in the lexer's definition. If the lexer has no explicit modes it will be the implicit single 'default_mode' mode.
A common interface for all lexers in the Mentor RDF Parsers library.