GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "parse.h"
Public Attributes | |
bool | autoloading |
tree_classdef * | classdef_object |
std::string | curr_class_name |
int | curr_fcn_depth |
std::string | curr_package_name |
bool | endfunction_found |
bool | fcn_file_from_relative_lookup |
std::vector < symbol_table::scope_id > | function_scopes |
octave_base_lexer & | lexer |
int | max_fcn_depth |
bool | parsing_subfunctions |
octave_function * | primary_fcn_ptr |
symbol_table::scope_id | primary_fcn_scope |
tree_statement_list * | stmt_list |
std::list< std::string > | subfunction_names |
Private Member Functions | |
octave_base_parser (const octave_base_parser &) | |
octave_base_parser & | operator= (const octave_base_parser &) |
|
inline |
octave_base_parser::~octave_base_parser | ( | void | ) |
Definition at line 5987 of file oct-parse.cc.
|
private |
tree_statement_list * octave_base_parser::append_statement_list | ( | tree_statement_list * | list, |
char | sep, | ||
tree_statement * | stmt, | ||
bool | warn_missing_semi | ||
) |
Definition at line 7896 of file oct-parse.cc.
References octave_base_list< elt_type >::append(), and set_stmt_print_flag().
Referenced by octave_push_parse().
void octave_base_parser::bison_error | ( | const char * | s | ) |
Definition at line 7908 of file oct-parse.cc.
References lexical_feedback::current_input_column, lexical_feedback::current_input_line, lexical_feedback::fcn_file_full_name, lexical_feedback::input_line_number, lexer, parse_error(), lexical_feedback::reading_classdef_file, lexical_feedback::reading_fcn_file, and lexical_feedback::reading_script_file.
Referenced by end_token_ok(), make_assign_op(), make_classdef(), make_for_command(), make_index_expression(), octave_error(), octave_push_parse(), start_classdef_external_method(), validate_array_list(), and validate_matrix_for_assignment().
void octave_base_parser::end_error | ( | const char * | type, |
token::end_tok_type | ettype, | ||
int | l, | ||
int | c | ||
) |
Definition at line 6019 of file oct-parse.cc.
References token::classdef_end, token::enumeration_end, error(), token::events_end, token::for_end, token::function_end, token::if_end, token::methods_end, panic_impossible, token::parfor_end, token::properties_end, token::simple_end, token::switch_end, token::try_catch_end, token::unwind_protect_end, and token::while_end.
Referenced by end_token_ok().
bool octave_base_parser::end_token_ok | ( | token * | tok, |
token::end_tok_type | expected | ||
) |
Definition at line 6092 of file oct-parse.cc.
References bison_error(), token::classdef_end, token::column(), end_error(), token::enumeration_end, token::ettype(), token::events_end, token::for_end, token::function_end, token::if_end, token::line(), token::methods_end, panic_impossible, token::parfor_end, token::properties_end, token::simple_end, token::switch_end, token::try_catch_end, token::unwind_protect_end, and token::while_end.
Referenced by finish_if_command(), finish_switch_command(), make_classdef(), make_classdef_enum_block(), make_classdef_events_block(), make_classdef_methods_block(), make_classdef_properties_block(), make_for_command(), make_try_command(), make_unwind_command(), make_while_command(), and octave_push_parse().
tree_expression * octave_base_parser::finish_array_list | ( | tree_array_list * | a | ) |
Definition at line 7765 of file oct-parse.cc.
References tree_array_list::accept(), tree_array_list::all_elements_are_constant(), tree::column(), discard_error_messages, discard_warning_messages, error_state, tree::line(), action_container::protect_var(), tree_expression::rvalue1(), tree_constant::stash_original_text(), and warning_state.
Referenced by finish_cell(), and finish_matrix().
tree_expression * octave_base_parser::finish_cell | ( | tree_cell * | c | ) |
Definition at line 7820 of file oct-parse.cc.
References finish_array_list().
Referenced by octave_push_parse().
tree_function_def * octave_base_parser::finish_classdef_external_method | ( | octave_user_function * | fcn, |
tree_parameter_list * | ret_list, | ||
octave_comment_list * | cl | ||
) |
Definition at line 7529 of file oct-parse.cc.
References octave_user_function::beginning_column(), octave_user_function::beginning_line(), octave_user_function::define_ret_list(), and octave_user_function::stash_leading_comment().
Referenced by octave_push_parse().
tree_expression * octave_base_parser::finish_colon_expression | ( | tree_colon_expression * | e | ) |
Definition at line 6212 of file oct-parse.cc.
References tree_colon_expression::accept(), tree_colon_expression::base(), tree::column(), discard_error_messages, discard_warning_messages, error_state, tree_colon_expression::increment(), tree_expression::is_constant(), tree_colon_expression::limit(), tree::line(), tree_colon_expression::preserve_base(), action_container::protect_var(), tree_colon_expression::rvalue1(), tree_constant::stash_original_text(), and warning_state.
Referenced by octave_push_parse().
tree_function_def * octave_base_parser::finish_function | ( | tree_parameter_list * | ret_list, |
octave_user_function * | fcn, | ||
octave_comment_list * | lc, | ||
int | l, | ||
int | c | ||
) |
Definition at line 7193 of file oct-parse.cc.
References symbol_table::cache_name(), curr_fcn_depth, octave_user_function::define_ret_list(), endfunction_found, octave_user_function::fcn_file_name(), function_scopes, symbol_table::install_nestfunction(), symbol_table::install_subfunction(), lexer, tree_parameter_list::mark_as_formal_parameters(), octave_user_function::mark_as_subfunction(), octave_function::name(), parsing_subfunctions, primary_fcn_scope, lexical_feedback::reading_fcn_file, octave_user_function::scope(), octave_user_function::stash_fcn_location(), octave_user_function::stash_leading_comment(), subfunction_names, and symbol_table::update_nest().
Referenced by octave_push_parse().
tree_if_command * octave_base_parser::finish_if_command | ( | token * | if_tok, |
tree_if_command_list * | list, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6828 of file oct-parse.cc.
References tree::column(), token::column(), octave_base_lexer::comment_buf, octave_base_list< elt_type >::empty(), end_token_ok(), octave_base_list< elt_type >::front(), octave_base_lexer::comment_buffer::get_comment(), token::if_end, lexer, tree::line(), and token::line().
Referenced by octave_push_parse().
tree_expression * octave_base_parser::finish_matrix | ( | tree_matrix * | m | ) |
Definition at line 7810 of file oct-parse.cc.
References finish_array_list(), and octave_null_matrix::instance.
Referenced by octave_push_parse().
tree_switch_command * octave_base_parser::finish_switch_command | ( | token * | switch_tok, |
tree_expression * | expr, | ||
tree_switch_case_list * | list, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6880 of file oct-parse.cc.
References tree::column(), token::column(), octave_base_lexer::comment_buf, octave_base_list< elt_type >::empty(), end_token_ok(), octave_base_list< elt_type >::front(), octave_base_lexer::comment_buffer::get_comment(), lexer, tree::line(), token::line(), and token::switch_end.
Referenced by octave_push_parse().
octave_user_function * octave_base_parser::frob_function | ( | const std::string & | fname, |
octave_user_function * | fcn | ||
) |
Definition at line 7093 of file oct-parse.cc.
References autoloading, curr_class_name, curr_fcn_depth, file_ops::dir_sep_chars(), octave_function::document(), fcn_file_from_relative_lookup, lexical_feedback::fcn_file_full_name, octave_user_function::fcn_file_name(), lexical_feedback::fcn_file_name, lexical_feedback::force_script, function_scopes, lexical_feedback::help_text, input_from_tmp_history_file, base_file_stat::is_newer(), lexer, octave_user_function::mark_as_class_constructor(), octave_user_function::mark_as_class_method(), octave_user_function::mark_as_system_fcn_file(), octave_function::mark_relative(), lexical_feedback::parsing_class_method, parsing_subfunctions, primary_fcn_ptr, primary_fcn_scope, lexical_feedback::reading_classdef_file, lexical_feedback::reading_fcn_file, lexical_feedback::reading_script_file, octave_function::stash_dispatch_class(), octave_user_function::stash_fcn_file_name(), octave_user_function::stash_fcn_file_time(), octave_user_function::stash_function_name(), octave_user_function::stash_parent_fcn_name(), octave_user_function::stash_parent_fcn_scope(), warning(), and warning_with_id().
Referenced by octave_push_parse().
tree_anon_fcn_handle * octave_base_parser::make_anon_fcn_handle | ( | tree_parameter_list * | param_list, |
tree_statement * | stmt | ||
) |
Definition at line 6350 of file oct-parse.cc.
References lexical_feedback::symbol_table_context::curr_scope(), lexical_feedback::current_input_column, lexical_feedback::input_line_number, lexer, tree_statement_list::mark_as_anon_function_body(), lexical_feedback::symbol_table_context::pop(), tree_statement::set_print_flag(), and lexical_feedback::symtab_context.
Referenced by octave_push_parse().
tree_expression * octave_base_parser::make_assign_op | ( | int | op, |
tree_argument_list * | lhs, | ||
token * | eq_tok, | ||
tree_expression * | rhs | ||
) |
Definition at line 6936 of file oct-parse.cc.
References ADD_EQ, AND_EQ, bison_error(), token::column(), DIV_EQ, EDIV_EQ, ELEFTDIV_EQ, EMUL_EQ, EPOW_EQ, tree_argument_list::is_simple_assign_lhs(), LEFTDIV_EQ, token::line(), LSHIFT_EQ, MUL_EQ, octave_value::op_add_eq, octave_value::op_asn_eq, octave_value::op_div_eq, octave_value::op_el_and_eq, octave_value::op_el_div_eq, octave_value::op_el_ldiv_eq, octave_value::op_el_mul_eq, octave_value::op_el_or_eq, octave_value::op_el_pow_eq, octave_value::op_ldiv_eq, octave_value::op_lshift_eq, octave_value::op_mul_eq, octave_value::op_pow_eq, octave_value::op_rshift_eq, octave_value::op_sub_eq, OR_EQ, panic_impossible, POW_EQ, tree_argument_list::remove_front(), RSHIFT_EQ, SUB_EQ, and octave_value::unknown_assign_op.
Referenced by octave_push_parse().
tree_expression * octave_base_parser::make_binary_op | ( | int | op, |
tree_expression * | op1, | ||
token * | tok_val, | ||
tree_expression * | op2 | ||
) |
Definition at line 6381 of file oct-parse.cc.
References token::column(), EDIV, ELEFTDIV, EMUL, EPOW, EXPR_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_OR, LEFTDIV, token::line(), LSHIFT, maybe_compound_binary_expression(), octave_value::op_add, octave_value::op_div, octave_value::op_el_and, octave_value::op_el_div, octave_value::op_el_ldiv, octave_value::op_el_mul, octave_value::op_el_or, octave_value::op_el_pow, octave_value::op_eq, octave_value::op_ge, octave_value::op_gt, octave_value::op_ldiv, octave_value::op_le, octave_value::op_lshift, octave_value::op_lt, octave_value::op_mul, octave_value::op_ne, octave_value::op_pow, octave_value::op_rshift, octave_value::op_sub, panic_impossible, POW, RSHIFT, and octave_value::unknown_binary_op.
Referenced by octave_push_parse().
tree_expression * octave_base_parser::make_boolean_op | ( | int | op, |
tree_expression * | op1, | ||
token * | tok_val, | ||
tree_expression * | op2 | ||
) |
Definition at line 6482 of file oct-parse.cc.
References tree_boolean_expression::bool_and, tree_boolean_expression::bool_or, token::column(), EXPR_AND_AND, EXPR_OR_OR, token::line(), and panic_impossible.
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_break_command | ( | token * | break_tok | ) |
Definition at line 6782 of file oct-parse.cc.
References token::column(), and token::line().
Referenced by octave_push_parse().
tree_classdef * octave_base_parser::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, | ||
octave_comment_list * | lc | ||
) |
Definition at line 7314 of file oct-parse.cc.
References bison_error(), token::classdef_end, token::column(), octave_base_lexer::comment_buf, curr_package_name, file_ops::dir_sep_chars(), end_token_ok(), lexical_feedback::fcn_file_name, octave_base_lexer::comment_buffer::get_comment(), lexer, and token::line().
Referenced by octave_push_parse().
tree_classdef_enum_block * octave_base_parser::make_classdef_enum_block | ( | token * | tok_val, |
tree_classdef_attribute_list * | a, | ||
tree_classdef_enum_list * | elist, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 7450 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, end_token_ok(), token::enumeration_end, octave_base_lexer::comment_buffer::get_comment(), lexer, and token::line().
Referenced by octave_push_parse().
tree_classdef_events_block * octave_base_parser::make_classdef_events_block | ( | token * | tok_val, |
tree_classdef_attribute_list * | a, | ||
tree_classdef_events_list * | elist, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 7420 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, end_token_ok(), token::events_end, octave_base_lexer::comment_buffer::get_comment(), lexer, and token::line().
Referenced by octave_push_parse().
tree_classdef_methods_block * octave_base_parser::make_classdef_methods_block | ( | token * | tok_val, |
tree_classdef_attribute_list * | a, | ||
tree_classdef_methods_list * | mlist, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 7390 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, end_token_ok(), octave_base_lexer::comment_buffer::get_comment(), lexer, token::line(), and token::methods_end.
Referenced by octave_push_parse().
tree_classdef_properties_block * octave_base_parser::make_classdef_properties_block | ( | token * | tok_val, |
tree_classdef_attribute_list * | a, | ||
tree_classdef_property_list * | plist, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 7360 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, end_token_ok(), octave_base_lexer::comment_buffer::get_comment(), lexer, token::line(), and token::properties_end.
Referenced by octave_push_parse().
tree_constant * octave_base_parser::make_constant | ( | int | op, |
token * | tok_val | ||
) |
Definition at line 6274 of file oct-parse.cc.
References token::column(), DQ_STRING, IMAG_NUM, octave_null_str::instance, octave_null_sq_str::instance, token::line(), NUM, token::number(), panic_impossible, SQ_STRING, tree_constant::stash_original_text(), token::text(), token::text_rep(), and undo_string_escapes().
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_continue_command | ( | token * | continue_tok | ) |
Definition at line 6793 of file oct-parse.cc.
References token::column(), and token::line().
Referenced by octave_push_parse().
tree_decl_command * octave_base_parser::make_decl_command | ( | int | tok, |
token * | tok_val, | ||
tree_decl_init_list * | lst | ||
) |
Definition at line 7647 of file oct-parse.cc.
References token::column(), curr_fcn_depth, lexical_feedback::fcn_file_full_name, GLOBAL, lexer, token::line(), panic_impossible, PERSISTENT, lexical_feedback::reading_script_file, and warning().
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_do_until_command | ( | token * | until_tok, |
tree_statement_list * | body, | ||
tree_expression * | expr, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6707 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, octave_base_lexer::comment_buffer::get_comment(), lexer, token::line(), lexical_feedback::looping, and maybe_warn_assign_as_truth_value().
Referenced by octave_push_parse().
tree_if_clause * octave_base_parser::make_elseif_clause | ( | token * | elseif_tok, |
tree_expression * | expr, | ||
tree_statement_list * | list, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6864 of file oct-parse.cc.
References token::column(), token::line(), and maybe_warn_assign_as_truth_value().
Referenced by octave_push_parse().
tree_statement * octave_base_parser::make_end | ( | const std::string & | type, |
bool | eof, | ||
int | l, | ||
int | c | ||
) |
Definition at line 7085 of file oct-parse.cc.
References make_statement().
Referenced by octave_push_parse().
tree_fcn_handle * octave_base_parser::make_fcn_handle | ( | token * | tok_val | ) |
Definition at line 6337 of file oct-parse.cc.
References token::column(), token::line(), and token::text().
Referenced by octave_push_parse().
tree_command * octave_base_parser::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, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6727 of file oct-parse.cc.
References bison_error(), token::column(), octave_base_lexer::comment_buf, end_token_ok(), token::for_end, octave_base_lexer::comment_buffer::get_comment(), octave_base_list< elt_type >::length(), lexer, token::line(), lexical_feedback::looping, tree_expression::mark_as_for_cmd_expr(), PARFOR, token::parfor_end, and tree_argument_list::remove_front().
Referenced by octave_push_parse().
tree_index_expression * octave_base_parser::make_index_expression | ( | tree_expression * | expr, |
tree_argument_list * | args, | ||
char | type | ||
) |
Definition at line 7548 of file oct-parse.cc.
References tree_index_expression::append(), bison_error(), tree::column(), tree_argument_list::has_magic_tilde(), tree_expression::is_index_expression(), tree_expression::is_postfix_indexed(), tree::line(), and tree_expression::set_postfix_index().
Referenced by octave_push_parse().
tree_index_expression * octave_base_parser::make_indirect_ref | ( | tree_expression * | expr, |
const std::string & | elt | ||
) |
Definition at line 7587 of file oct-parse.cc.
References tree_index_expression::append(), tree::column(), tree_expression::is_index_expression(), tree_expression::is_postfix_indexed(), lexer, tree::line(), lexical_feedback::looking_at_indirect_ref, and tree_expression::set_postfix_index().
Referenced by octave_push_parse().
tree_index_expression * octave_base_parser::make_indirect_ref | ( | tree_expression * | expr, |
tree_expression * | field | ||
) |
Definition at line 7617 of file oct-parse.cc.
References tree_index_expression::append(), tree::column(), tree_expression::is_index_expression(), tree_expression::is_postfix_indexed(), lexer, tree::line(), lexical_feedback::looking_at_indirect_ref, and tree_expression::set_postfix_index().
tree_funcall * octave_base_parser::make_meta_class_query | ( | const std::string & | class_nm | ) |
Definition at line 7295 of file oct-parse.cc.
References symbol_table::find_built_in_function().
Referenced by octave_push_parse().
tree_expression * octave_base_parser::make_postfix_op | ( | int | op, |
tree_expression * | op1, | ||
token * | tok_val | ||
) |
Definition at line 6552 of file oct-parse.cc.
References token::column(), HERMITIAN, token::line(), MINUS_MINUS, octave_value::op_decr, octave_value::op_hermitian, octave_value::op_incr, octave_value::op_transpose, panic_impossible, PLUS_PLUS, TRANSPOSE, and octave_value::unknown_unary_op.
Referenced by octave_push_parse().
tree_expression * octave_base_parser::make_prefix_op | ( | int | op, |
tree_expression * | op1, | ||
token * | tok_val | ||
) |
Definition at line 6511 of file oct-parse.cc.
References token::column(), EXPR_NOT, token::line(), MINUS_MINUS, octave_value::op_decr, octave_value::op_incr, octave_value::op_not, octave_value::op_uminus, octave_value::op_uplus, panic_impossible, PLUS_PLUS, and octave_value::unknown_unary_op.
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_return_command | ( | token * | return_tok | ) |
Definition at line 6804 of file oct-parse.cc.
References token::column(), and token::line().
Referenced by octave_push_parse().
void octave_base_parser::make_script | ( | tree_statement_list * | cmds, |
tree_statement * | end_script | ||
) |
Definition at line 7032 of file oct-parse.cc.
References octave_base_list< elt_type >::append(), lexical_feedback::fcn_file_full_name, lexical_feedback::fcn_file_name, lexical_feedback::help_text, lexer, primary_fcn_ptr, and octave_user_script::stash_fcn_file_time().
Referenced by octave_push_parse().
tree_statement * octave_base_parser::make_statement | ( | T * | arg | ) |
Definition at line 7882 of file oct-parse.cc.
References octave_base_lexer::get_comment(), and lexer.
Referenced by make_end(), and octave_push_parse().
tree_statement_list * octave_base_parser::make_statement_list | ( | tree_statement * | stmt | ) |
Definition at line 7890 of file oct-parse.cc.
Referenced by octave_push_parse().
tree_funcall * octave_base_parser::make_superclass_ref | ( | const std::string & | method_nm, |
const std::string & | class_nm | ||
) |
Definition at line 7280 of file oct-parse.cc.
References symbol_table::find_built_in_function().
Referenced by octave_push_parse().
tree_switch_case * octave_base_parser::make_switch_case | ( | token * | case_tok, |
tree_expression * | expr, | ||
tree_statement_list * | list, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6920 of file oct-parse.cc.
References token::column(), token::line(), and maybe_warn_variable_switch_label().
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_try_command | ( | token * | try_tok, |
tree_statement_list * | body, | ||
char | catch_sep, | ||
tree_statement_list * | cleanup, | ||
token * | end_tok, | ||
octave_comment_list * | lc, | ||
octave_comment_list * | mc | ||
) |
Definition at line 6620 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, octave_base_list< elt_type >::empty(), end_token_ok(), tree_statement::expression(), octave_base_list< elt_type >::front(), octave_base_lexer::comment_buffer::get_comment(), tree_expression::is_identifier(), lexer, token::line(), octave_base_list< elt_type >::pop_front(), tree_statement::set_expression(), and token::try_catch_end.
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_unwind_command | ( | token * | unwind_tok, |
tree_statement_list * | body, | ||
tree_statement_list * | cleanup, | ||
token * | end_tok, | ||
octave_comment_list * | lc, | ||
octave_comment_list * | mc | ||
) |
Definition at line 6589 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, end_token_ok(), octave_base_lexer::comment_buffer::get_comment(), lexer, token::line(), and token::unwind_protect_end.
Referenced by octave_push_parse().
tree_command * octave_base_parser::make_while_command | ( | token * | while_tok, |
tree_expression * | expr, | ||
tree_statement_list * | body, | ||
token * | end_tok, | ||
octave_comment_list * | lc | ||
) |
Definition at line 6674 of file oct-parse.cc.
References token::column(), octave_base_lexer::comment_buf, end_token_ok(), octave_base_lexer::comment_buffer::get_comment(), lexer, token::line(), lexical_feedback::looping, maybe_warn_assign_as_truth_value(), and token::while_end.
Referenced by octave_push_parse().
void octave_base_parser::maybe_warn_assign_as_truth_value | ( | tree_expression * | expr | ) |
Definition at line 6174 of file oct-parse.cc.
References tree::column(), lexical_feedback::fcn_file_full_name, tree_expression::is_assignment_expression(), lexer, tree::line(), tree_expression::paren_count(), and warning_with_id().
Referenced by make_do_until_command(), make_elseif_clause(), make_while_command(), and start_if_command().
void octave_base_parser::maybe_warn_missing_semi | ( | tree_statement_list * | t | ) |
Definition at line 7828 of file oct-parse.cc.
References octave_base_list< elt_type >::back(), tree_statement::column(), curr_fcn_depth, lexical_feedback::fcn_file_full_name, tree_statement::is_expression(), lexer, tree_statement::line(), and warning_with_id().
Referenced by set_stmt_print_flag().
void octave_base_parser::maybe_warn_variable_switch_label | ( | tree_expression * | expr | ) |
Definition at line 6194 of file oct-parse.cc.
References tree::column(), lexical_feedback::fcn_file_full_name, tree_expression::is_constant(), lexer, tree::line(), and warning_with_id().
Referenced by make_switch_case().
|
private |
void octave_base_parser::recover_from_parsing_function | ( | void | ) |
Definition at line 7262 of file oct-parse.cc.
References curr_fcn_depth, lexical_feedback::defining_func, function_scopes, lexer, lexical_feedback::looking_at_parameter_list, lexical_feedback::looking_at_return_list, lexical_feedback::parsed_function_name, parsing_subfunctions, lexical_feedback::symbol_table_context::pop(), lexical_feedback::reading_fcn_file, and lexical_feedback::symtab_context.
Referenced by octave_push_parse().
void octave_base_parser::reset | ( | void | ) |
Definition at line 5995 of file oct-parse.cc.
References autoloading, curr_class_name, curr_fcn_depth, curr_package_name, endfunction_found, fcn_file_from_relative_lookup, function_scopes, lexer, max_fcn_depth, parsing_subfunctions, primary_fcn_ptr, primary_fcn_scope, octave_base_lexer::reset(), stmt_list, and subfunction_names.
Referenced by eval_string(), get_debug_input(), and main_loop().
tree_statement_list * octave_base_parser::set_stmt_print_flag | ( | tree_statement_list * | list, |
char | sep, | ||
bool | warn_missing_semi | ||
) |
Definition at line 7843 of file oct-parse.cc.
References octave_base_list< elt_type >::back(), tree_statement::is_null_statement(), maybe_warn_missing_semi(), octave_base_list< elt_type >::pop_back(), tree_statement::set_print_flag(), and warning().
Referenced by append_statement_list(), and octave_push_parse().
octave_user_function * octave_base_parser::start_classdef_external_method | ( | tree_identifier * | id, |
tree_parameter_list * | pl | ||
) |
Definition at line 7480 of file oct-parse.cc.
References bison_error(), curr_class_name, octave_function::name(), octave_user_function::stash_fcn_location(), and octave_user_function::stash_function_name().
Referenced by octave_push_parse().
octave_user_function * octave_base_parser::start_function | ( | tree_parameter_list * | param_list, |
tree_statement_list * | body, | ||
tree_statement * | end_function | ||
) |
Definition at line 7057 of file oct-parse.cc.
References octave_base_list< elt_type >::append(), tree_statement::column(), octave_base_lexer::comment_buf, lexical_feedback::symbol_table_context::curr_scope(), octave_base_lexer::comment_buffer::get_comment(), lexer, tree_statement::line(), octave_user_function::stash_fcn_end_location(), octave_user_function::stash_trailing_comment(), and lexical_feedback::symtab_context.
Referenced by octave_push_parse().
tree_if_command_list * octave_base_parser::start_if_command | ( | tree_expression * | expr, |
tree_statement_list * | list | ||
) |
Definition at line 6815 of file oct-parse.cc.
References maybe_warn_assign_as_truth_value().
Referenced by octave_push_parse().
bool octave_base_parser::validate_array_list | ( | tree_expression * | e | ) |
Definition at line 7683 of file oct-parse.cc.
References octave_base_list< elt_type >::begin(), bison_error(), octave_base_list< elt_type >::end(), tree_argument_list::has_magic_tilde(), and tree_expression::is_matrix().
Referenced by octave_push_parse().
tree_argument_list * octave_base_parser::validate_matrix_for_assignment | ( | tree_expression * | e | ) |
Definition at line 7708 of file oct-parse.cc.
References bison_error(), octave_base_list< elt_type >::front(), tree_expression::is_constant(), octave_value::is_empty(), tree_expression::is_matrix(), tree_argument_list::is_valid_lvalue_list(), lexer, tree_argument_list::mark_as_simple_assign_lhs(), lexical_feedback::mark_as_variables(), octave_base_list< elt_type >::pop_front(), tree_expression::rvalue1(), octave_base_list< elt_type >::size(), and tree_argument_list::variable_names().
Referenced by octave_push_parse().
bool octave_base_parser::autoloading |
Definition at line 406 of file parse.h.
Referenced by frob_function(), parse_fcn_file(), and reset().
tree_classdef* octave_base_parser::classdef_object |
Definition at line 453 of file parse.h.
Referenced by octave_push_parse(), and parse_fcn_file().
std::string octave_base_parser::curr_class_name |
Definition at line 433 of file parse.h.
Referenced by frob_function(), parse_fcn_file(), reset(), and start_classdef_external_method().
int octave_base_parser::curr_fcn_depth |
Definition at line 425 of file parse.h.
Referenced by finish_function(), frob_function(), make_decl_command(), maybe_warn_missing_semi(), octave_push_parse(), recover_from_parsing_function(), and reset().
std::string octave_base_parser::curr_package_name |
Definition at line 437 of file parse.h.
Referenced by make_classdef(), parse_fcn_file(), and reset().
bool octave_base_parser::endfunction_found |
Definition at line 403 of file parse.h.
Referenced by finish_function(), octave_push_parse(), parse_fcn_file(), and reset().
bool octave_base_parser::fcn_file_from_relative_lookup |
Definition at line 410 of file parse.h.
Referenced by frob_function(), parse_fcn_file(), and reset().
std::vector<symbol_table::scope_id> octave_base_parser::function_scopes |
Definition at line 442 of file parse.h.
Referenced by finish_function(), frob_function(), octave_push_parse(), recover_from_parsing_function(), and reset().
octave_base_lexer& octave_base_parser::lexer |
Definition at line 459 of file parse.h.
Referenced by bison_error(), eval_string(), finish_function(), finish_if_command(), finish_switch_command(), frob_function(), main_loop(), make_anon_fcn_handle(), make_classdef(), make_classdef_enum_block(), make_classdef_events_block(), make_classdef_methods_block(), make_classdef_properties_block(), make_decl_command(), make_do_until_command(), make_for_command(), make_indirect_ref(), make_script(), make_statement(), make_try_command(), make_unwind_command(), make_while_command(), maybe_warn_assign_as_truth_value(), maybe_warn_missing_semi(), maybe_warn_variable_switch_label(), parse_fcn_file(), recover_from_parsing_function(), reset(), octave_push_parser::run(), start_function(), validate_matrix_for_assignment(), and ~octave_base_parser().
int octave_base_parser::max_fcn_depth |
Definition at line 418 of file parse.h.
Referenced by octave_push_parse(), and reset().
bool octave_base_parser::parsing_subfunctions |
Definition at line 414 of file parse.h.
Referenced by finish_function(), frob_function(), octave_push_parse(), parse_fcn_file(), recover_from_parsing_function(), and reset().
octave_function* octave_base_parser::primary_fcn_ptr |
Definition at line 445 of file parse.h.
Referenced by frob_function(), make_script(), parse_fcn_file(), and reset().
symbol_table::scope_id octave_base_parser::primary_fcn_scope |
Definition at line 429 of file parse.h.
Referenced by finish_function(), frob_function(), octave_push_parse(), and reset().
tree_statement_list* octave_base_parser::stmt_list |
Definition at line 456 of file parse.h.
Referenced by eval_string(), get_debug_input(), main_loop(), octave_push_parse(), reset(), and ~octave_base_parser().
std::list<std::string> octave_base_parser::subfunction_names |
Definition at line 450 of file parse.h.
Referenced by finish_function(), parse_fcn_file(), and reset().