C# 클래스 Nexus.Client.Util.Antlr.AntlrParserBase

The base parser for ANTLR parsers.
This extends the generated parser in order to make error handling sane, and to make the errors friendlier.
상속: Antlr.Runtime.Parser
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5

공개 메소드들

메소드 설명
AntlrParserBase ( ITokenStream input, Antlr.Runtime.RecognizerSharedState state ) : System

A simple constructor.

DisplayRecognitionError ( String tokenNames, RecognitionException e ) : void

Logs the given error to the ErrorTracker.

GetErrorMessage ( RecognitionException e, string tokenNames ) : string

Generates a human-readable error message for the given error.

Parse ( ) : ITree

Parses the input.

메소드 상세

AntlrParserBase() 공개 메소드

A simple constructor.
public AntlrParserBase ( ITokenStream input, Antlr.Runtime.RecognizerSharedState state ) : System
input ITokenStream The token stream to parse.
state Antlr.Runtime.RecognizerSharedState The to use.
리턴 System

DisplayRecognitionError() 공개 메소드

Logs the given error to the ErrorTracker.
public DisplayRecognitionError ( String tokenNames, RecognitionException e ) : void
tokenNames String The names of the tokens in the current language.
e Antlr.Runtime.RecognitionException The error.
리턴 void

GetErrorMessage() 공개 메소드

Generates a human-readable error message for the given error.
public GetErrorMessage ( RecognitionException e, string tokenNames ) : string
e Antlr.Runtime.RecognitionException The error.
tokenNames string The names of the tokens in the current language.
리턴 string

Parse() 공개 추상적인 메소드

Parses the input.
public abstract Parse ( ) : ITree
리턴 ITree