GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "lex.h"
Classes | |
class | bbp_nesting_level |
class | symbol_table_context |
class | token_cache |
Public Member Functions | |
lexical_feedback (void) | |
~lexical_feedback (void) | |
void | init (void) |
void | mark_as_variable (const std::string &nm) |
void | mark_as_variables (const std::list< std::string > &lst) |
void | mark_previous_token_trailing_space (void) |
void | maybe_mark_previous_token_as_variable (void) |
bool | previous_token_is_binop (void) const |
bool | previous_token_is_keyword (void) const |
bool | previous_token_may_be_command (void) const |
int | previous_token_value (void) const |
bool | previous_token_value_is (int tok_val) const |
void | reset (void) |
bool | space_follows_previous_token (void) const |
Private Member Functions | |
lexical_feedback (const lexical_feedback &) | |
lexical_feedback & | operator= (const lexical_feedback &) |
|
private |
void octave::lexical_feedback::init | ( | void | ) |
Definition at line 4631 of file lex.cc.
References nargout(), retval, and set_internal_variable().
void octave::lexical_feedback::mark_as_variable | ( | const std::string & | nm | ) |
void octave::lexical_feedback::mark_as_variables | ( | const std::list< std::string > & | lst | ) |
Definition at line 4764 of file lex.cc.
Referenced by octave::base_parser::validate_matrix_for_assignment().
void octave::lexical_feedback::mark_previous_token_trailing_space | ( | void | ) |
void octave::lexical_feedback::maybe_mark_previous_token_as_variable | ( | void | ) |
|
private |
bool octave::lexical_feedback::previous_token_is_binop | ( | void | ) | const |
Definition at line 4721 of file lex.cc.
References octave::lexical_feedback::token_cache::front(), token::token_value_is(), and tokens.
bool octave::lexical_feedback::previous_token_is_keyword | ( | void | ) | const |
Definition at line 4741 of file lex.cc.
References previous_token_value().
bool octave::lexical_feedback::previous_token_may_be_command | ( | void | ) | const |
int octave::lexical_feedback::previous_token_value | ( | void | ) | const |
Definition at line 4692 of file lex.cc.
Referenced by previous_token_is_keyword().
bool octave::lexical_feedback::space_follows_previous_token | ( | void | ) | const |
Definition at line 4714 of file lex.cc.
References octave::lexical_feedback::token_cache::front(), token::token_value(), and tokens.
bool octave::lexical_feedback::at_beginning_of_statement |
Definition at line 319 of file lex.h.
Referenced by octave::base_lexer::finish_comment(), and octave::base_lexer::handle_close_bracket().
int octave::lexical_feedback::bracketflag |
Definition at line 389 of file lex.h.
Referenced by octave::base_lexer::looks_like_command_arg().
std::string octave::lexical_feedback::comment_text |
Definition at line 417 of file lex.h.
Referenced by octave::base_lexer::finish_comment(), and octave::base_lexer::handle_close_bracket().
int octave::lexical_feedback::current_input_column |
Definition at line 386 of file lex.h.
Referenced by octave::base_parser::bison_error(), octave::base_lexer::count_token(), octave::base_lexer::handle_fq_identifier(), octave::base_lexer::handle_meta_identifier(), octave::base_parser::make_anon_fcn_handle(), and octave::base_lexer::show_token().
std::string octave::lexical_feedback::current_input_line |
Definition at line 414 of file lex.h.
Referenced by octave::base_parser::bison_error(), and octave::push_lexer::fill_flex_buffer().
int octave::lexical_feedback::defining_func |
Definition at line 398 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
std::string octave::lexical_feedback::fcn_file_full_name |
Definition at line 433 of file lex.h.
Referenced by octave::base_parser::bison_error(), octave::base_parser::frob_function(), octave::base_parser::make_decl_command(), octave::base_parser::make_script(), octave::base_parser::maybe_warn_assign_as_truth_value(), octave::base_parser::maybe_warn_missing_semi(), octave::base_parser::maybe_warn_variable_switch_label(), parse_fcn_file(), octave::parser::run(), octave::push_parser::run(), and octave::base_lexer::warn_language_extension_continuation().
std::string octave::lexical_feedback::fcn_file_name |
Definition at line 430 of file lex.h.
Referenced by octave::base_parser::frob_function(), octave::base_parser::make_classdef(), octave::base_parser::make_script(), and parse_fcn_file().
bool octave::lexical_feedback::force_script |
Definition at line 371 of file lex.h.
Referenced by octave::base_parser::frob_function(), and parse_fcn_file().
std::string octave::lexical_feedback::help_text |
Definition at line 420 of file lex.h.
Referenced by octave::base_parser::frob_function(), octave::base_lexer::handle_close_bracket(), and octave::base_parser::make_script().
int octave::lexical_feedback::input_line_number |
Definition at line 383 of file lex.h.
Referenced by octave::base_parser::bison_error(), octave::base_lexer::count_token(), octave::base_lexer::handle_fq_identifier(), octave::base_lexer::handle_meta_identifier(), octave::base_parser::make_anon_fcn_handle(), and octave::base_lexer::show_token().
bool octave::lexical_feedback::looking_at_indirect_ref |
Definition at line 347 of file lex.h.
Referenced by octave::base_parser::make_indirect_ref().
bool octave::lexical_feedback::looking_at_initializer_expression |
bool octave::lexical_feedback::looking_at_matrix_or_assign_lhs |
bool octave::lexical_feedback::looking_at_parameter_list |
Definition at line 328 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
bool octave::lexical_feedback::looking_at_return_list |
Definition at line 325 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
int octave::lexical_feedback::looping |
Definition at line 395 of file lex.h.
Referenced by octave::base_parser::make_do_until_command(), octave::base_parser::make_for_command(), and octave::base_parser::make_while_command().
bbp_nesting_level octave::lexical_feedback::nesting_level |
Definition at line 452 of file lex.h.
Referenced by octave::base_lexer::handle_close_bracket(), and octave::base_lexer::looks_like_command_arg().
std::stack<bool> octave::lexical_feedback::parsed_function_name |
Definition at line 442 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
bool octave::lexical_feedback::parsing_class_method |
Definition at line 350 of file lex.h.
Referenced by octave::base_parser::frob_function(), and parse_fcn_file().
std::set<std::string> octave::lexical_feedback::pending_local_variables |
Definition at line 445 of file lex.h.
Referenced by looks_like_copyright().
bool octave::lexical_feedback::reading_classdef_file |
Definition at line 380 of file lex.h.
Referenced by octave::base_parser::bison_error(), octave::base_lexer::flex_yyleng(), octave::base_parser::frob_function(), parse_fcn_file(), and octave_base_reader::reading_classdef_file().
bool octave::lexical_feedback::reading_fcn_file |
bool octave::lexical_feedback::reading_script_file |
Definition at line 377 of file lex.h.
Referenced by octave::base_parser::bison_error(), octave::base_lexer::flex_yyleng(), octave::base_parser::frob_function(), octave::base_parser::make_decl_command(), and octave_base_reader::reading_script_file().
std::string octave::lexical_feedback::string_text |
symbol_table_context octave::lexical_feedback::symtab_context |
Definition at line 448 of file lex.h.
Referenced by octave::base_parser::make_anon_fcn_handle(), octave::base_parser::recover_from_parsing_function(), and octave::base_parser::start_function().
token_cache octave::lexical_feedback::tokens |
Definition at line 455 of file lex.h.
Referenced by looks_like_copyright(), previous_token_is_binop(), and space_follows_previous_token().