C# Класс Antlr4.Runtime.Atn.LexerIndexedCustomAction

This implementation of ILexerAction is used for tracking input offsets for position-dependent actions within a LexerActionExecutor .

This action is not serialized as part of the ATN, and is only required for position-dependent lexer actions which appear at a location other than the end of a rule. For more information about DFA optimizations employed for lexer actions, see LexerActionExecutor.Append(LexerActionExecutor, ILexerAction) and LexerActionExecutor.FixOffsetBeforeMatch(int) .

Наследование: ILexerAction
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
Equals ( object obj ) : bool
Execute ( Lexer lexer ) : void

This method calls Execute(Antlr4.Runtime.Lexer) on the result of Action() using the provided lexer .

GetHashCode ( ) : int
LexerIndexedCustomAction ( int offset, ILexerAction action ) : Antlr4.Runtime

Constructs a new indexed custom action by associating a character offset with a ILexerAction .

Note: This class is only required for lexer actions for which ILexerAction.IsPositionDependent() returns .

Описание методов

Equals() публичный метод

public Equals ( object obj ) : bool
obj object
Результат bool

Execute() публичный метод

This method calls Execute(Antlr4.Runtime.Lexer) on the result of Action() using the provided lexer .

public Execute ( Lexer lexer ) : void
lexer Lexer
Результат void

GetHashCode() публичный метод

public GetHashCode ( ) : int
Результат int

LexerIndexedCustomAction() публичный метод

Constructs a new indexed custom action by associating a character offset with a ILexerAction .

Note: This class is only required for lexer actions for which ILexerAction.IsPositionDependent() returns .

public LexerIndexedCustomAction ( int offset, ILexerAction action ) : Antlr4.Runtime
offset int /// The offset into the input /// /// , relative to /// the token start index, at which the specified lexer action should be /// executed. ///
action ILexerAction /// The lexer action to execute at a particular offset in the /// input /// /// . ///
Результат Antlr4.Runtime