23 #if defined (HAVE_CONFIG_H) 48 m_arg_nm (), m_dyn_field () { }
54 m_arg_nm (), m_dyn_field ()
63 m_arg_nm (), m_dyn_field ()
72 m_arg_nm (), m_dyn_field ()
83 m_dyn_field.push_back (static_cast<tree_expression *> (
nullptr));
86 error (
"invalid use of empty argument (~) in index expression");
92 m_args.push_back (static_cast<tree_argument_list *> (
nullptr));
95 m_dyn_field.push_back (static_cast<tree_expression *> (
nullptr));
101 m_args.push_back (static_cast<tree_argument_list *> (
nullptr));
113 std::list<tree_argument_list *>::iterator
p =
m_args.begin ();
120 std::list<tree_expression *>::iterator
p =
m_dyn_field.begin ();
131 if (elt && elt->has_magic_end ())
158 &&
object->is_undefined ())
167 retval.stash_name_tags (m_arg_nm);
175 std::list<string_vector>::const_iterator p_arg_nm,
176 std::list<tree_expression *>::const_iterator p_dyn_field)
const 188 fn =
t.xstring_value (
"dynamic structure field names must be strings");
226 extra_message =
" (note: variable '" +
var +
"' shadows function)";
240 std::list<octave_value_list> idx;
245 std::list<tree_argument_list *>::iterator p_args =
m_args.begin ();
246 std::list<string_vector>::iterator p_arg_nm =
m_arg_nm.begin ();
247 std::list<tree_expression *>::iterator p_dyn_field =
m_dyn_field.begin ();
254 std::list<octave_value_list> tmpidx;
256 for (
int i = 0;
i < n;
i++)
265 tmp =
tmp.subsref (
m_type.substr (tmpi,
i-tmpi), tmpidx,
true);
282 idx.push_back (tidx);
287 error (
"() must be followed by . or close the index chain");
289 tmpidx.push_back (tidx);
300 if (
tmp.is_undefined ())
307 else if (
tmp.is_zero_by_zero ()
308 && (
tmp.is_matrix_type () ||
tmp.is_string ()))
315 idx.push_back (tidx);
316 tmpidx.push_back (tidx);
325 bool autoconv = (
tmp.is_zero_by_zero ()
326 && (
tmp.is_matrix_type () ||
tmp.is_string ()
335 if (
tmp.is_undefined ())
348 tmpidx.push_back (tidx);
352 if (
tmp.is_undefined () || autoconv)
362 tmpidx.push_back (tidx);
366 idx.push_back (tidx);
374 if (idx.back ().empty ())
375 error (
"invalid empty index list");
395 std::list<tree_argument_list *> new_args;
398 new_args.push_back (elt ? elt->dup (scope) :
nullptr);
400 new_idx_expr->
m_args = new_args;
406 std::list<tree_expression *> new_dyn_field;
409 new_dyn_field.push_back (elt ? elt->dup (scope) :
nullptr);
virtual std::string name(void) const
static void final_index_error(octave::index_exception &e, const octave::tree_expression *expr)
bool has_magic_end(void) const
octave_value find_function(const std::string &name, const octave_value_list &args=octave_value_list(), bool local_funcs=true)
symbol_record::context_id current_context(void) const
virtual int column(void) const
tree_index_expression * dup(symbol_scope &scope) const
bool has_magic_colon(void) const
void error(const char *fmt,...)
static llvm::LLVMContext & context
octave_lvalue lvalue(tree_evaluator *tw)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
tree_index_expression(tree_expression *e=nullptr, tree_argument_list *lst=nullptr, int l=-1, int c=-1, char t='(')
bool has_magic_tilde(void) const
std::string name(void) const
void err_indexed_cs_list(void)
symbol_table & __get_symbol_table__(const std::string &who)
std::list< tree_argument_list * > m_args
octave_idx_type numel(const octave_value_list &idx)
void error_with_id(const char *id, const char *fmt,...)
virtual void copy_base(const tree_expression &e)
string_vector get_arg_names(void) const
bool is_function(void) const
static bool is_variable(octave::symbol_table &symtab, const std::string &name)
#define panic_impossible()
std::list< string_vector > m_arg_nm
virtual bool is_identifier(void) const
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
std::list< tree_expression * > m_dyn_field
virtual octave_lvalue lvalue(tree_evaluator *)
static octave_value_list make_value_list(octave::tree_evaluator *tw, octave::tree_argument_list *m_args, const string_vector &m_arg_nm, const octave_value *object, bool rvalue=true)
void err_invalid_inquiry_subscript(void)
octave_value evaluate(tree_expression *expr, int nargout=1)
octave_value_list convert_to_const_vector(tree_evaluator *tw, const octave_value *object=nullptr)
bool has_magic_end(void) const
~tree_index_expression(void)
virtual octave_function * function_value(bool silent=false)
octave_idx_type length(void) const
void append(tree_argument_list *lst=nullptr, char t='(')
std::string name(void) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
virtual tree_expression * dup(symbol_scope &scope) const =0
std::string get_struct_index(tree_evaluator *tw, std::list< string_vector >::const_iterator p_arg_nm, std::list< tree_expression *>::const_iterator p_dyn_field) const