Exemple #1
0
        /// <summary>
        /// Parses the set source.
        /// </summary>
        public void Parse()
        {
            var token = _tokenizer.Get();

            Prolog(token);

            while (token.Type != DtdTokenType.EOF)
            {
                token = _tokenizer.Get();
                Consume(token);
            }

            _result.Text = _tokenizer.Content;
        }
Exemple #2
0
        public void Parse()
        {
            var      start = _src.InsertionPoint;
            DtdToken token;

            do
            {
                token = tokenizer.Get();
                Consume(token);
            }while (token.Type != DtdTokenType.EOF);

            var end = _src.InsertionPoint;
            var sb  = new StringBuilder();

            _src.InsertionPoint = start;
            var c = _src.Current;

            for (int i = start; i < end; i++)
            {
                sb.Append(c);
                c = _src.Next;
            }

            _result.Text = sb.ToString();
        }