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

Executes a custom lexer action by calling Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}.Action(Antlr4.Runtime.RuleContext, int, int) with the rule and action indexes assigned to the custom action. The implementation of a custom action is added to the generated code for the lexer in an override of Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}.Action(Antlr4.Runtime.RuleContext, int, int) when the grammar is compiled.

This class may represent embedded actions created with the {...} syntax in ANTLR 4, as well as actions created for lexer commands where the command argument could not be evaluated when the grammar was compiled.

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

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

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

Custom actions are implemented by calling Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}.Action(Antlr4.Runtime.RuleContext, int, int) with the appropriate rule and action indexes.

GetHashCode ( ) : int
LexerCustomAction ( int ruleIndex, int actionIndex ) : Antlr4.Runtime

Constructs a custom lexer action with the specified rule and action indexes.

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

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

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

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

Custom actions are implemented by calling Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}.Action(Antlr4.Runtime.RuleContext, int, int) with the appropriate rule and action indexes.

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

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

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

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

Constructs a custom lexer action with the specified rule and action indexes.
public LexerCustomAction ( int ruleIndex, int actionIndex ) : Antlr4.Runtime
ruleIndex int /// The rule index to use for calls to /// /// . ///
actionIndex int /// The action index to use for calls to /// /// . ///
Результат Antlr4.Runtime