示例#1
0
 private Parser(ICommandResultInternal element, char[] charArray, bool cleancls)
 {
     this.currentCommand2 = element;
     this.charArray = charArray;
     this.cleancls = cleancls;
 }
示例#2
0
        private bool TryCommand(ref int pos)
        {
            int savedpos = pos;

            StringBuilder sb = new StringBuilder(50);

            do
            {
                sb.Append(charArray[savedpos]);
                savedpos++;
            } while (ParseValue(savedpos) == Token.AlphaNumeric);

            if (ParseValue(savedpos) == Token.WhiteSpace || ParseValue(savedpos) == Token.End)
            {
                ICommandResultInternal command = (from obj in currentCommand2.Commands
                                                  from obj2 in obj.Token.SplitInternal()
                                                  where sb.ToString() == obj2
                                                  select obj).SingleOrDefault();

                if(command != null)
                {
                    command.IsSet=true;
                    currentCommand2 = command;
                    pos = savedpos;
                    return true;
                }
            }

            return false;
        }
示例#3
0
 //*****new Stuff*****
 internal Parser(ICommandResultInternal element, string commandLine, bool cleancls)
     : this(element, commandLine.ToCharArray(), cleancls)
 {
 }