Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MibDocument"/> class.
        /// </summary>
        /// <param name="lexer">The lexer.</param>
        public MibDocument(Lexer lexer)
        {
            ISymbolEnumerator symbols = lexer.GetEnumerator();

            Symbol current;
            while ((current = symbols.NextNonEOLSymbol()) != null)
            {
                symbols.PutBack(current);
                _modules.Add(new MibModule(symbols));                
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MibDocument"/> class.
        /// </summary>
        /// <param name="lexer">The lexer.</param>
        public MibDocument(Lexer lexer)
        {
            ISymbolEnumerator symbols = lexer.GetEnumerator();

            Symbol current;

            while ((current = symbols.NextNonEOLSymbol()) != null)
            {
                symbols.PutBack(current);
                _modules.Add(new MibModule(symbols));
            }
        }