Наследование: IExpressionParser
Пример #1
0
        public Interpreter(bool is_interactive, DebuggerConfiguration config,
				    DebuggerOptions options)
        {
            this.config = config;
            this.is_interactive = is_interactive;
            this.is_script = options.IsScript;
            this.parser = new ExpressionParser (this);
            this.session = new DebuggerSession (config, options, "main", parser);
            this.engine = new DebuggerEngine (this);

            parser.Session = session;

            source_factory = new SourceFileFactory ();

            interrupt_event = new ManualResetEvent (false);
            process_event = new ManualResetEvent (false);

            styles = new Hashtable ();
            styles.Add ("cli", new StyleCLI (this));
            styles.Add ("emacs", new StyleEmacs (this));
            current_style = (StyleBase) styles ["cli"];
        }
Пример #2
0
        public Process LoadSession(Stream stream)
        {
            if ((debugger != null) || (main_process != null))
                throw new TargetException (TargetError.AlreadyHaveTarget);

            try {
                debugger = new Debugger (config);
                parser = new ExpressionParser (this);
                session = new DebuggerSession (config, stream, parser);
                parser.Session = session;

                new InterpreterEventSink (this, debugger);

                CommandResult result;
                current_process = main_process = debugger.Run (session, out result);
                current_thread = current_process.MainThread;

                Wait (result);

                return current_process;
            } catch (TargetException ex) {
                Console.WriteLine ("Got a TargetException during LoadSession: {0}", ex);
                debugger.Dispose ();
                debugger = null;
                throw;
            } catch (Exception ex) {
                Console.WriteLine ("Got an Exception during LoadSession: {0}", ex);
                debugger.Dispose ();
                debugger = null;
                throw;
            }
        }
Пример #3
0
 public ExpressionWrapper(ExpressionParser parser, F.Expression expr)
     : base(parser)
 {
     this.Expression = expr;
 }
Пример #4
0
 public Expression(ExpressionParser parser)
 {
     this.Parser = parser;
 }
Пример #5
0
 public IExpressionParser Clone(DebuggerSession session)
 {
     ExpressionParser parser = new ExpressionParser (Interpreter);
     parser.Session = session;
     return parser;
 }
Пример #6
0
 public ExpressionWrapper(ExpressionParser parser, F.Expression expr)
     : base(parser)
 {
     this.Expression = expr;
 }
Пример #7
0
 public Expression(ExpressionParser parser)
 {
     this.Parser = parser;
 }