GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::lexical_feedback Class Reference

#include "lex.h"

Inheritance diagram for octave::lexical_feedback:
Collaboration diagram for octave::lexical_feedback:

Classes

class  bbp_nesting_level
 
class  symbol_table_context
 
class  token_cache
 

Public Member Functions

 lexical_feedback (const lexical_feedback &)=delete
 
 lexical_feedback (interpreter &interp)
 
 ~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)
 
lexical_feedbackoperator= (const lexical_feedback &)=delete
 
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
 

Public Attributes

bool m_allow_command_syntax
 
bool m_at_beginning_of_statement
 
int m_block_comment_nesting_level
 
int m_braceflag
 
int m_bracketflag
 
bool m_buffer_function_text
 
int m_command_arg_paren_count
 
std::string m_comment_text
 
std::string m_current_input_line
 
int m_defining_func
 
std::string m_dir_name
 
bool m_end_of_input
 
std::string m_fcn_file_full_name
 
std::string m_fcn_file_name
 
filepos m_filepos
 
bool m_force_script
 
std::string m_function_text
 
std::string m_help_text
 
interpreterm_interpreter
 
bool m_looking_at_anon_fcn_args
 
bool m_looking_at_decl_list
 
int m_looking_at_function_handle
 
bool m_looking_at_indirect_ref
 
bool m_looking_at_initializer_expression
 
bool m_looking_at_matrix_or_assign_lhs
 
std::list< bool > m_looking_at_object_index
 
bool m_looking_at_parameter_list
 
bool m_looking_at_return_list
 
bool m_looking_for_object_index
 
int m_looping
 
bool m_maybe_classdef_get_set_method
 
bbp_nesting_level m_nesting_level
 
std::string m_package_name
 
std::stack< bool > m_parsed_function_name
 
bool m_parsing_anon_fcn_body
 
bool m_parsing_class_method
 
bool m_parsing_classdef
 
bool m_parsing_classdef_decl
 
bool m_parsing_classdef_get_method
 
bool m_parsing_classdef_set_method
 
bool m_parsing_classdef_superclass
 
std::set< std::string > m_pending_local_variables
 
bool m_quote_is_transpose
 
bool m_reading_classdef_file
 
bool m_reading_fcn_file
 
bool m_reading_script_file
 
std::string m_string_text
 
symbol_table_context m_symtab_context
 
filepos m_tok_beg
 
filepos m_tok_end
 
size_t m_token_count
 
token_cache m_tokens
 

Detailed Description

Definition at line 51 of file lex.h.

Constructor & Destructor Documentation

◆ lexical_feedback() [1/2]

octave::lexical_feedback::lexical_feedback ( interpreter interp)
inline

Definition at line 266 of file lex.h.

◆ lexical_feedback() [2/2]

octave::lexical_feedback::lexical_feedback ( const lexical_feedback )
delete

◆ ~lexical_feedback()

octave::lexical_feedback::~lexical_feedback ( void  )

Definition at line 5062 of file lex.cc.

References octave::lexical_feedback::token_cache::clear(), and m_tokens.

Member Function Documentation

◆ init()

void octave::lexical_feedback::init ( void  )

Definition at line 5068 of file lex.cc.

References m_looking_at_object_index.

◆ mark_as_variable()

void octave::lexical_feedback::mark_as_variable ( const std::string &  nm)

◆ mark_as_variables()

void octave::lexical_feedback::mark_as_variables ( const std::list< std::string > &  lst)

◆ mark_previous_token_trailing_space()

void octave::lexical_feedback::mark_previous_token_trailing_space ( void  )

◆ maybe_mark_previous_token_as_variable()

void octave::lexical_feedback::maybe_mark_previous_token_as_variable ( void  )

◆ operator=()

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

◆ previous_token_is_binop()

bool octave::lexical_feedback::previous_token_is_binop ( void  ) const

◆ previous_token_is_keyword()

bool octave::lexical_feedback::previous_token_is_keyword ( void  ) const

◆ previous_token_may_be_command()

bool octave::lexical_feedback::previous_token_may_be_command ( void  ) const

◆ previous_token_value()

int octave::lexical_feedback::previous_token_value ( void  ) const

◆ previous_token_value_is()

bool octave::lexical_feedback::previous_token_value_is ( int  tok_val) const

◆ reset()

◆ space_follows_previous_token()

bool octave::lexical_feedback::space_follows_previous_token ( void  ) const

Member Data Documentation

◆ m_allow_command_syntax

bool octave::lexical_feedback::m_allow_command_syntax

◆ m_at_beginning_of_statement

◆ m_block_comment_nesting_level

int octave::lexical_feedback::m_block_comment_nesting_level

Definition at line 459 of file lex.h.

Referenced by octave::base_lexer::handle_end_of_input(), and reset().

◆ m_braceflag

int octave::lexical_feedback::m_braceflag

Definition at line 447 of file lex.h.

Referenced by octave::base_lexer::handle_close_bracket(), and reset().

◆ m_bracketflag

int octave::lexical_feedback::m_bracketflag

Definition at line 444 of file lex.h.

Referenced by octave::base_lexer::handle_close_bracket(), and reset().

◆ m_buffer_function_text

bool octave::lexical_feedback::m_buffer_function_text

◆ m_command_arg_paren_count

int octave::lexical_feedback::m_command_arg_paren_count

Definition at line 462 of file lex.h.

Referenced by octave::base_lexer::finish_command_arg(), and reset().

◆ m_comment_text

std::string octave::lexical_feedback::m_comment_text

◆ m_current_input_line

std::string octave::lexical_feedback::m_current_input_line

◆ m_defining_func

int octave::lexical_feedback::m_defining_func

◆ m_dir_name

std::string octave::lexical_feedback::m_dir_name

◆ m_end_of_input

bool octave::lexical_feedback::m_end_of_input

Definition at line 357 of file lex.h.

Referenced by octave::base_parser::at_end_of_input(), and reset().

◆ m_fcn_file_full_name

◆ m_fcn_file_name

◆ m_filepos

◆ m_force_script

bool octave::lexical_feedback::m_force_script

◆ m_function_text

std::string octave::lexical_feedback::m_function_text

◆ m_help_text

std::string octave::lexical_feedback::m_help_text

◆ m_interpreter

◆ m_looking_at_anon_fcn_args

bool octave::lexical_feedback::m_looking_at_anon_fcn_args

Definition at line 367 of file lex.h.

Referenced by reset().

◆ m_looking_at_decl_list

bool octave::lexical_feedback::m_looking_at_decl_list

Definition at line 377 of file lex.h.

Referenced by octave::base_lexer::make_keyword_token(), and reset().

◆ m_looking_at_function_handle

int octave::lexical_feedback::m_looking_at_function_handle

Definition at line 456 of file lex.h.

Referenced by reset().

◆ m_looking_at_indirect_ref

bool octave::lexical_feedback::m_looking_at_indirect_ref

◆ m_looking_at_initializer_expression

bool octave::lexical_feedback::m_looking_at_initializer_expression

Definition at line 381 of file lex.h.

Referenced by reset().

◆ m_looking_at_matrix_or_assign_lhs

bool octave::lexical_feedback::m_looking_at_matrix_or_assign_lhs

Definition at line 385 of file lex.h.

Referenced by reset().

◆ m_looking_at_object_index

std::list<bool> octave::lexical_feedback::m_looking_at_object_index

◆ m_looking_at_parameter_list

bool octave::lexical_feedback::m_looking_at_parameter_list

Definition at line 373 of file lex.h.

Referenced by octave::base_parser::recover_from_parsing_function(), and reset().

◆ m_looking_at_return_list

bool octave::lexical_feedback::m_looking_at_return_list

◆ m_looking_for_object_index

bool octave::lexical_feedback::m_looking_for_object_index

◆ m_looping

◆ m_maybe_classdef_get_set_method

bool octave::lexical_feedback::m_maybe_classdef_get_set_method

◆ m_nesting_level

◆ m_package_name

std::string octave::lexical_feedback::m_package_name

Definition at line 503 of file lex.h.

Referenced by reset(), and octave::base_parser::start_function().

◆ m_parsed_function_name

std::stack<bool> octave::lexical_feedback::m_parsed_function_name

◆ m_parsing_anon_fcn_body

bool octave::lexical_feedback::m_parsing_anon_fcn_body

Definition at line 395 of file lex.h.

Referenced by octave::base_lexer::handle_identifier(), and reset().

◆ m_parsing_class_method

bool octave::lexical_feedback::m_parsing_class_method

Definition at line 398 of file lex.h.

Referenced by reset(), and octave::base_parser::start_function().

◆ m_parsing_classdef

bool octave::lexical_feedback::m_parsing_classdef

◆ m_parsing_classdef_decl

bool octave::lexical_feedback::m_parsing_classdef_decl

Definition at line 406 of file lex.h.

Referenced by octave::base_lexer::handle_op(), and reset().

◆ m_parsing_classdef_get_method

bool octave::lexical_feedback::m_parsing_classdef_get_method

Definition at line 418 of file lex.h.

Referenced by reset(), and octave::base_parser::start_function().

◆ m_parsing_classdef_set_method

bool octave::lexical_feedback::m_parsing_classdef_set_method

Definition at line 421 of file lex.h.

Referenced by reset(), and octave::base_parser::start_function().

◆ m_parsing_classdef_superclass

bool octave::lexical_feedback::m_parsing_classdef_superclass

Definition at line 410 of file lex.h.

Referenced by octave::base_lexer::handle_op(), and reset().

◆ m_pending_local_variables

std::set<std::string> octave::lexical_feedback::m_pending_local_variables

◆ m_quote_is_transpose

bool octave::lexical_feedback::m_quote_is_transpose

Definition at line 424 of file lex.h.

Referenced by reset().

◆ m_reading_classdef_file

◆ m_reading_fcn_file

◆ m_reading_script_file

◆ m_string_text

std::string octave::lexical_feedback::m_string_text

Definition at line 479 of file lex.h.

Referenced by octave::base_lexer::finish_command_arg(), and reset().

◆ m_symtab_context

◆ m_tok_beg

◆ m_tok_end

◆ m_token_count

size_t octave::lexical_feedback::m_token_count

◆ m_tokens


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