- All Known Implementing Classes:
public interface LexerActionRepresents a single action which can be executed following the successful match of a lexer rule. Lexer actions are used for both embedded action syntax and ANTLR 4's new lexer command syntax.
- Sam Harwell
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
execute(Lexer lexer)Execute the lexer action in the context of the specified
getActionType()Gets the serialization type of the lexer action.
isPositionDependent()Gets whether the lexer action is position-dependent.
LexerActionType getActionType()Gets the serialization type of the lexer action.
- The serialization type of the lexer action.
boolean isPositionDependent()Gets whether the lexer action is position-dependent. Position-dependent actions may have different semantics depending on the
CharStreamindex at the time the action is executed.
Many lexer commands, including
more, do not check the input index during their execution. Actions like this are position-independent, and may be stored more efficiently as part of the
trueif the lexer action semantics can be affected by the position of the input
CharStreamat the time it is executed; otherwise,