C# 클래스 BitOrchestra.Parser

Contains parser-related functions.
파일 보기 프로젝트 열기: dzamkov/Bit-Orchestra

공개 프로퍼티들

프로퍼티 타입 설명
Parameter string
Resolution string
Result string

공개 메소드들

메소드 설명
AcceptAssignment ( Expression>.Dictionary Variables, string Text, int &Index, string &Name, Expression &Value, int &ErrorIndex ) : bool

Tries parsing an assignment.

AcceptComment ( string Text, int &Index, bool &Multiline ) : bool

Tries parsing a comment in the given text.

AcceptExpression ( Expression>.Dictionary Variables, string Text, int &Index, Expression &Expression, int &ErrorIndex ) : bool

Tries parsing an expression in the given text.

AcceptExtendedWhitespace ( string Text, int &Index ) : bool

Tries parsing extended whitespace (whitespace, comments, newlines) in the given text.

AcceptInteger ( string Text, int &Index, int &Value, int &ErrorIndex ) : bool

Tries parsing an integer value given in binary, decimal or hexadecimal.

AcceptLiteral ( string Text, int &Index, Expression &Term, int &ErrorIndex ) : bool

Tries parsing a literal term in the given text.

AcceptNewline ( string Text, int &Index ) : bool

Tries parsing a newline in the given text.

AcceptOperator ( string Text, int &Index, Operator &Operator ) : bool

Tries parsing an operator in the given text.

AcceptOption ( string Text, int &Index, SoundOptions Options, int &ErrorIndex ) : bool

Tries parsing an option and applying it to the given sound options structure.

AcceptOption ( string Text, int &Index, string &Name, int &Value, int &ErrorIndex ) : bool

Tries parsing an option.

AcceptProgram ( string Text, int &Index, Expression>.Dictionary &Variables, SoundOptions &Options, int &ErrorIndex ) : void

Parses a program in the given text.

AcceptString ( string Target, string Text, int &Index ) : bool

Tries parsing the target string in the given text.

AcceptTerm ( Expression>.Dictionary Variables, string Text, int &Index, Expression &Term, int &ErrorIndex ) : bool

Tries parsing a term in the given text.

AcceptWhitespace ( string Text, int &Index ) : bool

Tries parsing whitespace (tabs and spaces) in the given text.

AcceptWord ( string Text, int &Index, string &Word ) : bool

Tries parsing a word in the given text.

IsDecimalDigit ( char Char, int &Value ) : bool

Determines wether the given character is a decimal digit, if so, returns its value.

IsHexadecimalDigit ( char Char, int &Value ) : bool

Determines wether the given character is a hexadecimal digit, if so, returns its value.

IsWordChar ( char Char ) : bool

Determines wether the given character is valid in a word. Note that digits are not valid as the first character in a word.

Parse ( string Text, Expression &Expression, SoundOptions &Options, int &ErrorIndex ) : bool

Parses the given text and either returns true with an expression and sound options, or false with an error index.

Parse ( string Text, int TargetIndex, int TargetLength, Expression &Expression, SoundOptions &Options, int &ErrorIndex ) : bool

Parses the given text (or as much as possible of it) and returns the expression for the specified target string, or false with an error index.

메소드 상세

AcceptAssignment() 공개 정적인 메소드

Tries parsing an assignment.
public static AcceptAssignment ( Expression>.Dictionary Variables, string Text, int &Index, string &Name, Expression &Value, int &ErrorIndex ) : bool
Variables Expression>.Dictionary
Text string
Index int
Name string
Value Expression
ErrorIndex int
리턴 bool

AcceptComment() 공개 정적인 메소드

Tries parsing a comment in the given text.
public static AcceptComment ( string Text, int &Index, bool &Multiline ) : bool
Text string
Index int
Multiline bool
리턴 bool

AcceptExpression() 공개 정적인 메소드

Tries parsing an expression in the given text.
public static AcceptExpression ( Expression>.Dictionary Variables, string Text, int &Index, Expression &Expression, int &ErrorIndex ) : bool
Variables Expression>.Dictionary
Text string
Index int
Expression Expression
ErrorIndex int
리턴 bool

AcceptExtendedWhitespace() 공개 정적인 메소드

Tries parsing extended whitespace (whitespace, comments, newlines) in the given text.
public static AcceptExtendedWhitespace ( string Text, int &Index ) : bool
Text string
Index int
리턴 bool

AcceptInteger() 공개 정적인 메소드

Tries parsing an integer value given in binary, decimal or hexadecimal.
public static AcceptInteger ( string Text, int &Index, int &Value, int &ErrorIndex ) : bool
Text string
Index int
Value int
ErrorIndex int
리턴 bool

AcceptLiteral() 공개 정적인 메소드

Tries parsing a literal term in the given text.
public static AcceptLiteral ( string Text, int &Index, Expression &Term, int &ErrorIndex ) : bool
Text string
Index int
Term Expression
ErrorIndex int
리턴 bool

AcceptNewline() 공개 정적인 메소드

Tries parsing a newline in the given text.
public static AcceptNewline ( string Text, int &Index ) : bool
Text string
Index int
리턴 bool

AcceptOperator() 공개 정적인 메소드

Tries parsing an operator in the given text.
public static AcceptOperator ( string Text, int &Index, Operator &Operator ) : bool
Text string
Index int
Operator Operator
리턴 bool

AcceptOption() 공개 정적인 메소드

Tries parsing an option and applying it to the given sound options structure.
public static AcceptOption ( string Text, int &Index, SoundOptions Options, int &ErrorIndex ) : bool
Text string
Index int
Options SoundOptions
ErrorIndex int
리턴 bool

AcceptOption() 공개 정적인 메소드

Tries parsing an option.
public static AcceptOption ( string Text, int &Index, string &Name, int &Value, int &ErrorIndex ) : bool
Text string
Index int
Name string
Value int
ErrorIndex int
리턴 bool

AcceptProgram() 공개 정적인 메소드

Parses a program in the given text.
public static AcceptProgram ( string Text, int &Index, Expression>.Dictionary &Variables, SoundOptions &Options, int &ErrorIndex ) : void
Text string
Index int
Variables Expression>.Dictionary
Options SoundOptions
ErrorIndex int
리턴 void

AcceptString() 공개 정적인 메소드

Tries parsing the target string in the given text.
public static AcceptString ( string Target, string Text, int &Index ) : bool
Target string
Text string
Index int
리턴 bool

AcceptTerm() 공개 정적인 메소드

Tries parsing a term in the given text.
public static AcceptTerm ( Expression>.Dictionary Variables, string Text, int &Index, Expression &Term, int &ErrorIndex ) : bool
Variables Expression>.Dictionary
Text string
Index int
Term Expression
ErrorIndex int
리턴 bool

AcceptWhitespace() 공개 정적인 메소드

Tries parsing whitespace (tabs and spaces) in the given text.
public static AcceptWhitespace ( string Text, int &Index ) : bool
Text string
Index int
리턴 bool

AcceptWord() 공개 정적인 메소드

Tries parsing a word in the given text.
public static AcceptWord ( string Text, int &Index, string &Word ) : bool
Text string
Index int
Word string
리턴 bool

IsDecimalDigit() 공개 정적인 메소드

Determines wether the given character is a decimal digit, if so, returns its value.
public static IsDecimalDigit ( char Char, int &Value ) : bool
Char char
Value int
리턴 bool

IsHexadecimalDigit() 공개 정적인 메소드

Determines wether the given character is a hexadecimal digit, if so, returns its value.
public static IsHexadecimalDigit ( char Char, int &Value ) : bool
Char char
Value int
리턴 bool

IsWordChar() 공개 정적인 메소드

Determines wether the given character is valid in a word. Note that digits are not valid as the first character in a word.
public static IsWordChar ( char Char ) : bool
Char char
리턴 bool

Parse() 공개 정적인 메소드

Parses the given text and either returns true with an expression and sound options, or false with an error index.
public static Parse ( string Text, Expression &Expression, SoundOptions &Options, int &ErrorIndex ) : bool
Text string
Expression Expression
Options SoundOptions
ErrorIndex int
리턴 bool

Parse() 공개 정적인 메소드

Parses the given text (or as much as possible of it) and returns the expression for the specified target string, or false with an error index.
public static Parse ( string Text, int TargetIndex, int TargetLength, Expression &Expression, SoundOptions &Options, int &ErrorIndex ) : bool
Text string
TargetIndex int
TargetLength int
Expression Expression
Options SoundOptions
ErrorIndex int
리턴 bool

프로퍼티 상세

Parameter 공개적으로 정적으로 프로퍼티

The variable for the parameter of an expression.
public static string Parameter
리턴 string

Resolution 공개적으로 정적으로 프로퍼티

The variable for the resolution of a running expression.
public static string Resolution
리턴 string

Result 공개적으로 정적으로 프로퍼티

The variable for the result of an expression.
public static string Result
리턴 string