Mercurial > octave
diff libinterp/parse-tree/lex.ll @ 22094:9203833cab7d
move new interpreter class to separate file
* libinterp/corefcn/interpreter.cc, libinterp/corefcn/interpreter.h:
New files. Move interpreter class and some supporting functions here
from octave.h, octave.cc, toplev.h, and toplev.cc. Move main_loop
into the interpreter class. Handle exiting with a separate exception
object from interrupts, passing the exit status with the object.
Update other files as needed to remove toplev.h or include
interpreter.h instead of toplev.h.
* libinterp/corefcn/module.mk: Update.
* toplev.h: Deprecate.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Jul 2016 18:05:53 -0400 |
parents | c2c668b3051b |
children | dd992fd74fce |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Tue Jul 12 10:17:45 2016 +0200 +++ b/libinterp/parse-tree/lex.ll Mon Jul 11 18:05:53 2016 -0400 @@ -106,6 +106,7 @@ #include "error.h" #include "errwarn.h" #include "input.h" +#include "interpreter.h" #include "lex.h" #include "octave.h" #include "ov.h" @@ -113,7 +114,6 @@ #include "pt-all.h" #include "symtab.h" #include "token.h" -#include "toplev.h" #include "utils.h" #include "variables.h" #include <oct-parse.h> @@ -2321,8 +2321,7 @@ // Only ask for input from stdin if we are expecting interactive // input. - if (! quitting_gracefully - && octave::application::interactive () + if (octave::application::interactive () && ! (reading_fcn_file || reading_classdef_file || reading_script_file