コード例 #1
0
        public void readCheck(Table tab)
        {
            current = getNextToken(current, ref token);
            if (token == "(") {
                string check = String.Empty;
                current = getNextToken(current, ref token);
                string attr = token;
                int openBrackets = 1;
                while (openBrackets > 0 && current.Length != 0 && !hFile.EndOfStream) {
                    check += " " + token;
                    current = getNextToken(current, ref token);
                    if (token == ")") {
                        openBrackets --;
                    }
                    if (token == "(") {
                        openBrackets ++;
                    }
                }

                if (!tab.setAttributeCheck(attr, check)) {
                    Console.WriteLine("could not find attribute " + attr + " in table " + tab.getName() + " to add the check.");
                }
                current = getNextToken(current, ref token);
            }
        }