GNU Octave
3.8.0
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 &) |
lexical_feedback::~lexical_feedback | ( | void | ) |
Definition at line 4527 of file lex.cc.
References lexical_feedback::token_cache::clear(), and tokens.
|
private |
Reimplemented in octave_base_lexer.
Definition at line 4533 of file lex.cc.
References looking_at_object_index.
void lexical_feedback::mark_as_variable | ( | const std::string & | nm | ) |
void lexical_feedback::mark_as_variables | ( | const std::list< std::string > & | lst | ) |
Definition at line 4662 of file lex.cc.
References pending_local_variables.
Definition at line 4603 of file lex.cc.
References lexical_feedback::token_cache::front(), token::mark_trailing_space(), previous_token_value_is(), and tokens.
Referenced by octave_base_lexer::handle_continuation().
Definition at line 4653 of file lex.cc.
References lexical_feedback::token_cache::front(), token::is_symbol(), pending_local_variables, token::symbol_name(), and tokens.
|
private |
Definition at line 4618 of file lex.cc.
References ADD_EQ, AND_EQ, DIV_EQ, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, EMINUS, EMUL, EMUL_EQ, EPOW, EPOW_EQ, EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_NOT, EXPR_OR, EXPR_OR_OR, LEFTDIV, LEFTDIV_EQ, LSHIFT, LSHIFT_EQ, MUL_EQ, OR_EQ, POW, POW_EQ, previous_token_value(), RSHIFT, RSHIFT_EQ, and SUB_EQ.
Referenced by octave_base_lexer::maybe_unput_comma_before_unary_op().
Definition at line 4639 of file lex.cc.
References lexical_feedback::token_cache::front(), token::is_keyword(), and tokens.
Definition at line 4646 of file lex.cc.
References lexical_feedback::token_cache::front(), token::may_be_command(), and tokens.
Referenced by octave_base_lexer::looks_like_command_arg().
Definition at line 4589 of file lex.cc.
References lexical_feedback::token_cache::front(), token::token_value(), and tokens.
Referenced by octave_base_lexer::maybe_unput_comma_before_unary_op(), and previous_token_is_binop().
Definition at line 4596 of file lex.cc.
References lexical_feedback::token_cache::front(), token::token_value_is(), and tokens.
Referenced by mark_previous_token_trailing_space().
Reimplemented in octave_push_lexer, octave_lexer, and octave_base_lexer.
Definition at line 4541 of file lex.cc.
References at_beginning_of_statement, block_comment_nesting_level, braceflag, bracketflag, lexical_feedback::token_cache::clear(), comment_text, current_input_column, current_input_line, defining_func, end_of_input, fcn_file_full_name, fcn_file_name, force_script, help_text, input_line_number, looking_at_anon_fcn_args, looking_at_decl_list, looking_at_function_handle, looking_at_indirect_ref, looking_at_initializer_expression, looking_at_matrix_or_assign_lhs, looking_at_object_index, looking_at_parameter_list, looking_at_return_list, looking_for_object_index, looping, maybe_classdef_get_set_method, nesting_level, parsed_function_name, parsing_class_method, parsing_classdef, reading_classdef_file, reading_fcn_file, reading_script_file, lexical_feedback::bbp_nesting_level::reset(), string_column, string_line, string_text, token_count, and tokens.
Definition at line 4611 of file lex.cc.
References lexical_feedback::token_cache::front(), token::space_follows_token(), and tokens.
Referenced by octave_base_lexer::looks_like_command_arg(), and octave_base_lexer::maybe_unput_comma_before_unary_op().
bool lexical_feedback::at_beginning_of_statement |
Definition at line 311 of file lex.h.
Referenced by octave_base_lexer::finish_comment(), octave_base_lexer::handle_identifier(), octave_base_lexer::handle_number(), octave_base_lexer::handle_op_internal(), octave_base_lexer::is_keyword_token(), and reset().
int lexical_feedback::block_comment_nesting_level |
Definition at line 390 of file lex.h.
Referenced by octave_base_lexer::handle_end_of_input(), and reset().
int lexical_feedback::braceflag |
Definition at line 378 of file lex.h.
Referenced by octave_base_lexer::handle_close_bracket(), and reset().
int lexical_feedback::bracketflag |
Definition at line 375 of file lex.h.
Referenced by octave_base_lexer::handle_close_bracket(), and reset().
std::string lexical_feedback::comment_text |
Definition at line 400 of file lex.h.
Referenced by octave_base_lexer::finish_comment(), octave_base_lexer::handle_continuation(), and reset().
int lexical_feedback::current_input_column |
Definition at line 372 of file lex.h.
Referenced by octave_base_lexer::begin_string(), octave_base_lexer::count_token(), octave_base_lexer::handle_continuation(), octave_base_lexer::handle_identifier(), octave_base_lexer::handle_meta_identifier(), octave_base_lexer::handle_number(), octave_base_lexer::handle_op_internal(), octave_base_lexer::handle_superclass_identifier(), octave_base_lexer::handle_token(), octave_base_lexer::is_keyword_token(), and reset().
std::string lexical_feedback::current_input_line |
Definition at line 397 of file lex.h.
Referenced by octave_lexer::fill_flex_buffer(), and reset().
int lexical_feedback::defining_func |
Definition at line 384 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
bool lexical_feedback::end_of_input |
Definition at line 307 of file lex.h.
Referenced by main_loop(), and reset().
std::string lexical_feedback::fcn_file_full_name |
Definition at line 416 of file lex.h.
Referenced by octave_base_lexer::gripe_matlab_incompatible(), octave_base_lexer::gripe_single_quote_string(), octave_base_lexer::is_keyword_token(), octave_base_lexer::maybe_warn_separator_insert(), and reset().
std::string lexical_feedback::fcn_file_name |
Definition at line 413 of file lex.h.
Referenced by octave_base_lexer::handle_end_of_input(), and reset().
bool lexical_feedback::force_script |
Definition at line 357 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
std::string lexical_feedback::help_text |
Definition at line 403 of file lex.h.
Referenced by octave_base_lexer::finish_comment(), and reset().
int lexical_feedback::input_line_number |
Definition at line 369 of file lex.h.
Referenced by octave_base_lexer::begin_string(), octave_base_lexer::count_token(), octave_base_lexer::gripe_matlab_incompatible(), octave_base_lexer::gripe_single_quote_string(), octave_base_lexer::handle_continuation(), octave_base_lexer::handle_end_of_input(), octave_base_lexer::handle_identifier(), octave_base_lexer::handle_meta_identifier(), octave_base_lexer::handle_number(), octave_base_lexer::handle_op_internal(), octave_base_lexer::handle_superclass_identifier(), octave_base_lexer::handle_token(), octave_base_lexer::is_keyword_token(), octave_base_lexer::maybe_warn_separator_insert(), and reset().
bool lexical_feedback::looking_at_anon_fcn_args |
bool lexical_feedback::looking_at_decl_list |
Definition at line 324 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
int lexical_feedback::looking_at_function_handle |
Definition at line 387 of file lex.h.
Referenced by octave_base_lexer::handle_identifier(), and reset().
bool lexical_feedback::looking_at_indirect_ref |
Definition at line 339 of file lex.h.
Referenced by octave_base_lexer::handle_identifier(), and reset().
bool lexical_feedback::looking_at_initializer_expression |
bool lexical_feedback::looking_at_matrix_or_assign_lhs |
std::list<bool> lexical_feedback::looking_at_object_index |
Definition at line 420 of file lex.h.
Referenced by init(), octave_base_lexer::inside_any_object_index(), reset(), and octave_base_lexer::whitespace_is_significant().
bool lexical_feedback::looking_at_parameter_list |
bool lexical_feedback::looking_at_return_list |
Definition at line 317 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
bool lexical_feedback::looking_for_object_index |
Definition at line 335 of file lex.h.
Referenced by octave_base_lexer::handle_identifier(), octave_base_lexer::handle_number(), octave_base_lexer::handle_op_internal(), and reset().
int lexical_feedback::looping |
Definition at line 381 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
bool lexical_feedback::maybe_classdef_get_set_method |
Definition at line 347 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
bbp_nesting_level lexical_feedback::nesting_level |
Definition at line 435 of file lex.h.
Referenced by octave_base_lexer::finish_comment(), octave_base_lexer::handle_close_bracket(), reset(), and octave_base_lexer::whitespace_is_significant().
std::stack<bool> lexical_feedback::parsed_function_name |
Definition at line 425 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
bool lexical_feedback::parsing_class_method |
bool lexical_feedback::parsing_classdef |
Definition at line 350 of file lex.h.
Referenced by octave_base_lexer::is_keyword_token(), and reset().
std::set<std::string> lexical_feedback::pending_local_variables |
Definition at line 428 of file lex.h.
Referenced by octave_base_lexer::is_variable(), mark_as_variables(), and maybe_mark_previous_token_as_variable().
bool lexical_feedback::reading_classdef_file |
Definition at line 366 of file lex.h.
Referenced by octave_base_lexer::handle_end_of_input(), octave_base_lexer::is_keyword_token(), octave_base_reader::reading_classdef_file(), reset(), and octave_base_lexer::reset().
bool lexical_feedback::reading_fcn_file |
Definition at line 360 of file lex.h.
Referenced by octave_base_lexer::handle_end_of_input(), octave_base_lexer::is_keyword_token(), octave_base_reader::reading_fcn_file(), reset(), and octave_base_lexer::reset().
bool lexical_feedback::reading_script_file |
Definition at line 363 of file lex.h.
Referenced by octave_base_lexer::handle_end_of_input(), octave_base_lexer::is_keyword_token(), octave_base_lexer::prep_for_file(), octave_base_reader::reading_script_file(), reset(), and octave_base_lexer::reset().
int lexical_feedback::string_column |
Definition at line 410 of file lex.h.
Referenced by octave_base_lexer::begin_string(), and reset().
int lexical_feedback::string_line |
Definition at line 409 of file lex.h.
Referenced by octave_base_lexer::begin_string(), and reset().
std::string lexical_feedback::string_text |
symbol_table_context lexical_feedback::symtab_context |
Definition at line 431 of file lex.h.
Referenced by octave_base_lexer::handle_identifier(), octave_base_lexer::handle_meta_identifier(), octave_base_lexer::handle_superclass_identifier(), and octave_base_lexer::reset().
size_t lexical_feedback::token_count |
Definition at line 394 of file lex.h.
Referenced by octave_base_lexer::count_token_internal(), octave_base_lexer::is_keyword_token(), and reset().
token_cache lexical_feedback::tokens |
Definition at line 438 of file lex.h.
Referenced by mark_previous_token_trailing_space(), maybe_mark_previous_token_as_variable(), previous_token_is_keyword(), previous_token_may_be_command(), previous_token_value(), previous_token_value_is(), octave_base_lexer::push_token(), reset(), space_follows_previous_token(), and ~lexical_feedback().