C# 클래스 Microsoft.Silverlight.Testing.Harness.TagManager.ExpressionEvaluator

Evaluate tag expressions.
Tag expressions are derived from the following EBNF grammar: {Expression} := {Expression} + {Term} | {Expression} - {Term} | {Term} {Term} := {Term} * {Factor} | {Factor} {Factor} := !{Factor} | ({Expression}) | {Tag} {Tag} := All | [^InvalidCharacters]+ The non-terminals for {Expression} and {Term} will be left factored in the recursive descent parser below.
파일 보기 프로젝트 열기: garyjohnson/wpnest

공개 메소드들

메소드 설명
Evaluate ( TagManager owner, string tagExpression ) : IEnumerable

Evaluate a tag expression.

비공개 메소드들

메소드 설명
CreateEmptyList ( ) : List

Creates a new empty collection.

Evaluate ( ) : IEnumerable

Evaluate an expression.

ExpressionEvaluator ( TagManager owner, string tagExpression ) : System

Create an expression evaluator.

Match ( string expected ) : void

Match a sequence of characters.

ReadExpression ( ) : IEnumerable

Evaluate an expression.

We need to factor out left recursion, so: {Expression} := {Expression} + {Term} | {Expression} - {Term} | {Term} becomes: {Expression} := {Term}{Expression'} {Expression'} := #empty# + {Term}{Expression'} - {Term}{Expression'}

ReadExpression ( IEnumerable term ) : IEnumerable

Evaluate an expression.

Non-terminal created for left-factoring: {Expression'} := #empty# + {Term}{Expression'} - {Term}{Expression'}

ReadFactor ( ) : IEnumerable

Evaluate a factor.

{Factor} := !{Factor} | ({Expression}) | {Tag}

ReadTag ( ) : IEnumerable

Evaluate a tag.

{Tag} := All | [^InvalidCharacters]+

ReadTerm ( ) : IEnumerable

Evaluate a term.

We need to factor out left recursion, so: {Term} := {Factor} * {Term} | {Factor} becomes: {Term} := {Factor}{Term'} {Term'} := #empty# ^ {Factor}{Term'}

ReadTerm ( IEnumerable factor ) : IEnumerable

Evaluate a term.

Non-terminal created for left-factoring: {Term'} := #empty# ^ {Factor}{Term'}

TryMatch ( string expected ) : bool

Try to match a sequence of characters.

메소드 상세

Evaluate() 공개 정적인 메소드

Evaluate a tag expression.
public static Evaluate ( TagManager owner, string tagExpression ) : IEnumerable
owner TagManager The owner object.
tagExpression string Tag expression.
리턴 IEnumerable