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
Exibir arquivo Open project: antlr/antlr4 Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method 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 method

public Equals ( object obj ) : bool
obj object
return bool

Execute() public method

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

public Execute ( Lexer lexer ) : void
lexer Lexer
return void

GetHashCode() public method

public GetHashCode ( ) : int
return int

LexerIndexedCustomAction() public method

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 /// /// . ///
return Antlr4.Runtime