LexerActionExecutor

@uml Represents an executor for a sequence of lexer actions which traversed during the matching operation of a lexer rule (token).

<p>The executor tracks position information for position-dependent lexer actions efficiently, ensuring that actions appearing only at the end of the rule do not cause bloating of the {@link DFA} created for the lexer.</p>

@author Sam Harwell @since 4.2

Constructors

this
this(LexerAction[] lexerActions)

@uml Constructs an executor for a sequence of {@link LexerAction} actions. @param lexerActions The lexer actions to execute.

Members

Functions

execute
void execute(InterfaceLexer lexer, CharStream input, size_t startIndex)

Execute the actions encapsulated by this executor within the context of a particular {@link Lexer}.

fixOffsetBeforeMatch
LexerActionExecutor fixOffsetBeforeMatch(size_t offset)

@uml Creates a {@link LexerActionExecutor} which encodes the current offset for position-dependent lexer actions.

getLexerActions
LexerAction[] getLexerActions()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object obj)

@uml @override

toHash
size_t toHash()

@uml @safe @nothrow @override

Static functions

append
LexerActionExecutor append(LexerActionExecutor lexerActionExecutor, LexerAction lexerAction)

@uml Creates a {@link LexerActionExecutor} which executes the actions forthe input {@code lexerActionExecutor} followed by a specified {@code lexerAction}.

Meta