C# 클래스 YAMP.ParseEngine

The parse engine of YAMP. This engine has been introduced with YAMP v1.2 and is called YAMP-PE, which stands for YAMP-ParseEngine.
파일 보기 프로젝트 열기: FlorianRappl/YAMP 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddError ParseEngine
AddError ParseEngine
Advance ParseEngine
Advance ParseEngine
AdvanceTo ParseEngine
AdvanceTo ParseEngine
AdvanceToNextLine ParseEngine
HasMarker System.Boolean
InsertMarker ParseEngine
ParseBlock Statement
ParseStatement Statement
ParseStatement Statement
RemoveMarker ParseEngine
Replace ParseEngine
SetOffset ParseEngine
SetPointer ParseEngine
Skip ParseEngine

공개 메소드들

메소드 설명
IsBlockComment ( Char ch1, Char ch2 ) : System.Boolean

Determines if the given content is a block comment.

IsComment ( Char ch1, Char ch2 ) : System.Boolean

Determines if the given content is a (block or line) comment.

IsIdentifierPart ( Char ch ) : System.Boolean

Determines if the given character is the part of an identifier character.

IsIdentifierStart ( Char ch ) : System.Boolean

Determines if the given character is the start of an identifier.

IsLetter ( Char ch ) : System.Boolean

Determines if the given character is a letter character.

IsLineComment ( Char ch1, Char ch2 ) : System.Boolean

Determines if the given content is a line comment.

IsNewLine ( Char ch ) : System.Boolean

Determines if the given character is a new line character.

IsNumber ( Char ch ) : System.Boolean

Determines if the given character is a number character.

IsWhiteSpace ( Char ch ) : System.Boolean

Determines if the given character is a white space character.

Parse ( ) : ParseEngine

Runs the parser over the inserted query.

Parse ( System.Boolean generateExpressionDebug ) : String

Runs the parser over the inserted query.

ParseEngine ( QueryContext query, ParseContext context ) : System

Creates a new instance of the parse engine.

Reset ( ) : ParseEngine

Resets the complete parse tree.

ToString ( ) : String

Transforms the contained expression blocks into one string.

비공개 메소드들

메소드 설명
AddError ( YAMPParseError error ) : ParseEngine

Add a parse error to the list of parse errors.

AddError ( YAMPParseError error, Block part ) : ParseEngine

Add a parse error to the list of parse errors with the block causing the error.

Advance ( ) : ParseEngine

Advances by one character.

Advance ( Int32 shift ) : ParseEngine

Advances by the specified amount of characters.

AdvanceTo ( Char target ) : ParseEngine

Advances to a specified character.

AdvanceTo ( String target ) : ParseEngine

Advances to a sequence of characters given by string.

AdvanceToNextLine ( ) : ParseEngine

Advances to the next line, i.e. the next new line character.

HasMarker ( Marker marker ) : System.Boolean
InsertMarker ( Marker marker ) : ParseEngine
ParseBlock ( Statement statement, Operator defaultOperator = null ) : Statement

Parses a block with a default operator if no operator has been found.

ParseStatement ( ) : Statement

Standard parsing of a statement (ends with ; or }).

ParseStatement ( Char termination, YAMPParseError>.Func terminationMissing = null, Func handleCharacter = null ) : Statement

More custom parsing of a statement (ends with a custom termination char).

RemoveMarker ( Marker marker ) : ParseEngine
Replace ( Int32 index, Char replacement ) : ParseEngine

Replaces a character at a specified index by the given one.

SetOffset ( Int32 line, Int32 column ) : ParseEngine

Sets an offset of the parser, i.e. sets line and column to (different) values.

SetPointer ( Int32 newPosition ) : ParseEngine

Sets the character pointer to a new position.

Skip ( ) : ParseEngine

Skips to the next significant character avoiding line comments, block comments, whitespaces or new lines.

메소드 상세

IsBlockComment() 공개 정적인 메소드

Determines if the given content is a block comment.
public static IsBlockComment ( Char ch1, Char ch2 ) : System.Boolean
ch1 Char The leading character to be examined.
ch2 Char The succeeding character to be investigated.
리턴 System.Boolean

IsComment() 공개 정적인 메소드

Determines if the given content is a (block or line) comment.
public static IsComment ( Char ch1, Char ch2 ) : System.Boolean
ch1 Char The leading character to be examined.
ch2 Char The succeeding character to be investigated.
리턴 System.Boolean

IsIdentifierPart() 공개 정적인 메소드

Determines if the given character is the part of an identifier character.
public static IsIdentifierPart ( Char ch ) : System.Boolean
ch Char The character to be examined.
리턴 System.Boolean

IsIdentifierStart() 공개 정적인 메소드

Determines if the given character is the start of an identifier.
public static IsIdentifierStart ( Char ch ) : System.Boolean
ch Char The character to be examined.
리턴 System.Boolean

IsLetter() 공개 정적인 메소드

Determines if the given character is a letter character.
public static IsLetter ( Char ch ) : System.Boolean
ch Char The character to be examined.
리턴 System.Boolean

IsLineComment() 공개 정적인 메소드

Determines if the given content is a line comment.
public static IsLineComment ( Char ch1, Char ch2 ) : System.Boolean
ch1 Char The leading character to be examined.
ch2 Char The succeeding character to be investigated.
리턴 System.Boolean

IsNewLine() 공개 정적인 메소드

Determines if the given character is a new line character.
public static IsNewLine ( Char ch ) : System.Boolean
ch Char The character to be examined.
리턴 System.Boolean

IsNumber() 공개 정적인 메소드

Determines if the given character is a number character.
public static IsNumber ( Char ch ) : System.Boolean
ch Char The character to be examined.
리턴 System.Boolean

IsWhiteSpace() 공개 정적인 메소드

Determines if the given character is a white space character.
public static IsWhiteSpace ( Char ch ) : System.Boolean
ch Char The character to be examined.
리턴 System.Boolean

Parse() 공개 메소드

Runs the parser over the inserted query.
public Parse ( ) : ParseEngine
리턴 ParseEngine

Parse() 공개 메소드

Runs the parser over the inserted query.
public Parse ( System.Boolean generateExpressionDebug ) : String
generateExpressionDebug System.Boolean /// Generate a string representation of the Expression tree to help debugging. ///
리턴 String

ParseEngine() 공개 메소드

Creates a new instance of the parse engine.
public ParseEngine ( QueryContext query, ParseContext context ) : System
query QueryContext The query context to consider.
context ParseContext The parser context to use.
리턴 System

Reset() 공개 메소드

Resets the complete parse tree.
public Reset ( ) : ParseEngine
리턴 ParseEngine

ToString() 공개 메소드

Transforms the contained expression blocks into one string.
public ToString ( ) : String
리턴 String