GNU Octave  8.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:
Collaboration diagram for 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)
 
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_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
 
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
 
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_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() [1/2]

lexical_feedback::lexical_feedback ( interpreter interp)
inline

Definition at line 266 of file lex.h.

◆ lexical_feedback() [2/2]

lexical_feedback::lexical_feedback ( const lexical_feedback )
delete

◆ ~lexical_feedback()

lexical_feedback::~lexical_feedback ( void  )

Definition at line 5109 of file lex.cc.

Member Function Documentation

◆ init()

void lexical_feedback::init ( void  )

Definition at line 5115 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 ( void  )

◆ operator=()

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

◆ previous_token_is_binop()

bool lexical_feedback::previous_token_is_binop ( void  ) const

◆ previous_token_is_keyword()

bool lexical_feedback::previous_token_is_keyword ( void  ) const

Definition at line 5232 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 ( void  ) const

◆ previous_token_value()

int lexical_feedback::previous_token_value ( void  ) 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 ( void  ) 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 389 of file lex.h.

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

◆ m_at_beginning_of_statement

◆ m_block_comment_nesting_level

int lexical_feedback::m_block_comment_nesting_level

Definition at line 460 of file lex.h.

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

◆ m_braceflag

int lexical_feedback::m_braceflag

Definition at line 448 of file lex.h.

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

◆ m_bracketflag

int lexical_feedback::m_bracketflag

Definition at line 445 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 393 of file lex.h.

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

◆ m_command_arg_paren_count

int lexical_feedback::m_command_arg_paren_count

Definition at line 463 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 486 of file lex.h.

Referenced by base_lexer::finish_comment(), base_lexer::handle_continuation(), and reset().

◆ m_current_input_line

std::string lexical_feedback::m_current_input_line

◆ 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 355 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 429 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_help_text

std::string lexical_feedback::m_help_text

◆ m_interpreter

◆ m_looking_at_anon_fcn_args

bool lexical_feedback::m_looking_at_anon_fcn_args

Definition at line 365 of file lex.h.

Referenced by octave_push_parse(), and reset().

◆ m_looking_at_decl_list

bool lexical_feedback::m_looking_at_decl_list

Definition at line 375 of file lex.h.

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

◆ m_looking_at_function_handle

int lexical_feedback::m_looking_at_function_handle

Definition at line 457 of file lex.h.

Referenced by octave_push_parse(), and reset().

◆ m_looking_at_indirect_ref

bool lexical_feedback::m_looking_at_indirect_ref

◆ m_looking_at_matrix_or_assign_lhs

bool lexical_feedback::m_looking_at_matrix_or_assign_lhs

Definition at line 379 of file lex.h.

Referenced by octave_push_parse(), and 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 371 of file lex.h.

Referenced by octave_push_parse(), 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

◆ m_nesting_level

◆ m_package_name

std::string lexical_feedback::m_package_name

Definition at line 504 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 396 of file lex.h.

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

◆ m_parsing_class_method

bool lexical_feedback::m_parsing_class_method

Definition at line 399 of file lex.h.

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

◆ m_parsing_classdef

bool lexical_feedback::m_parsing_classdef

Definition at line 402 of file lex.h.

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

◆ m_parsing_classdef_decl

bool lexical_feedback::m_parsing_classdef_decl

Definition at line 407 of file lex.h.

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

◆ m_parsing_classdef_get_method

bool lexical_feedback::m_parsing_classdef_get_method

Definition at line 419 of file lex.h.

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

◆ m_parsing_classdef_set_method

bool lexical_feedback::m_parsing_classdef_set_method

Definition at line 422 of file lex.h.

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

◆ m_parsing_classdef_superclass

bool lexical_feedback::m_parsing_classdef_superclass

Definition at line 411 of file lex.h.

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

◆ m_quote_is_transpose

bool lexical_feedback::m_quote_is_transpose

Definition at line 425 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 480 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 467 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: