예제 #1
0
        private void fetchWord()
        {
            String word = "";

            while (Char.IsWhiteSpace(Statement[index]))
            {
                index++;
            }

            // index now points to non-whitespace char
            while (!Char.IsWhiteSpace(Statement[index]))
            {
                word += Statement[index];
                index++;
            }

            // index now points to whitespace char
            // word now contains a whole word
            currentWordType = getWordType(word);
            currentWord     = word;
        }
예제 #2
0
 public ConditionParser(String statement)
 {
     currentWord     = "";
     currentWordType = ENUM_WORD_TYPE.UNKNOWN;
     Parse(statement);
 }