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.Tokenizer Class Reference

Tokenizer class performs lexical analysis for the TestSelectionParser. It recognizes a very limited set of tokens: words, symbols and quoted strings. This is sufficient for the simple DSL we use to select which tests to run. More...

+ Collaboration diagram for NUnit.Common.Tokenizer:

Public Member Functions

 Tokenizer (string input)
 
Token NextToken ()
 

Properties

Token LookAhead [get]
 
char NextChar [get]
 Peek ahead at the next character in input More...
 

Private Member Functions

Token GetNextToken ()
 
bool IsWordChar (char c)
 
Token GetWord ()
 
Token GetString ()
 
char GetChar ()
 Get the next character in the input, consuming it. More...
 
void SkipBlanks ()
 

Private Attributes

string _input
 
int _index
 
const char EOF_CHAR = '\0'
 
const string WORD_BREAK_CHARS = "=!()&|"
 
readonly string[] DOUBLE_CHAR_SYMBOLS = new string[] { "==", "=~", "!=", "!~", "&&", "||" }
 
Token _lookahead
 

Detailed Description

Tokenizer class performs lexical analysis for the TestSelectionParser. It recognizes a very limited set of tokens: words, symbols and quoted strings. This is sufficient for the simple DSL we use to select which tests to run.

Constructor & Destructor Documentation

NUnit.Common.Tokenizer.Tokenizer ( string  input)
inline

Member Function Documentation

Token NUnit.Common.Tokenizer.NextToken ( )
inline
Token NUnit.Common.Tokenizer.GetNextToken ( )
inlineprivate
bool NUnit.Common.Tokenizer.IsWordChar ( char  c)
inlineprivate
Token NUnit.Common.Tokenizer.GetWord ( )
inlineprivate
Token NUnit.Common.Tokenizer.GetString ( )
inlineprivate
char NUnit.Common.Tokenizer.GetChar ( )
inlineprivate

Get the next character in the input, consuming it.

Returns
The next char
void NUnit.Common.Tokenizer.SkipBlanks ( )
inlineprivate

Member Data Documentation

string NUnit.Common.Tokenizer._input
private
int NUnit.Common.Tokenizer._index
private
const char NUnit.Common.Tokenizer.EOF_CHAR = '\0'
private
const string NUnit.Common.Tokenizer.WORD_BREAK_CHARS = "=!()&|"
private
readonly string [] NUnit.Common.Tokenizer.DOUBLE_CHAR_SYMBOLS = new string[] { "==", "=~", "!=", "!~", "&&", "||" }
private
Token NUnit.Common.Tokenizer._lookahead
private

Property Documentation

Token NUnit.Common.Tokenizer.LookAhead
get
char NUnit.Common.Tokenizer.NextChar
getprivate

Peek ahead at the next character in input


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