C# Class 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) .

Inheritance: ILexerAction
Afficher le fichier Open project: antlr/antlr4 Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
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 .

Method Details

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

Execute() public méthode

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

public Execute ( Lexer lexer ) : void
lexer Lexer
Résultat void

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

LexerIndexedCustomAction() public méthode

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 /// /// . ///
Résultat Antlr4.Runtime