C# Класс BitOrchestra.Parser

Contains parser-related functions.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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