IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Common.TestSelectionParser Class Reference
+ Collaboration diagram for NUnit.Common.TestSelectionParser:

Public Member Functions

string Parse (string input)
 
string ParseFilterExpression ()
 Parse a single term or an or expression, returning the xml More...
 
string ParseFilterTerm ()
 Parse a single element or an and expression and return the xml More...
 
string ParseFilterElement ()
 Parse a single filter element such as a category expression and return the xml representation of the filter. More...
 

Properties

Token LookAhead [get]
 

Private Member Functions

string ParseExpressionInParentheses ()
 
Token Expect (params TokenKind[] kinds)
 
Token Expect (params Token[] valid)
 
Exception InvalidTokenError (Token token)
 
bool LookingAt (params Token[] tokens)
 
Token NextToken ()
 

Static Private Member Functions

static string EmitFilterElement (Token lhs, Token op, Token rhs)
 
static string EmitPropertyElement (Token lhs, Token op, Token rhs)
 
static string EmitElement (string fmt, Token lhs, Token rhs)
 
static string XmlEscape (string text)
 

Private Attributes

Tokenizer _tokenizer
 

Static Private Attributes

static readonly Token LPAREN = new Token(TokenKind.Symbol, "(")
 
static readonly Token RPAREN = new Token(TokenKind.Symbol, ")")
 
static readonly Token AND_OP1 = new Token(TokenKind.Symbol, "&")
 
static readonly Token AND_OP2 = new Token(TokenKind.Symbol, "&&")
 
static readonly Token AND_OP3 = new Token(TokenKind.Word, "and")
 
static readonly Token AND_OP4 = new Token(TokenKind.Word, "AND")
 
static readonly Token OR_OP1 = new Token(TokenKind.Symbol, "|")
 
static readonly Token OR_OP2 = new Token(TokenKind.Symbol, "||")
 
static readonly Token OR_OP3 = new Token(TokenKind.Word, "or")
 
static readonly Token OR_OP4 = new Token(TokenKind.Word, "OR")
 
static readonly Token NOT_OP = new Token(TokenKind.Symbol, "!")
 
static readonly Token EQ_OP1 = new Token(TokenKind.Symbol, "=")
 
static readonly Token EQ_OP2 = new Token(TokenKind.Symbol, "==")
 
static readonly Token NE_OP = new Token(TokenKind.Symbol, "!=")
 
static readonly Token MATCH_OP = new Token(TokenKind.Symbol, "=~")
 
static readonly Token NOMATCH_OP = new Token(TokenKind.Symbol, "!~")
 
static readonly Token[] AND_OPS = new Token[] { AND_OP1, AND_OP2, AND_OP3, AND_OP4 }
 
static readonly Token[] OR_OPS = new Token[] { OR_OP1, OR_OP2, OR_OP3, OR_OP4 }
 
static readonly Token[] EQ_OPS = new Token[] { EQ_OP1, EQ_OP2 }
 
static readonly Token[] REL_OPS = new Token[] { EQ_OP1, EQ_OP2, NE_OP, MATCH_OP, NOMATCH_OP }
 
static readonly Token EOF = new Token(TokenKind.Eof)
 

Member Function Documentation

string NUnit.Common.TestSelectionParser.ParseFilterExpression ( )
inline

Parse a single term or an or expression, returning the xml

Returns
string NUnit.Common.TestSelectionParser.ParseFilterTerm ( )
inline

Parse a single element or an and expression and return the xml

string NUnit.Common.TestSelectionParser.ParseFilterElement ( )
inline

Parse a single filter element such as a category expression and return the xml representation of the filter.

References NUnit.Common.Token.Text.

static string NUnit.Common.TestSelectionParser.EmitFilterElement ( Token  lhs,
Token  op,
Token  rhs 
)
inlinestaticprivate
static string NUnit.Common.TestSelectionParser.EmitPropertyElement ( Token  lhs,
Token  op,
Token  rhs 
)
inlinestaticprivate
static string NUnit.Common.TestSelectionParser.EmitElement ( string  fmt,
Token  lhs,
Token  rhs 
)
inlinestaticprivate
string NUnit.Common.TestSelectionParser.ParseExpressionInParentheses ( )
inlineprivate
Token NUnit.Common.TestSelectionParser.Expect ( params TokenKind[]  kinds)
inlineprivate
Token NUnit.Common.TestSelectionParser.Expect ( params Token[]  valid)
inlineprivate
Exception NUnit.Common.TestSelectionParser.InvalidTokenError ( Token  token)
inlineprivate
bool NUnit.Common.TestSelectionParser.LookingAt ( params Token[]  tokens)
inlineprivate
Token NUnit.Common.TestSelectionParser.NextToken ( )
inlineprivate
static string NUnit.Common.TestSelectionParser.XmlEscape ( string  text)
inlinestaticprivate

Member Data Documentation

Tokenizer NUnit.Common.TestSelectionParser._tokenizer
private
readonly Token NUnit.Common.TestSelectionParser.LPAREN = new Token(TokenKind.Symbol, "(")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.RPAREN = new Token(TokenKind.Symbol, ")")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.AND_OP1 = new Token(TokenKind.Symbol, "&")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.AND_OP2 = new Token(TokenKind.Symbol, "&&")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.AND_OP3 = new Token(TokenKind.Word, "and")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.AND_OP4 = new Token(TokenKind.Word, "AND")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.OR_OP1 = new Token(TokenKind.Symbol, "|")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.OR_OP2 = new Token(TokenKind.Symbol, "||")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.OR_OP3 = new Token(TokenKind.Word, "or")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.OR_OP4 = new Token(TokenKind.Word, "OR")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.NOT_OP = new Token(TokenKind.Symbol, "!")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.EQ_OP1 = new Token(TokenKind.Symbol, "=")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.EQ_OP2 = new Token(TokenKind.Symbol, "==")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.NE_OP = new Token(TokenKind.Symbol, "!=")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.MATCH_OP = new Token(TokenKind.Symbol, "=~")
staticprivate
readonly Token NUnit.Common.TestSelectionParser.NOMATCH_OP = new Token(TokenKind.Symbol, "!~")
staticprivate
readonly Token [] NUnit.Common.TestSelectionParser.AND_OPS = new Token[] { AND_OP1, AND_OP2, AND_OP3, AND_OP4 }
staticprivate
readonly Token [] NUnit.Common.TestSelectionParser.OR_OPS = new Token[] { OR_OP1, OR_OP2, OR_OP3, OR_OP4 }
staticprivate
readonly Token [] NUnit.Common.TestSelectionParser.EQ_OPS = new Token[] { EQ_OP1, EQ_OP2 }
staticprivate
readonly Token [] NUnit.Common.TestSelectionParser.REL_OPS = new Token[] { EQ_OP1, EQ_OP2, NE_OP, MATCH_OP, NOMATCH_OP }
staticprivate
readonly Token NUnit.Common.TestSelectionParser.EOF = new Token(TokenKind.Eof)
staticprivate

Property Documentation

Token NUnit.Common.TestSelectionParser.LookAhead
getprivate

The documentation for this class was generated from the following file: