GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::base_parser Class Referenceabstract

#include "parse.h"

Inheritance diagram for octave::base_parser:
Collaboration diagram for octave::base_parser:

Classes

class  parent_scope_info
 

Public Member Functions

OCTINTERP_API base_parser (base_lexer &lxr)
 
 base_parser (const base_parser &)=delete
 
virtual ~base_parser (void)
 
OCTINTERP_API tree_args_block_validation_list * append_args_validation_list (tree_args_block_validation_list *list, tree_arg_validation *arg_validation)
 
OCTINTERP_API tree_argument_list * append_argument_list (tree_argument_list *list, tree_expression *expr)
 
OCTINTERP_API tree_cell * append_cell_row (tree_cell *cell, tree_argument_list *row)
 
OCTINTERP_API tree_classdef_attribute_list * append_classdef_attribute (tree_classdef_attribute_list *list, tree_classdef_attribute *elt)
 
OCTINTERP_API tree_classdef_enum_list * append_classdef_enum (tree_classdef_enum_list *list, tree_classdef_enum *elt)
 
OCTINTERP_API tree_classdef_body * append_classdef_enum_block (tree_classdef_body *body, tree_classdef_enum_block *block)
 
OCTINTERP_API tree_classdef_events_list * append_classdef_event (tree_classdef_events_list *list, tree_classdef_event *elt)
 
OCTINTERP_API tree_classdef_body * append_classdef_events_block (tree_classdef_body *body, tree_classdef_events_block *block)
 
OCTINTERP_API tree_classdef_methods_list * append_classdef_method (tree_classdef_methods_list *list, tree_function_def *fcn_def)
 
OCTINTERP_API tree_classdef_body * append_classdef_methods_block (tree_classdef_body *body, tree_classdef_methods_block *block)
 
OCTINTERP_API tree_classdef_body * append_classdef_properties_block (tree_classdef_body *body, tree_classdef_properties_block *block)
 
OCTINTERP_API tree_classdef_property_list * append_classdef_property (tree_classdef_property_list *list, tree_classdef_property *elt)
 
OCTINTERP_API tree_classdef_superclass_list * append_classdef_superclass (tree_classdef_superclass_list *list, tree_classdef_superclass *elt)
 
OCTINTERP_API tree_decl_init_list * append_decl_init_list (tree_decl_init_list *list, tree_decl_elt *elt)
 
OCTINTERP_API tree_statement_list * append_function_body (tree_statement_list *body, tree_statement_list *list)
 
OCTINTERP_API tree_if_command_list * append_if_clause (tree_if_command_list *list, tree_if_clause *clause)
 
OCTINTERP_API tree_matrix * append_matrix_row (tree_matrix *matrix, tree_argument_list *row)
 
OCTINTERP_API tree_parameter_list * append_parameter_list (tree_parameter_list *list, tree_decl_elt *t)
 
OCTINTERP_API tree_parameter_list * append_parameter_list (tree_parameter_list *list, tree_identifier *id)
 
OCTINTERP_API tree_statement_list * append_statement_list (tree_statement_list *list, char sep, tree_statement *stmt, bool warn_missing_semi)
 
OCTINTERP_API tree_switch_case_list * append_switch_case (tree_switch_case_list *list, tree_switch_case *elt)
 
bool at_end_of_input (void) const
 
OCTINTERP_API void bison_error (const parse_exception &pe)
 
OCTINTERP_API void bison_error (const std::list< parse_exception > &pe)
 
OCTINTERP_API void bison_error (const std::string &s)
 
OCTINTERP_API void bison_error (const std::string &s, const filepos &pos)
 
OCTINTERP_API void bison_error (const std::string &s, int line, int column)
 
void classdef_object (const std::shared_ptr< tree_classdef > &obj)
 
std::shared_ptr< tree_classdef > classdef_object (void) const
 
int curr_fcn_depth (void) const
 
OCTINTERP_API void disallow_command_syntax (void)
 
OCTINTERP_API void end_token_error (token *tok, token::end_tok_type expected)
 
OCTINTERP_API bool end_token_ok (token *tok, token::end_tok_type expected)
 
void endfunction_found (bool flag)
 
bool endfunction_found (void) const
 
OCTINTERP_API tree_expression * finish_array_list (tree_array_list *a, token *open_delim, token *close_delim)
 
OCTINTERP_API tree_expression * finish_cell (tree_cell *c, token *open_delim, token *close_delim)
 
OCTINTERP_API tree_function_def * finish_classdef_external_method (octave_user_function *fcn, tree_parameter_list *ret_list, comment_list *cl)
 
OCTINTERP_API bool finish_classdef_file (tree_classdef *cls, tree_statement_list *local_fcns)
 
OCTINTERP_API tree_function_def * finish_function (tree_parameter_list *ret_list, octave_user_function *fcn, comment_list *lc, int l, int c)
 
OCTINTERP_API tree_if_command * finish_if_command (token *if_tok, tree_if_command_list *list, token *end_tok, comment_list *lc)
 
OCTINTERP_API bool finish_input (tree_statement_list *lst, bool at_eof=false)
 
OCTINTERP_API tree_expression * finish_matrix (tree_matrix *m, token *open_delim, token *close_delim)
 
OCTINTERP_API tree_switch_command * finish_switch_command (token *switch_tok, tree_expression *expr, tree_switch_case_list *list, token *end_tok, comment_list *lc)
 
OCTINTERP_API octave_user_function * frob_function (tree_identifier *id, octave_user_function *fcn)
 
base_lexer & get_lexer (void) const
 
OCTINTERP_API tree_anon_fcn_handle * make_anon_fcn_handle (tree_parameter_list *param_list, tree_expression *expr, const filepos &at_pos)
 
OCTINTERP_API tree_arg_size_spec * make_arg_size_spec (tree_argument_list *size_args)
 
OCTINTERP_API tree_arg_validation * make_arg_validation (tree_arg_size_spec *size_spec, tree_identifier *class_name, tree_arg_validation_fcns *validation_fcns, tree_expression *default_value)
 
OCTINTERP_API tree_arg_validation_fcns * make_arg_validation_fcns (tree_argument_list *fcn_args)
 
OCTINTERP_API tree_args_block_attribute_list * make_args_attribute_list (tree_identifier *attribute_name)
 
OCTINTERP_API tree_args_block_validation_list * make_args_validation_list (tree_arg_validation *arg_validation)
 
OCTINTERP_API tree_argument_list * make_argument_list (tree_expression *expr)
 
OCTINTERP_API tree_arguments_block * make_arguments_block (token *arguments_tok, tree_args_block_attribute_list *attr_list, tree_args_block_validation_list *validation_list, token *end_tok, comment_list *lc, comment_list *tc)
 
OCTINTERP_API tree_expression * make_assign_op (int op, tree_argument_list *lhs, token *eq_tok, tree_expression *rhs)
 
OCTINTERP_API tree_expression * make_binary_op (int op, tree_expression *op1, token *tok_val, tree_expression *op2)
 
OCTINTERP_API tree_black_hole * make_black_hole (void)
 
OCTINTERP_API tree_expression * make_boolean_op (int op, tree_expression *op1, token *tok_val, tree_expression *op2)
 
OCTINTERP_API tree_command * make_break_command (token *break_tok)
 
OCTINTERP_API tree_cell * make_cell (tree_argument_list *row)
 
OCTINTERP_API tree_classdef * make_classdef (token *tok_val, tree_classdef_attribute_list *a, tree_identifier *id, tree_classdef_superclass_list *sc, tree_classdef_body *body, token *end_tok, comment_list *lc, comment_list *tc)
 
OCTINTERP_API tree_classdef_attribute * make_classdef_attribute (tree_identifier *id, tree_expression *expr=nullptr)
 
OCTINTERP_API tree_classdef_attribute_list * make_classdef_attribute_list (tree_classdef_attribute *attr)
 
OCTINTERP_API tree_classdef_body * make_classdef_body (tree_classdef_enum_block *enb)
 
OCTINTERP_API tree_classdef_body * make_classdef_body (tree_classdef_events_block *evb)
 
OCTINTERP_API tree_classdef_body * make_classdef_body (tree_classdef_methods_block *mb)
 
OCTINTERP_API tree_classdef_body * make_classdef_body (tree_classdef_properties_block *pb)
 
OCTINTERP_API tree_classdef_enum * make_classdef_enum (tree_identifier *id, tree_expression *expr, comment_list *lc)
 
OCTINTERP_API tree_classdef_enum_block * make_classdef_enum_block (token *tok_val, tree_classdef_attribute_list *a, tree_classdef_enum_list *elist, token *end_tok, comment_list *lc, comment_list *tc)
 
OCTINTERP_API tree_classdef_enum_list * make_classdef_enum_list (tree_classdef_enum *e)
 
OCTINTERP_API tree_classdef_event * make_classdef_event (comment_list *lc, tree_identifier *id)
 
OCTINTERP_API tree_classdef_events_block * make_classdef_events_block (token *tok_val, tree_classdef_attribute_list *a, tree_classdef_events_list *elist, token *end_tok, comment_list *lc, comment_list *tc)
 
OCTINTERP_API tree_classdef_events_list * make_classdef_events_list (tree_classdef_event *e)
 
OCTINTERP_API tree_classdef_methods_block * make_classdef_methods_block (token *tok_val, tree_classdef_attribute_list *a, tree_classdef_methods_list *mlist, token *end_tok, comment_list *lc, comment_list *tc)
 
OCTINTERP_API tree_classdef_methods_list * make_classdef_methods_list (tree_function_def *fcn_def)
 
OCTINTERP_API tree_classdef_properties_block * make_classdef_properties_block (token *tok_val, tree_classdef_attribute_list *a, tree_classdef_property_list *plist, token *end_tok, comment_list *lc, comment_list *tc)
 
OCTINTERP_API tree_classdef_property * make_classdef_property (comment_list *lc, tree_identifier *id, tree_arg_validation *av)
 
OCTINTERP_API tree_classdef_property_list * make_classdef_property_list (tree_classdef_property *prop)
 
OCTINTERP_API tree_classdef_superclass * make_classdef_superclass (token *fqident)
 
OCTINTERP_API tree_classdef_superclass_list * make_classdef_superclass_list (tree_classdef_superclass *sc)
 
OCTINTERP_API tree_expression * make_colon_expression (tree_expression *base, tree_expression *limit, tree_expression *incr=nullptr)
 
OCTINTERP_API tree_constant * make_constant (token *tok_val)
 
OCTINTERP_API tree_command * make_continue_command (token *continue_tok)
 
OCTINTERP_API tree_decl_command * make_decl_command (int tok, token *tok_val, tree_decl_init_list *lst)
 
OCTINTERP_API tree_decl_elt * make_decl_elt (tree_identifier *id, token *eq_op=nullptr, tree_expression *expr=nullptr)
 
OCTINTERP_API tree_decl_init_list * make_decl_init_list (tree_decl_elt *elt)
 
OCTINTERP_API tree_switch_case * make_default_switch_case (token *default_tok, comment_list *lc, tree_statement_list *list)
 
OCTINTERP_API tree_command * make_do_until_command (token *until_tok, tree_statement_list *body, tree_expression *expr, comment_list *lc)
 
OCTINTERP_API tree_if_clause * make_else_clause (token *else_tok, comment_list *lc, tree_statement_list *list)
 
OCTINTERP_API tree_if_clause * make_elseif_clause (token *elseif_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
 
OCTINTERP_API tree_statement * make_end (const std::string &type, bool eof, const filepos &beg_pos, const filepos &end_pos)
 
OCTINTERP_API tree_fcn_handle * make_fcn_handle (token *tok_val)
 
OCTINTERP_API tree_identifier * make_fcn_name (tree_identifier *id)
 
OCTINTERP_API tree_command * make_for_command (int tok_id, token *for_tok, tree_argument_list *lhs, tree_expression *expr, tree_expression *maxproc, tree_statement_list *body, token *end_tok, comment_list *lc)
 
OCTINTERP_API tree_function_def * make_function (token *fcn_tok, tree_parameter_list *ret_list, tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_fcn_stmt, comment_list *lc)
 
OCTINTERP_API tree_identifier * make_identifier (token *ident)
 
OCTINTERP_API tree_index_expression * make_index_expression (tree_expression *expr, tree_argument_list *args, char type)
 
OCTINTERP_API tree_index_expression * make_indirect_ref (tree_expression *expr, const std::string &)
 
OCTINTERP_API tree_index_expression * make_indirect_ref (tree_expression *expr, tree_expression *field)
 
OCTINTERP_API tree_matrix * make_matrix (tree_argument_list *row)
 
OCTINTERP_API tree_metaclass_query * make_metaclass_query (token *metaquery)
 
OCTINTERP_API tree_classdef_attribute * make_not_classdef_attribute (tree_identifier *id)
 
OCTINTERP_API tree_parameter_list * make_parameter_list (tree_parameter_list::in_or_out io)
 
OCTINTERP_API tree_parameter_list * make_parameter_list (tree_parameter_list::in_or_out io, tree_decl_elt *t)
 
OCTINTERP_API tree_parameter_list * make_parameter_list (tree_parameter_list::in_or_out io, tree_identifier *id)
 
OCTINTERP_API tree_expression * make_postfix_op (int op, tree_expression *op1, token *tok_val)
 
OCTINTERP_API tree_expression * make_prefix_op (int op, tree_expression *op1, token *tok_val)
 
OCTINTERP_API tree_command * make_return_command (token *return_tok)
 
OCTINTERP_API void make_script (tree_statement_list *cmds, tree_statement *end_script)
 
OCTINTERP_API tree_spmd_command * make_spmd_command (token *spmd_tok, tree_statement_list *body, token *end_tok, comment_list *lc, comment_list *tc)
 
template<typename T >
tree_statement * make_statement (T *arg)
 
template<typename T >
OCTINTERP_API tree_statement * make_statement (T *arg)
 
OCTINTERP_API tree_statement_list * make_statement_list (tree_statement *stmt)
 
OCTINTERP_API tree_superclass_ref * make_superclass_ref (token *superclassref)
 
OCTINTERP_API tree_switch_case * make_switch_case (token *case_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
 
OCTINTERP_API tree_switch_case_list * make_switch_case_list (tree_switch_case *switch_case)
 
OCTINTERP_API tree_command * make_try_command (token *try_tok, tree_statement_list *body, char catch_sep, tree_statement_list *cleanup, token *end_tok, comment_list *lc, comment_list *mc)
 
OCTINTERP_API tree_command * make_unwind_command (token *unwind_tok, tree_statement_list *body, tree_statement_list *cleanup, token *end_tok, comment_list *lc, comment_list *mc)
 
OCTINTERP_API tree_command * make_while_command (token *while_tok, tree_expression *expr, tree_statement_list *body, token *end_tok, comment_list *lc)
 
base_parser & operator= (const base_parser &)=delete
 
void parsing_local_functions (bool flag)
 
bool parsing_local_functions (void) const
 
void parsing_subfunctions (bool flag)
 
bool parsing_subfunctions (void) const
 
OCTINTERP_API bool push_fcn_symtab (void)
 
OCTINTERP_API void recover_from_parsing_function (void)
 
OCTINTERP_API void reset (void)
 
virtual int run (void)=0
 
OCTINTERP_API tree_statement_list * set_stmt_print_flag (tree_statement_list *, char, bool)
 
OCTINTERP_API octave_user_function * start_classdef_external_method (tree_identifier *id, tree_parameter_list *pl)
 
OCTINTERP_API octave_user_function * start_function (tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_function)
 
OCTINTERP_API tree_if_command_list * start_if_command (tree_expression *expr, tree_statement_list *list)
 
OCTINTERP_API void statement_list (std::shared_ptr< tree_statement_list > &lst)
 
std::shared_ptr< tree_statement_list > statement_list (void) const
 
OCTINTERP_API bool validate_array_list (tree_expression *e)
 
OCTINTERP_API tree_argument_list * validate_matrix_for_assignment (tree_expression *e)
 
OCTINTERP_API bool validate_param_list (tree_parameter_list *lst, tree_parameter_list::in_or_out type)
 
OCTINTERP_API bool validate_primary_fcn (void)
 

Protected Attributes

bool m_autoloading
 
std::shared_ptr< tree_classdef > m_classdef_object
 
std::string m_curr_class_name
 
int m_curr_fcn_depth
 
std::string m_curr_package_name
 
bool m_endfunction_found
 
bool m_fcn_file_from_relative_lookup
 
parent_scope_info m_function_scopes
 
base_lexer & m_lexer
 
int m_max_fcn_depth
 
std::string m_parse_error_msg
 
void * m_parser_state
 
bool m_parsing_local_functions
 
bool m_parsing_subfunctions
 
octave_value m_primary_fcn
 
symbol_scope m_primary_fcn_scope
 
std::shared_ptr< tree_statement_list > m_stmt_list
 
std::list< std::string > m_subfunction_names
 

Private Member Functions

OCTINTERP_API void maybe_warn_assign_as_truth_value (tree_expression *expr)
 
OCTINTERP_API void maybe_warn_missing_semi (tree_statement_list *)
 
OCTINTERP_API void maybe_warn_variable_switch_label (tree_expression *expr)
 

Friends

OCTINTERP_API octave_value parse_fcn_file (interpreter &interp, const std::string &full_file, const std::string &file, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, bool require_file, bool force_script, bool autoload, bool relative_lookup)
 

Detailed Description

Definition at line 108 of file parse.h.

Constructor & Destructor Documentation

◆ base_parser() [1/2]

base_parser::base_parser ( base_lexer &  lxr)

Definition at line 6685 of file oct-parse.cc.

◆ base_parser() [2/2]

octave::base_parser::base_parser ( const base_parser &  )
delete

◆ ~base_parser()

base_parser::~base_parser ( void  )
virtual

Definition at line 6695 of file oct-parse.cc.

References m_lexer, m_parser_state, yypstate, and yypstate_delete.

Member Function Documentation

◆ append_args_validation_list()

tree_args_block_validation_list * base_parser::append_args_validation_list ( tree_args_block_validation_list *  list,
tree_arg_validation *  arg_validation 
)

Definition at line 8299 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_argument_list()

tree_argument_list * base_parser::append_argument_list ( tree_argument_list *  list,
tree_expression *  expr 
)

Definition at line 9471 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_cell_row()

tree_cell * base_parser::append_cell_row ( tree_cell *  cell,
tree_argument_list *  row 
)

Definition at line 9353 of file oct-parse.cc.

References list_append(), and make_cell().

Referenced by octave_push_parse().

◆ append_classdef_attribute()

tree_classdef_attribute_list * base_parser::append_classdef_attribute ( tree_classdef_attribute_list *  list,
tree_classdef_attribute *  elt 
)

Definition at line 8709 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_enum()

tree_classdef_enum_list * base_parser::append_classdef_enum ( tree_classdef_enum_list *  list,
tree_classdef_enum *  elt 
)

Definition at line 8662 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_enum_block()

tree_classdef_body * base_parser::append_classdef_enum_block ( tree_classdef_body *  body,
tree_classdef_enum_block *  block 
)

Definition at line 8761 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_event()

tree_classdef_events_list * base_parser::append_classdef_event ( tree_classdef_events_list *  list,
tree_classdef_event *  elt 
)

Definition at line 8655 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_events_block()

tree_classdef_body * base_parser::append_classdef_events_block ( tree_classdef_body *  body,
tree_classdef_events_block *  block 
)

Definition at line 8754 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_method()

tree_classdef_methods_list * base_parser::append_classdef_method ( tree_classdef_methods_list *  list,
tree_function_def *  fcn_def 
)

Definition at line 8849 of file oct-parse.cc.

References octave::tree_function_def::function(), and list_append().

Referenced by octave_push_parse().

◆ append_classdef_methods_block()

tree_classdef_body * base_parser::append_classdef_methods_block ( tree_classdef_body *  body,
tree_classdef_methods_block *  block 
)

Definition at line 8747 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_properties_block()

tree_classdef_body * base_parser::append_classdef_properties_block ( tree_classdef_body *  body,
tree_classdef_properties_block *  block 
)

Definition at line 8740 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_property()

tree_classdef_property_list * base_parser::append_classdef_property ( tree_classdef_property_list *  list,
tree_classdef_property *  elt 
)

Definition at line 8648 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_classdef_superclass()

tree_classdef_superclass_list * base_parser::append_classdef_superclass ( tree_classdef_superclass_list *  list,
tree_classdef_superclass *  elt 
)

Definition at line 8681 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_decl_init_list()

tree_decl_init_list * base_parser::append_decl_init_list ( tree_decl_init_list *  list,
tree_decl_elt *  elt 
)

Definition at line 9079 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_function_body()

tree_statement_list * base_parser::append_function_body ( tree_statement_list *  body,
tree_statement_list *  list 
)

Definition at line 8225 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_if_clause()

tree_if_command_list * base_parser::append_if_clause ( tree_if_command_list *  list,
tree_if_clause *  clause 
)

Definition at line 7674 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_matrix_row()

tree_matrix * base_parser::append_matrix_row ( tree_matrix *  matrix,
tree_argument_list *  row 
)

Definition at line 9326 of file oct-parse.cc.

References list_append(), and make_matrix().

Referenced by octave_push_parse().

◆ append_parameter_list() [1/2]

tree_parameter_list * base_parser::append_parameter_list ( tree_parameter_list *  list,
tree_decl_elt *  t 
)

Definition at line 9498 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ append_parameter_list() [2/2]

tree_parameter_list * base_parser::append_parameter_list ( tree_parameter_list *  list,
tree_identifier *  id 
)

Definition at line 9505 of file oct-parse.cc.

References list_append().

◆ append_statement_list()

tree_statement_list * base_parser::append_statement_list ( tree_statement_list *  list,
char  sep,
tree_statement *  stmt,
bool  warn_missing_semi 
)

Definition at line 9455 of file oct-parse.cc.

References list_append(), and set_stmt_print_flag().

Referenced by octave_push_parse().

◆ append_switch_case()

tree_switch_case_list * base_parser::append_switch_case ( tree_switch_case_list *  list,
tree_switch_case *  elt 
)

Definition at line 7755 of file oct-parse.cc.

References list_append().

Referenced by octave_push_parse().

◆ at_end_of_input()

bool octave::base_parser::at_end_of_input ( void  ) const
inline

Definition at line 177 of file parse.h.

References octave::lexical_feedback::m_end_of_input, and m_lexer.

◆ bison_error() [1/5]

void base_parser::bison_error ( const parse_exception &  pe)

◆ bison_error() [2/5]

OCTINTERP_API void octave::base_parser::bison_error ( const std::list< parse_exception > &  pe)

◆ bison_error() [3/5]

◆ bison_error() [4/5]

OCTINTERP_API void octave::base_parser::bison_error ( const std::string &  s,
const filepos &  pos 
)

◆ bison_error() [5/5]

OCTINTERP_API void octave::base_parser::bison_error ( const std::string &  s,
int  line,
int  column 
)

◆ classdef_object() [1/2]

void octave::base_parser::classdef_object ( const std::shared_ptr< tree_classdef > &  obj)
inline

Definition at line 181 of file parse.h.

References m_classdef_object.

◆ classdef_object() [2/2]

std::shared_ptr< tree_classdef > octave::base_parser::classdef_object ( void  ) const
inline

Definition at line 186 of file parse.h.

References m_classdef_object.

◆ curr_fcn_depth()

int octave::base_parser::curr_fcn_depth ( void  ) const
inline

Definition at line 218 of file parse.h.

References m_curr_fcn_depth.

◆ disallow_command_syntax()

void base_parser::disallow_command_syntax ( void  )

Definition at line 9512 of file oct-parse.cc.

References octave::lexical_feedback::m_allow_command_syntax, and m_lexer.

◆ end_token_error()

◆ end_token_ok()

◆ endfunction_found() [1/2]

void octave::base_parser::endfunction_found ( bool  flag)
inline

Definition at line 223 of file parse.h.

References m_endfunction_found.

Referenced by octave_push_parse().

◆ endfunction_found() [2/2]

bool octave::base_parser::endfunction_found ( void  ) const
inline

Definition at line 228 of file parse.h.

References m_endfunction_found.

◆ finish_array_list()

◆ finish_cell()

tree_expression * base_parser::finish_cell ( tree_cell *  c,
token *  open_delim,
token *  close_delim 
)

Definition at line 9337 of file oct-parse.cc.

References octave::token::column(), finish_array_list(), and octave::token::line().

Referenced by octave_push_parse().

◆ finish_classdef_external_method()

◆ finish_classdef_file()

◆ finish_function()

tree_function_def * base_parser::finish_function ( tree_parameter_list *  ret_list,
octave_user_function *  fcn,
comment_list *  lc,
int  l,
int  c 
)

◆ finish_if_command()

◆ finish_input()

◆ finish_matrix()

tree_expression * base_parser::finish_matrix ( tree_matrix *  m,
token *  open_delim,
token *  close_delim 
)

◆ finish_switch_command()

◆ frob_function()

OCTINTERP_API octave_user_function * octave::base_parser::frob_function ( tree_identifier *  id,
octave_user_function *  fcn 
)

◆ get_lexer()

base_lexer & octave::base_parser::get_lexer ( void  ) const
inline

Definition at line 175 of file parse.h.

References m_lexer.

◆ make_anon_fcn_handle()

◆ make_arg_size_spec()

tree_arg_size_spec * base_parser::make_arg_size_spec ( tree_argument_list *  size_args)

Definition at line 8306 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_arg_validation()

tree_arg_validation * base_parser::make_arg_validation ( tree_arg_size_spec *  size_spec,
tree_identifier *  class_name,
tree_arg_validation_fcns *  validation_fcns,
tree_expression *  default_value 
)

Definition at line 8271 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_arg_validation_fcns()

tree_arg_validation_fcns * base_parser::make_arg_validation_fcns ( tree_argument_list *  fcn_args)

Definition at line 8314 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_args_attribute_list()

tree_args_block_attribute_list * base_parser::make_args_attribute_list ( tree_identifier *  attribute_name)

Definition at line 8284 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_args_validation_list()

tree_args_block_validation_list * base_parser::make_args_validation_list ( tree_arg_validation *  arg_validation)

Definition at line 8293 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_argument_list()

tree_argument_list * base_parser::make_argument_list ( tree_expression *  expr)

Definition at line 9465 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_arguments_block()

tree_arguments_block * base_parser::make_arguments_block ( token *  arguments_tok,
tree_args_block_attribute_list *  attr_list,
tree_args_block_validation_list *  validation_list,
token *  end_tok,
comment_list *  lc,
comment_list *  tc 
)

◆ make_assign_op()

◆ make_binary_op()

◆ make_black_hole()

tree_black_hole * base_parser::make_black_hole ( void  )

Definition at line 6945 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_boolean_op()

◆ make_break_command()

tree_command * base_parser::make_break_command ( token *  break_tok)

◆ make_cell()

tree_cell * base_parser::make_cell ( tree_argument_list *  row)

Definition at line 9347 of file oct-parse.cc.

Referenced by append_cell_row(), and octave_push_parse().

◆ make_classdef()

◆ make_classdef_attribute()

tree_classdef_attribute * base_parser::make_classdef_attribute ( tree_identifier *  id,
tree_expression *  expr = nullptr 
)

Definition at line 8694 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_attribute_list()

tree_classdef_attribute_list * base_parser::make_classdef_attribute_list ( tree_classdef_attribute *  attr)

Definition at line 8688 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_body() [1/4]

tree_classdef_body * base_parser::make_classdef_body ( tree_classdef_enum_block *  enb)

Definition at line 8734 of file oct-parse.cc.

◆ make_classdef_body() [2/4]

tree_classdef_body * base_parser::make_classdef_body ( tree_classdef_events_block *  evb)

Definition at line 8728 of file oct-parse.cc.

◆ make_classdef_body() [3/4]

tree_classdef_body * base_parser::make_classdef_body ( tree_classdef_methods_block *  mb)

Definition at line 8722 of file oct-parse.cc.

◆ make_classdef_body() [4/4]

tree_classdef_body * base_parser::make_classdef_body ( tree_classdef_properties_block *  pb)

Definition at line 8716 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_enum()

tree_classdef_enum * base_parser::make_classdef_enum ( tree_identifier *  id,
tree_expression *  expr,
comment_list *  lc 
)

Definition at line 8641 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_enum_block()

tree_classdef_enum_block * base_parser::make_classdef_enum_block ( token *  tok_val,
tree_classdef_attribute_list *  a,
tree_classdef_enum_list *  elist,
token *  end_tok,
comment_list *  lc,
comment_list *  tc 
)

◆ make_classdef_enum_list()

tree_classdef_enum_list * base_parser::make_classdef_enum_list ( tree_classdef_enum *  e)

Definition at line 8635 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_event()

tree_classdef_event * base_parser::make_classdef_event ( comment_list *  lc,
tree_identifier *  id 
)

Definition at line 8586 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_events_block()

tree_classdef_events_block * base_parser::make_classdef_events_block ( token *  tok_val,
tree_classdef_attribute_list *  a,
tree_classdef_events_list *  elist,
token *  end_tok,
comment_list *  lc,
comment_list *  tc 
)

◆ make_classdef_events_list()

tree_classdef_events_list * base_parser::make_classdef_events_list ( tree_classdef_event *  e)

Definition at line 8580 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_methods_block()

tree_classdef_methods_block * base_parser::make_classdef_methods_block ( token *  tok_val,
tree_classdef_attribute_list *  a,
tree_classdef_methods_list *  mlist,
token *  end_tok,
comment_list *  lc,
comment_list *  tc 
)

◆ make_classdef_methods_list()

tree_classdef_methods_list * base_parser::make_classdef_methods_list ( tree_function_def *  fcn_def)

Definition at line 8836 of file oct-parse.cc.

References octave::tree_function_def::function().

Referenced by octave_push_parse().

◆ make_classdef_properties_block()

◆ make_classdef_property()

◆ make_classdef_property_list()

tree_classdef_property_list * base_parser::make_classdef_property_list ( tree_classdef_property *  prop)

Definition at line 8483 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_classdef_superclass()

tree_classdef_superclass * base_parser::make_classdef_superclass ( token *  fqident)

Definition at line 8675 of file oct-parse.cc.

References octave::token::text().

Referenced by octave_push_parse().

◆ make_classdef_superclass_list()

tree_classdef_superclass_list * base_parser::make_classdef_superclass_list ( tree_classdef_superclass *  sc)

Definition at line 8669 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_colon_expression()

◆ make_constant()

◆ make_continue_command()

tree_command * base_parser::make_continue_command ( token *  continue_tok)

◆ make_decl_command()

◆ make_decl_elt()

tree_decl_elt * base_parser::make_decl_elt ( tree_identifier *  id,
token *  eq_op = nullptr,
tree_expression *  expr = nullptr 
)

Definition at line 9086 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_decl_init_list()

tree_decl_init_list * base_parser::make_decl_init_list ( tree_decl_elt *  elt)

Definition at line 9073 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_default_switch_case()

tree_switch_case * base_parser::make_default_switch_case ( token *  default_tok,
comment_list *  lc,
tree_statement_list *  list 
)

Definition at line 7745 of file oct-parse.cc.

References octave::token::column(), and octave::token::line().

Referenced by octave_push_parse().

◆ make_do_until_command()

◆ make_else_clause()

tree_if_clause * base_parser::make_else_clause ( token *  else_tok,
comment_list *  lc,
tree_statement_list *  list 
)

Definition at line 7664 of file oct-parse.cc.

References octave::token::column(), and octave::token::line().

Referenced by octave_push_parse().

◆ make_elseif_clause()

tree_if_clause * base_parser::make_elseif_clause ( token *  elseif_tok,
tree_expression *  expr,
tree_statement_list *  list,
comment_list *  lc 
)

◆ make_end()

tree_statement * base_parser::make_end ( const std::string &  type,
bool  eof,
const filepos &  beg_pos,
const filepos &  end_pos 
)

Definition at line 8120 of file oct-parse.cc.

References octave::filepos::column(), octave::filepos::line(), and make_statement().

Referenced by octave_push_parse().

◆ make_fcn_handle()

tree_fcn_handle * base_parser::make_fcn_handle ( token *  tok_val)

Definition at line 6953 of file oct-parse.cc.

References octave::token::column(), octave::token::line(), and octave::token::text().

Referenced by octave_push_parse().

◆ make_fcn_name()

◆ make_for_command()

◆ make_function()

tree_function_def * base_parser::make_function ( token *  fcn_tok,
tree_parameter_list *  ret_list,
tree_identifier *  id,
tree_parameter_list *  param_list,
tree_statement_list *  body,
tree_statement *  end_fcn_stmt,
comment_list *  lc 
)

◆ make_identifier()

◆ make_index_expression()

◆ make_indirect_ref() [1/2]

OCTINTERP_API tree_index_expression * octave::base_parser::make_indirect_ref ( tree_expression *  expr,
const std::string &   
)

Referenced by octave_push_parse().

◆ make_indirect_ref() [2/2]

OCTINTERP_API tree_index_expression * octave::base_parser::make_indirect_ref ( tree_expression *  expr,
tree_expression *  field 
)

◆ make_matrix()

tree_matrix * base_parser::make_matrix ( tree_argument_list *  row)

Definition at line 9320 of file oct-parse.cc.

Referenced by append_matrix_row(), and octave_push_parse().

◆ make_metaclass_query()

tree_metaclass_query * base_parser::make_metaclass_query ( token *  metaquery)

Definition at line 9391 of file oct-parse.cc.

References octave::token::column(), octave::token::line(), and octave::token::text().

Referenced by octave_push_parse().

◆ make_not_classdef_attribute()

tree_classdef_attribute * base_parser::make_not_classdef_attribute ( tree_identifier *  id)

Definition at line 8703 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_parameter_list() [1/3]

tree_parameter_list * base_parser::make_parameter_list ( tree_parameter_list::in_or_out  io)

Definition at line 9478 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_parameter_list() [2/3]

tree_parameter_list * base_parser::make_parameter_list ( tree_parameter_list::in_or_out  io,
tree_decl_elt *  t 
)

Definition at line 9484 of file oct-parse.cc.

◆ make_parameter_list() [3/3]

tree_parameter_list * base_parser::make_parameter_list ( tree_parameter_list::in_or_out  io,
tree_identifier *  id 
)

Definition at line 9491 of file oct-parse.cc.

◆ make_postfix_op()

◆ make_prefix_op()

◆ make_return_command()

tree_command * base_parser::make_return_command ( token *  return_tok)

Definition at line 7556 of file oct-parse.cc.

References octave::token::column(), and octave::token::line().

Referenced by octave_push_parse().

◆ make_script()

◆ make_spmd_command()

tree_spmd_command * base_parser::make_spmd_command ( token *  spmd_tok,
tree_statement_list *  body,
token *  end_tok,
comment_list *  lc,
comment_list *  tc 
)

◆ make_statement() [1/2]

template<typename T >
tree_statement * octave::base_parser::make_statement ( T *  arg)

Definition at line 9441 of file oct-parse.cc.

References octave::base_lexer::get_comment(), and m_lexer.

◆ make_statement() [2/2]

template<typename T >
OCTINTERP_API tree_statement * octave::base_parser::make_statement ( T *  arg)

Referenced by make_end(), and octave_push_parse().

◆ make_statement_list()

tree_statement_list * base_parser::make_statement_list ( tree_statement *  stmt)

Definition at line 9449 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_superclass_ref()

tree_superclass_ref * base_parser::make_superclass_ref ( token *  superclassref)

◆ make_switch_case()

tree_switch_case * base_parser::make_switch_case ( token *  case_tok,
tree_expression *  expr,
tree_statement_list *  list,
comment_list *  lc 
)

◆ make_switch_case_list()

tree_switch_case_list * base_parser::make_switch_case_list ( tree_switch_case *  switch_case)

Definition at line 7723 of file oct-parse.cc.

Referenced by octave_push_parse().

◆ make_try_command()

◆ make_unwind_command()

◆ make_while_command()

◆ maybe_warn_assign_as_truth_value()

◆ maybe_warn_missing_semi()

◆ maybe_warn_variable_switch_label()

void base_parser::maybe_warn_variable_switch_label ( tree_expression *  expr)
private

◆ operator=()

base_parser & octave::base_parser::operator= ( const base_parser &  )
delete

◆ parsing_local_functions() [1/2]

void octave::base_parser::parsing_local_functions ( bool  flag)
inline

Definition at line 208 of file parse.h.

References m_parsing_local_functions.

Referenced by octave_push_parse().

◆ parsing_local_functions() [2/2]

bool octave::base_parser::parsing_local_functions ( void  ) const
inline

Definition at line 213 of file parse.h.

References m_parsing_local_functions.

◆ parsing_subfunctions() [1/2]

void octave::base_parser::parsing_subfunctions ( bool  flag)
inline

Definition at line 198 of file parse.h.

References m_parsing_subfunctions.

◆ parsing_subfunctions() [2/2]

bool octave::base_parser::parsing_subfunctions ( void  ) const
inline

Definition at line 203 of file parse.h.

References m_parsing_subfunctions.

◆ push_fcn_symtab()

◆ recover_from_parsing_function()

◆ reset()

◆ run()

virtual int octave::base_parser::run ( void  )
pure virtual

Implemented in octave::parser, and octave::push_parser.

◆ set_stmt_print_flag()

◆ start_classdef_external_method()

◆ start_function()

octave_user_function * base_parser::start_function ( tree_identifier *  id,
tree_parameter_list *  param_list,
tree_statement_list *  body,
tree_statement *  end_function 
)

Definition at line 7986 of file oct-parse.cc.

References octave::base_list< elt_type >::append(), octave::tree_statement::column(), octave::lexical_feedback::symbol_table_context::curr_scope(), octave::sys::file_ops::dir_sep_chars(), octave_function::document(), octave_user_code::fcn_file_name(), octave::base_lexer::comment_buffer::get_comment(), octave::base_lexer::input_from_tmp_history_file(), octave::sys::base_file_stat::is_newer(), octave::tree_statement::line(), m_autoloading, octave::base_lexer::m_comment_buf, m_curr_class_name, m_curr_fcn_depth, octave::lexical_feedback::m_dir_name, m_fcn_file_from_relative_lookup, octave::lexical_feedback::m_fcn_file_full_name, octave::lexical_feedback::m_fcn_file_name, octave::lexical_feedback::m_force_script, octave::lexical_feedback::m_help_text, m_lexer, octave::lexical_feedback::m_package_name, octave::lexical_feedback::m_parsing_class_method, octave::lexical_feedback::m_parsing_classdef, octave::lexical_feedback::m_parsing_classdef_get_method, octave::lexical_feedback::m_parsing_classdef_set_method, m_parsing_subfunctions, m_primary_fcn, octave::lexical_feedback::m_reading_classdef_file, octave::lexical_feedback::m_reading_fcn_file, octave::lexical_feedback::m_reading_script_file, octave::lexical_feedback::m_symtab_context, octave_user_function::mark_as_classdef_constructor(), octave_user_function::mark_as_classdef_method(), octave_user_function::mark_as_legacy_constructor(), octave_user_function::mark_as_legacy_method(), octave_user_function::mark_as_system_fcn_file(), octave_function::mark_relative(), octave_function::name(), octave_value(), octave_function::stash_dir_name(), octave_function::stash_dispatch_class(), octave_user_function::stash_fcn_end_location(), octave_user_code::stash_fcn_file_name(), octave_user_code::stash_fcn_file_time(), octave_user_function::stash_function_name(), octave_function::stash_package_name(), octave_user_function::stash_trailing_comment(), warning(), and warning_with_id().

Referenced by make_function().

◆ start_if_command()

tree_if_command_list * base_parser::start_if_command ( tree_expression *  expr,
tree_statement_list *  list 
)

Definition at line 7595 of file oct-parse.cc.

References maybe_warn_assign_as_truth_value().

Referenced by octave_push_parse().

◆ statement_list() [1/2]

void base_parser::statement_list ( std::shared_ptr< tree_statement_list > &  lst)

Definition at line 6813 of file oct-parse.cc.

References m_stmt_list.

Referenced by octave::bp_table::condition_valid().

◆ statement_list() [2/2]

std::shared_ptr< tree_statement_list > octave::base_parser::statement_list ( void  ) const
inline

Definition at line 193 of file parse.h.

References m_stmt_list.

Referenced by finish_input().

◆ validate_array_list()

bool base_parser::validate_array_list ( tree_expression *  e)

Definition at line 9160 of file oct-parse.cc.

References bison_error(), and octave::tree_expression::is_matrix().

Referenced by octave_push_parse().

◆ validate_matrix_for_assignment()

◆ validate_param_list()

◆ validate_primary_fcn()

Friends And Related Function Documentation

◆ parse_fcn_file

OCTINTERP_API octave_value parse_fcn_file ( interpreter &  interp,
const std::string &  full_file,
const std::string &  file,
const std::string &  dir_name,
const std::string &  dispatch_type,
const std::string &  package_name,
bool  require_file,
bool  force_script,
bool  autoload,
bool  relative_lookup 
)
friend

Definition at line 9790 of file oct-parse.cc.

Member Data Documentation

◆ m_autoloading

bool octave::base_parser::m_autoloading
protected

Definition at line 740 of file parse.h.

Referenced by reset(), and start_function().

◆ m_classdef_object

std::shared_ptr<tree_classdef> octave::base_parser::m_classdef_object
protected

Definition at line 790 of file parse.h.

Referenced by classdef_object(), finish_classdef_file(), and reset().

◆ m_curr_class_name

std::string octave::base_parser::m_curr_class_name
protected

Definition at line 772 of file parse.h.

Referenced by reset(), start_classdef_external_method(), and start_function().

◆ m_curr_fcn_depth

◆ m_curr_package_name

std::string octave::base_parser::m_curr_package_name
protected

Definition at line 776 of file parse.h.

Referenced by make_classdef(), and reset().

◆ m_endfunction_found

bool octave::base_parser::m_endfunction_found
protected

Definition at line 737 of file parse.h.

Referenced by endfunction_found(), finish_function(), and reset().

◆ m_fcn_file_from_relative_lookup

bool octave::base_parser::m_fcn_file_from_relative_lookup
protected

Definition at line 744 of file parse.h.

Referenced by reset(), and start_function().

◆ m_function_scopes

parent_scope_info octave::base_parser::m_function_scopes
protected

◆ m_lexer

◆ m_max_fcn_depth

int octave::base_parser::m_max_fcn_depth
protected

Definition at line 757 of file parse.h.

Referenced by push_fcn_symtab(), and reset().

◆ m_parse_error_msg

std::string octave::base_parser::m_parse_error_msg
protected

Definition at line 734 of file parse.h.

Referenced by octave::push_parser::run(), and octave::parser::run().

◆ m_parser_state

void* octave::base_parser::m_parser_state
protected

Definition at line 799 of file parse.h.

Referenced by ~base_parser(), reset(), octave::push_parser::run(), and octave::parser::run().

◆ m_parsing_local_functions

bool octave::base_parser::m_parsing_local_functions
protected

Definition at line 753 of file parse.h.

Referenced by make_fcn_name(), parsing_local_functions(), and reset().

◆ m_parsing_subfunctions

bool octave::base_parser::m_parsing_subfunctions
protected

◆ m_primary_fcn

octave_value octave::base_parser::m_primary_fcn
protected

Definition at line 782 of file parse.h.

Referenced by make_script(), reset(), start_function(), and validate_primary_fcn().

◆ m_primary_fcn_scope

symbol_scope octave::base_parser::m_primary_fcn_scope
protected

Definition at line 768 of file parse.h.

Referenced by finish_function(), push_fcn_symtab(), and reset().

◆ m_stmt_list

std::shared_ptr<tree_statement_list> octave::base_parser::m_stmt_list
protected

Definition at line 793 of file parse.h.

Referenced by reset(), and statement_list().

◆ m_subfunction_names

std::list<std::string> octave::base_parser::m_subfunction_names
protected

Definition at line 787 of file parse.h.

Referenced by finish_function(), and reset().


The documentation for this class was generated from the following files: