C# Класс Antlr4.Runtime.Vocabulary

This class provides a default implementation of the IVocabulary interface.
Наследование: IVocabulary
Показать файл Открыть проект

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

Метод Описание
FromTokenNames ( string tokenNames ) : IVocabulary

Returns a Vocabulary instance from the specified set of token names. This method acts as a compatibility layer for the single tokenNames array generated by previous releases of ANTLR.

The resulting vocabulary instance returns for GetLiteralName(int) and GetSymbolicName(int) , and the value from tokenNames for the display names.

Vocabulary ( string literalNames, string symbolicNames ) : System

Constructs a new instance of Vocabulary from the specified literal and symbolic token names.

Vocabulary ( string literalNames, string symbolicNames, string displayNames ) : System

Constructs a new instance of Vocabulary from the specified literal, symbolic, and display token names.

Приватные методы

Метод Описание
GetDisplayName ( int tokenType ) : string
GetLiteralName ( int tokenType ) : string
GetSymbolicName ( int tokenType ) : string

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

FromTokenNames() публичный статический Метод

Returns a Vocabulary instance from the specified set of token names. This method acts as a compatibility layer for the single tokenNames array generated by previous releases of ANTLR.

The resulting vocabulary instance returns for GetLiteralName(int) and GetSymbolicName(int) , and the value from tokenNames for the display names.

public static FromTokenNames ( string tokenNames ) : IVocabulary
tokenNames string /// The token names, or /// /// if no token names are /// available. ///
Результат IVocabulary

Vocabulary() публичный Метод

Constructs a new instance of Vocabulary from the specified literal and symbolic token names.
public Vocabulary ( string literalNames, string symbolicNames ) : System
literalNames string /// The literal names assigned to tokens, or /// /// if no literal names are assigned. ///
symbolicNames string /// The symbolic names assigned to tokens, or /// /// if no symbolic names are assigned. ///
Результат System

Vocabulary() публичный Метод

Constructs a new instance of Vocabulary from the specified literal, symbolic, and display token names.
public Vocabulary ( string literalNames, string symbolicNames, string displayNames ) : System
literalNames string /// The literal names assigned to tokens, or /// /// if no literal names are assigned. ///
symbolicNames string /// The symbolic names assigned to tokens, or /// /// if no symbolic names are assigned. ///
displayNames string /// The display names assigned to tokens, or /// /// to use the values in /// /// and /// /// as /// the source of display names, as described in /// /// . ///
Результат System