C# 클래스 xFunc.Maths.Lexer

The lexer for mathematical expressions.
상속: ILexer
파일 보기 프로젝트 열기: sys27/xFunc 1 사용 예제들

공개 메소드들

메소드 설명
Lexer ( ) : System

Initializes a new instance of the Lexer class.

Tokenize ( string function ) : IEnumerable

Converts the string into a sequence of tokens.

비공개 메소드들

메소드 설명
CountParams ( List tokens ) : IEnumerable

Calculates the number of parametes of functions.

CreateConst ( string match, IList tokens ) : void

Creates the constant token from matched string.

CreateFunction ( string match, IList tokens ) : void

Creates the function token from matched string.

CreateOperations ( string match, IList tokens ) : void

Creates the operation token from matched string.

CreateSymbol ( string match, IList tokens ) : void

Creates the symbol token from matched string.

IsBalanced ( string str ) : bool

Determines whether brackets in the specified string is balanced.

_CountParams ( List tokens, int index ) : int

메소드 상세

Lexer() 공개 메소드

Initializes a new instance of the Lexer class.
public Lexer ( ) : System
리턴 System

Tokenize() 공개 메소드

Converts the string into a sequence of tokens.
Throws when the parameter is null or empty. Throws when has the not supported symbol.
public Tokenize ( string function ) : IEnumerable
function string The string that contains the functions and operators.
리턴 IEnumerable