GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
interpreter.cc File Reference
#include <cstdio>
#include <clocale>
#include <iostream>
#include <set>
#include <string>
#include <thread>
#include "cmd-edit.h"
#include "cmd-hist.h"
#include "file-ops.h"
#include "file-stat.h"
#include "fpucw-wrappers.h"
#include "lo-blas-proto.h"
#include "lo-error.h"
#include "oct-env.h"
#include "quit.h"
#include "str-vec.h"
#include "signal-wrappers.h"
#include "unistd-wrappers.h"
#include "builtin-defun-decls.h"
#include "defaults.h"
#include "Cell.h"
#include "defun.h"
#include "display.h"
#include "error.h"
#include "event-manager.h"
#include "graphics.h"
#include "help.h"
#include "input.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "load-path.h"
#include "load-save.h"
#include "octave.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "oct-mutex.h"
#include "ovl.h"
#include "ov.h"
#include "ov-classdef.h"
#include "parse.h"
#include "pt-classdef.h"
#include "pt-eval.h"
#include "pt-jump.h"
#include "pt-stmt.h"
#include "settings.h"
#include "sighandlers.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "version.h"
Include dependency graph for interpreter.cc:

Go to the source code of this file.

Classes

class  cli_input_reader
 

Macros

#define OCTAVE_IGNORE_EXCEPTION(E)
 
#define OCTAVE_SAFE_CALL(F, ARGS)
 

Functions

OCTAVE_EXPORT octave_value_list F__traditional__ (octave::interpreter &interp, const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list F__version_info__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fatexit (octave::interpreter &interp, const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fquit (octave::interpreter &interp, const octave_value_list &args, int)
 
static void initialize_error_handlers (void)
 
static void initialize_version_info (void)
 
static void initialize_xerbla_error_handler (void)
 
static OCTAVE_NORETURN void lo_error_handler (const char *fmt,...)
 
static OCTAVE_NORETURN void lo_error_with_id_handler (const char *id, const char *fmt,...)
 
static int safe_source_file (const std::string &file_name, const std::string &context="", bool verbose=false, bool require_file=true)
 
static void xerbla_abort (void)
 

Variables

bool octave_initialized = false
 
bool octave_interpreter_ready = false
 
bool quit_allowed = true
 
sys::time Vlast_chdir_time = 0.0
 

Macro Definition Documentation

◆ OCTAVE_IGNORE_EXCEPTION

#define OCTAVE_IGNORE_EXCEPTION (   E)
Value:
catch (E) \
{ \
recover_from_exception (); \
\
std::cerr << "error: ignoring " #E " while preparing to exit" \
<< std::endl; \
}

Definition at line 934 of file interpreter.cc.

◆ OCTAVE_SAFE_CALL

#define OCTAVE_SAFE_CALL (   F,
  ARGS 
)
Value:
do \
{ \
try \
{ \
unwind_action restore_debug_on_error \
(&error_system::set_debug_on_error, &m_error_system, \
m_error_system.debug_on_error ()); \
\
unwind_action restore_debug_on_warning \
(&error_system::set_debug_on_warning, &m_error_system, \
m_error_system.debug_on_warning ()); \
\
m_error_system.debug_on_error (false); \
m_error_system.debug_on_warning (false); \
\
F ARGS; \
} \
OCTAVE_IGNORE_EXCEPTION (const exit_exception&) \
OCTAVE_IGNORE_EXCEPTION (const interrupt_exception&) \
OCTAVE_IGNORE_EXCEPTION (const execution_exception&) \
OCTAVE_IGNORE_EXCEPTION (const std::bad_alloc&) \
} \
while (0)
void set_debug_on_warning(bool flag)
Definition: error.h:88
void set_debug_on_error(bool flag)
Definition: error.h:60

Definition at line 943 of file interpreter.cc.

Function Documentation

◆ F__traditional__()

OCTAVE_EXPORT octave_value_list F__traditional__ ( octave::interpreter &  interp,
const octave_value_list ,
int   
)

Definition at line 312 of file interpreter.cc.

References ovl().

◆ F__version_info__()

OCTAVE_EXPORT octave_value_list F__version_info__ ( const octave_value_list args,
int   
)

◆ Fatexit()

OCTAVE_EXPORT octave_value_list Fatexit ( octave::interpreter &  interp,
const octave_value_list args,
int  nargout 
)

Definition at line 280 of file interpreter.cc.

References ovl(), and print_usage().

◆ Fquit()

OCTAVE_EXPORT octave_value_list Fquit ( octave::interpreter &  interp,
const octave_value_list args,
int   
)

Definition at line 176 of file interpreter.cc.

References error(), numel(), ovl(), and print_usage().

◆ initialize_error_handlers()

◆ initialize_version_info()

static void initialize_version_info ( void  )
static

Definition at line 374 of file interpreter.cc.

References F__version_info__(), OCTAVE_VERSION, and release().

Referenced by interpreter::interpreter().

◆ initialize_xerbla_error_handler()

static void initialize_xerbla_error_handler ( void  )
static

Definition at line 391 of file interpreter.cc.

References F77_FUNC(), NaN, octave_set_xerbla_handler(), and xerbla_abort().

Referenced by interpreter::interpreter().

◆ lo_error_handler()

static OCTAVE_NORETURN void lo_error_handler ( const char *  fmt,
  ... 
)
static

Definition at line 421 of file interpreter.cc.

References verror_with_cfn().

Referenced by initialize_error_handlers().

◆ lo_error_with_id_handler()

static OCTAVE_NORETURN void lo_error_with_id_handler ( const char *  id,
const char *  fmt,
  ... 
)
static

Definition at line 432 of file interpreter.cc.

References verror_with_id_cfn().

Referenced by initialize_error_handlers().

◆ safe_source_file()

static int safe_source_file ( const std::string &  file_name,
const std::string &  context = "",
bool  verbose = false,
bool  require_file = true 
)
static

◆ xerbla_abort()

static void xerbla_abort ( void  )
static

Definition at line 386 of file interpreter.cc.

References error().

Referenced by initialize_xerbla_error_handler().

Variable Documentation

◆ octave_initialized

bool octave_initialized = false

Definition at line 94 of file interpreter.cc.

Referenced by generic_sig_handler(), and interpreter::initialize().

◆ octave_interpreter_ready

bool octave_interpreter_ready = false

Definition at line 91 of file interpreter.cc.

Referenced by interpreter::interpreter(), and load_path::execute_pkg_add_or_del().

◆ quit_allowed

bool quit_allowed = true

◆ Vlast_chdir_time

sys::time Vlast_chdir_time = 0.0

Definition at line 340 of file interpreter.cc.

Referenced by interpreter::chdir(), and out_of_date_check().