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"]; }
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; } }
public ExpressionWrapper(ExpressionParser parser, F.Expression expr) : base(parser) { this.Expression = expr; }
public Expression(ExpressionParser parser) { this.Parser = parser; }
public IExpressionParser Clone(DebuggerSession session) { ExpressionParser parser = new ExpressionParser (Interpreter); parser.Session = session; return parser; }