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
파일 보기 프로젝트 열기: antlr/antlr4 1 사용 예제들

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