Пример #1
0
        public LexerScanner(TextReader reader, Context context)
        {
            this.lexer = new LexerMarker(reader);
            this.context = context;

            this.executorCharacter = context.ExecutorCharacter;
            this.seperatorCharacter = context.SeparatorCharacter;
            this.listEncapsulation = context.ListEncapsulation;
            this.vectorEncapsulation = context.VectorEncapsulation;
            this.setEncapsulation = context.SetEncapsulation;
            this.scalarEncapsulation = context.ScalarEncapsulation;
            this.literalEncapsulation = context.LiteralEncapsulation;
        }
Пример #2
0
        //private bool IsSystemTextIdentifier(string s)
        //{
        //    return s == "define" || s == "instantiate";

        //        //s.Equals("if") || s.Equals("then") || s.Equals("else")
        //        //|| s.Equals("elseif") || s.Equals("while") || s.Equals("do")
        //        //|| s.Equals("for") || s.Equals("end");
        //}
        #endregion

        #region Reset
        /// <summary>Clear the buffer. Replace the current stream with a new one.</summary>
        public void Reset(TextReader reader, Context context)
        {
            lexer.Reset(reader);
            this.context = context;

            this.executorCharacter    = context.ExecutorCharacter;
            this.seperatorCharacter   = context.SeparatorCharacter;
            this.listEncapsulation    = context.ListEncapsulation;
            this.vectorEncapsulation  = context.VectorEncapsulation;
            this.setEncapsulation     = context.SetEncapsulation;
            this.scalarEncapsulation  = context.ScalarEncapsulation;
            this.literalEncapsulation = context.LiteralEncapsulation;
        }
Пример #3
0
        public LexerScanner(TextReader reader, Context context)
        {
            this.lexer   = new LexerMarker(reader);
            this.context = context;

            this.executorCharacter    = context.ExecutorCharacter;
            this.seperatorCharacter   = context.SeparatorCharacter;
            this.listEncapsulation    = context.ListEncapsulation;
            this.vectorEncapsulation  = context.VectorEncapsulation;
            this.setEncapsulation     = context.SetEncapsulation;
            this.scalarEncapsulation  = context.ScalarEncapsulation;
            this.literalEncapsulation = context.LiteralEncapsulation;
        }
Пример #4
0
        public LexerScanner(TextReader reader)
        {
            if(reader == null)
                throw new ArgumentNullException("reader");

            this.lexer = new LexerMarker(reader);
            this.library = Service<ILibrary>.Instance;

            this.executorCharacter = Config.ExecutorCharacter;
            this.seperatorCharacter = Config.SeparatorCharacter;
            this.listEncapsulation = Config.ListEncapsulation;
            this.vectorEncapsulation = Config.VectorEncapsulation;
            this.setEncapsulation = Config.SetEncapsulation;
            this.scalarEncapsulation = Config.ScalarEncapsulation;
            this.literalEncapsulation = Config.LiteralEncapsulation;
        }
Пример #5
0
        //private bool IsSystemTextIdentifier(string s)
        //{
        //    return s == "define" || s == "instantiate";

        //        //s.Equals("if") || s.Equals("then") || s.Equals("else")
        //        //|| s.Equals("elseif") || s.Equals("while") || s.Equals("do")
        //        //|| s.Equals("for") || s.Equals("end");
        //}
        #endregion

        #region Reset
        /// <summary>Clear the buffer. Replace the current stream with a new one.</summary>
        public void Reset(TextReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            lexer.Reset(reader);

            this.executorCharacter    = Config.ExecutorCharacter;
            this.seperatorCharacter   = Config.SeparatorCharacter;
            this.listEncapsulation    = Config.ListEncapsulation;
            this.vectorEncapsulation  = Config.VectorEncapsulation;
            this.setEncapsulation     = Config.SetEncapsulation;
            this.scalarEncapsulation  = Config.ScalarEncapsulation;
            this.literalEncapsulation = Config.LiteralEncapsulation;
        }
Пример #6
0
        public LexerScanner(TextReader reader, Context context)
        {
            if(context == null)
                throw new ArgumentNullException("context");
            if(reader == null)
                throw new ArgumentNullException("reader");

            this.lexer = new LexerMarker(reader);
            this.context = context;

            this.executorCharacter = context.ExecutorCharacter;
            this.seperatorCharacter = context.SeparatorCharacter;
            this.listEncapsulation = context.ListEncapsulation;
            this.vectorEncapsulation = context.VectorEncapsulation;
            this.setEncapsulation = context.SetEncapsulation;
            this.scalarEncapsulation = context.ScalarEncapsulation;
            this.literalEncapsulation = context.LiteralEncapsulation;
        }
Пример #7
0
        public LexerScanner(TextReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            this.lexer   = new LexerMarker(reader);
            this.library = Service <ILibrary> .Instance;

            this.executorCharacter    = Config.ExecutorCharacter;
            this.seperatorCharacter   = Config.SeparatorCharacter;
            this.listEncapsulation    = Config.ListEncapsulation;
            this.vectorEncapsulation  = Config.VectorEncapsulation;
            this.setEncapsulation     = Config.SetEncapsulation;
            this.scalarEncapsulation  = Config.ScalarEncapsulation;
            this.literalEncapsulation = Config.LiteralEncapsulation;
        }
Пример #8
0
        //private bool IsSystemTextIdentifier(string s)
        //{
        //    return s == "define" || s == "instantiate";

        //        //s.Equals("if") || s.Equals("then") || s.Equals("else")
        //        //|| s.Equals("elseif") || s.Equals("while") || s.Equals("do")
        //        //|| s.Equals("for") || s.Equals("end");
        //}
        #endregion

        #region Reset
        /// <summary>Clear the buffer. Replace the current stream with a new one.</summary>
        public void Reset(TextReader reader, Context context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            lexer.Reset(reader);
            this.context = context;

            this.executorCharacter    = context.ExecutorCharacter;
            this.seperatorCharacter   = context.SeparatorCharacter;
            this.listEncapsulation    = context.ListEncapsulation;
            this.vectorEncapsulation  = context.VectorEncapsulation;
            this.setEncapsulation     = context.SetEncapsulation;
            this.scalarEncapsulation  = context.ScalarEncapsulation;
            this.literalEncapsulation = context.LiteralEncapsulation;
        }
Пример #9
0
        //private bool IsSystemTextIdentifier(string s)
        //{
        //    return s == "define" || s == "instantiate";
                
        //        //s.Equals("if") || s.Equals("then") || s.Equals("else")
        //        //|| s.Equals("elseif") || s.Equals("while") || s.Equals("do")
        //        //|| s.Equals("for") || s.Equals("end");
        //}
        #endregion

        #region Reset
        /// <summary>Clear the buffer. Replace the current stream with a new one.</summary>
        public void Reset(TextReader reader, Context context)
        {
            lexer.Reset(reader);
            this.context = context;

            this.executorCharacter = context.ExecutorCharacter;
            this.seperatorCharacter = context.SeparatorCharacter;
            this.listEncapsulation = context.ListEncapsulation;
            this.vectorEncapsulation = context.VectorEncapsulation;
            this.setEncapsulation = context.SetEncapsulation;
            this.scalarEncapsulation = context.ScalarEncapsulation;
            this.literalEncapsulation = context.LiteralEncapsulation;
        }
Пример #10
0
        /// <summary>Clear the buffer. Replace the current stream with a new one.</summary>
        public void Reset(TextReader reader)
        {
            if(reader == null)
                throw new ArgumentNullException("reader");

            lexer.Reset(reader);

            this.executorCharacter = Config.ExecutorCharacter;
            this.seperatorCharacter = Config.SeparatorCharacter;
            this.listEncapsulation = Config.ListEncapsulation;
            this.vectorEncapsulation = Config.VectorEncapsulation;
            this.setEncapsulation = Config.SetEncapsulation;
            this.scalarEncapsulation = Config.ScalarEncapsulation;
            this.literalEncapsulation = Config.LiteralEncapsulation;
        }