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

#include "lex.h"

Inheritance diagram for lexical_feedback:
base_lexer lexer push_lexer

Classes

class  bbp_nesting_level
 
class  symbol_table_context
 
class  token_cache
 

Public Member Functions

 lexical_feedback (interpreter &interp)
 
 ~lexical_feedback ()
 
void init ()
 
void mark_as_variable (const std::string &nm)
 
void mark_as_variables (const std::list< std::string > &lst)
 
void mark_previous_token_trailing_space ()
 
bool previous_token_is_binop () const
 
bool previous_token_is_keyword () const
 
bool previous_token_may_be_command () const
 
int previous_token_value () const
 
bool previous_token_value_is (int tok_val) const
 
void reset ()
 
bool space_follows_previous_token () const
 

Public Attributes

bool m_allow_command_syntax
 
bool m_arguments_is_keyword
 
bool m_at_beginning_of_statement
 
int m_block_comment_nesting_level
 
int m_braceflag
 
int m_bracketflag
 
bool m_buffer_function_text
 
bool m_classdef_element_names_are_keywords
 
int m_command_arg_paren_count
 
std::string m_comment_text
 
bool m_comment_uses_hash_char
 
std::string m_current_input_line
 
int m_defining_fcn
 
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
 
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_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
 
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
 
std::size_t m_token_count
 
token_cache m_tokens
 

Detailed Description

Definition at line 51 of file lex.h.

Constructor & Destructor Documentation

◆ lexical_feedback()

lexical_feedback::lexical_feedback ( interpreter interp)
inline

Definition at line 264 of file lex.h.

◆ ~lexical_feedback()

lexical_feedback::~lexical_feedback ( )

Definition at line 5021 of file lex.cc.

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

Member Function Documentation

◆ init()

void lexical_feedback::init ( )

Definition at line 5027 of file lex.cc.

References m_looking_at_object_index.

◆ mark_as_variable()

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

◆ mark_as_variables()

◆ mark_previous_token_trailing_space()

void lexical_feedback::mark_previous_token_trailing_space ( )

◆ previous_token_is_binop()

bool lexical_feedback::previous_token_is_binop ( ) const

◆ previous_token_is_keyword()

bool lexical_feedback::previous_token_is_keyword ( ) const

Definition at line 5144 of file lex.cc.

References lexical_feedback::token_cache::front(), token::iskeyword(), and m_tokens.

◆ previous_token_may_be_command()

bool lexical_feedback::previous_token_may_be_command ( ) const

◆ previous_token_value()

int lexical_feedback::previous_token_value ( ) const

◆ previous_token_value_is()

bool lexical_feedback::previous_token_value_is ( int  tok_val) const

◆ reset()

◆ space_follows_previous_token()

bool lexical_feedback::space_follows_previous_token ( ) const

Member Data Documentation

◆ m_allow_command_syntax

bool lexical_feedback::m_allow_command_syntax

◆ m_arguments_is_keyword

bool lexical_feedback::m_arguments_is_keyword

Definition at line 383 of file lex.h.

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

◆ m_at_beginning_of_statement

bool lexical_feedback::m_at_beginning_of_statement

◆ m_block_comment_nesting_level

int lexical_feedback::m_block_comment_nesting_level

Definition at line 458 of file lex.h.

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

◆ m_braceflag

int lexical_feedback::m_braceflag

Definition at line 446 of file lex.h.

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

◆ m_bracketflag

int lexical_feedback::m_bracketflag

Definition at line 443 of file lex.h.

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

◆ m_buffer_function_text

bool lexical_feedback::m_buffer_function_text

◆ m_classdef_element_names_are_keywords

bool lexical_feedback::m_classdef_element_names_are_keywords

Definition at line 387 of file lex.h.

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

◆ m_command_arg_paren_count

int lexical_feedback::m_command_arg_paren_count

Definition at line 461 of file lex.h.

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

◆ m_comment_text

std::string lexical_feedback::m_comment_text

Definition at line 485 of file lex.h.

Referenced by reset().

◆ m_comment_uses_hash_char

bool lexical_feedback::m_comment_uses_hash_char

Definition at line 440 of file lex.h.

Referenced by base_lexer::check_comment_for_hash_char(), and reset().

◆ m_current_input_line

std::string lexical_feedback::m_current_input_line

Definition at line 481 of file lex.h.

Referenced by lexer::fill_flex_buffer(), base_lexer::make_keyword_token(), and reset().

◆ m_defining_fcn

int lexical_feedback::m_defining_fcn

◆ m_dir_name

std::string lexical_feedback::m_dir_name

◆ m_end_of_input

bool lexical_feedback::m_end_of_input

Definition at line 349 of file lex.h.

Referenced by base_parser::finish_input(), and reset().

◆ m_fcn_file_full_name

◆ m_fcn_file_name

std::string lexical_feedback::m_fcn_file_name

◆ m_filepos

◆ m_force_script

bool lexical_feedback::m_force_script

Definition at line 423 of file lex.h.

Referenced by base_lexer::make_keyword_token(), reset(), and base_parser::start_function().

◆ m_function_text

std::string lexical_feedback::m_function_text

◆ m_interpreter

◆ m_looking_at_anon_fcn_args

bool lexical_feedback::m_looking_at_anon_fcn_args

Definition at line 359 of file lex.h.

Referenced by reset().

◆ m_looking_at_decl_list

bool lexical_feedback::m_looking_at_decl_list

Definition at line 369 of file lex.h.

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

◆ m_looking_at_function_handle

int lexical_feedback::m_looking_at_function_handle

Definition at line 455 of file lex.h.

Referenced by reset().

◆ m_looking_at_indirect_ref

bool lexical_feedback::m_looking_at_indirect_ref

Definition at line 380 of file lex.h.

Referenced by base_lexer::handle_identifier(), base_parser::make_indirect_ref(), and reset().

◆ m_looking_at_matrix_or_assign_lhs

bool lexical_feedback::m_looking_at_matrix_or_assign_lhs

Definition at line 373 of file lex.h.

Referenced by reset().

◆ m_looking_at_object_index

std::list<bool> lexical_feedback::m_looking_at_object_index

◆ m_looking_at_parameter_list

bool lexical_feedback::m_looking_at_parameter_list

Definition at line 365 of file lex.h.

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

◆ m_looking_at_return_list

bool lexical_feedback::m_looking_at_return_list

◆ m_looking_for_object_index

bool lexical_feedback::m_looking_for_object_index

◆ m_looping

◆ m_maybe_classdef_get_set_method

bool lexical_feedback::m_maybe_classdef_get_set_method

Definition at line 410 of file lex.h.

Referenced by base_parser::make_fcn_name(), base_lexer::make_keyword_token(), and reset().

◆ m_nesting_level

bbp_nesting_level lexical_feedback::m_nesting_level

◆ m_package_name

std::string lexical_feedback::m_package_name

Definition at line 500 of file lex.h.

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

◆ m_parsed_function_name

std::stack<bool> lexical_feedback::m_parsed_function_name

◆ m_parsing_anon_fcn_body

bool lexical_feedback::m_parsing_anon_fcn_body

Definition at line 390 of file lex.h.

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

◆ m_parsing_class_method

bool lexical_feedback::m_parsing_class_method

Definition at line 393 of file lex.h.

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

◆ m_parsing_classdef

bool lexical_feedback::m_parsing_classdef

Definition at line 396 of file lex.h.

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

◆ m_parsing_classdef_decl

bool lexical_feedback::m_parsing_classdef_decl

Definition at line 401 of file lex.h.

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

◆ m_parsing_classdef_get_method

bool lexical_feedback::m_parsing_classdef_get_method

Definition at line 413 of file lex.h.

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

◆ m_parsing_classdef_set_method

bool lexical_feedback::m_parsing_classdef_set_method

Definition at line 416 of file lex.h.

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

◆ m_parsing_classdef_superclass

bool lexical_feedback::m_parsing_classdef_superclass

Definition at line 405 of file lex.h.

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

◆ m_quote_is_transpose

bool lexical_feedback::m_quote_is_transpose

Definition at line 419 of file lex.h.

Referenced by reset().

◆ m_reading_classdef_file

◆ m_reading_fcn_file

◆ m_reading_script_file

◆ m_string_text

std::string lexical_feedback::m_string_text

Definition at line 478 of file lex.h.

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

◆ m_symtab_context

◆ m_tok_beg

◆ m_tok_end

◆ m_token_count

std::size_t lexical_feedback::m_token_count

Definition at line 465 of file lex.h.

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

◆ m_tokens


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