#include "lex.h"
Classes | |
class | comment_buffer |
class | input_buffer |
Protected Attributes | |
std::stack< int > | start_state_stack |
|
inline |
|
delete |
|
inline |
Definition at line 632 of file lex.h.
Referenced by octave::push_parser::run().
void base_lexer::begin_string | ( | int | state | ) |
Definition at line 5411 of file lex.cc.
References octave::state.
void base_lexer::clear_start_state | ( | void | ) |
token * base_lexer::current_token | ( | void | ) |
Definition at line 6596 of file lex.cc.
References m_scanner, yyget_lval, and YYSTYPE.
bool base_lexer::debug_flag | ( | void | ) | const |
Definition at line 6742 of file lex.cc.
References settings::lexer_debug_flag().
void base_lexer::display_start_state | ( | void | ) | const |
Definition at line 6816 of file lex.cc.
References BLOCK_COMMENT_START, COMMAND_START, DQ_STRING_START, FQ_IDENT_START, INITIAL, INPUT_FILE_START, LINE_COMMENT_START, MATRIX_START, and SQ_STRING_START.
void base_lexer::display_token | ( | int | tok | ) |
Definition at line 6609 of file lex.cc.
References ADD_EQ, AND_EQ, BREAK, CASE, CATCH, CLASSDEF, CLEANUP, CONTINUE, DIV_EQ, DO, DQ_STRING, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, ELSE, ELSEIF, EMUL, EMUL_EQ, END, END_OF_INPUT, EPOW, EPOW_EQ, EVENTS, EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_NOT, EXPR_OR, EXPR_OR_OR, FCN, FCN_HANDLE, FOR, FUNC_RET, GET, GLOBAL, HERMITIAN, IF, INPUT_FILE, LEFTDIV, LEFTDIV_EQ, LEXICAL_ERROR, METAQUERY, METHODS, MINUS_MINUS, MUL_EQ, NAME, NUMBER, octave::token::number(), OR_EQ, OTHERWISE, PERSISTENT, PLUS_PLUS, POW, POW_EQ, octave_value::print_raw(), PROPERTIES, SET, SQ_STRING, STRUCT_ELT, SUB_EQ, SUPERCLASSREF, SWITCH, octave::token::text(), TRANSPOSE, TRY, UNTIL, UNWIND, and WHILE.
bool base_lexer::display_tokens | ( | void | ) | const |
Definition at line 6749 of file lex.cc.
References settings::display_tokens().
void base_lexer::fatal_error | ( | const char * | msg | ) |
Implemented in octave::lexer, and octave::push_lexer.
int base_lexer::finish_command_arg | ( | void | ) |
void base_lexer::finish_comment | ( | comment_elt::comment_type | typ | ) |
Definition at line 6272 of file lex.cc.
References looks_like_copyright(), and looks_like_shebang().
int base_lexer::flex_yyleng | ( | void | ) |
Definition at line 5450 of file lex.cc.
References m_scanner, and yyget_leng.
char * base_lexer::flex_yytext | ( | void | ) |
Definition at line 5444 of file lex.cc.
References m_scanner, and yyget_text.
bool base_lexer::fq_identifier_contains_keyword | ( | const std::string & | s | ) |
Definition at line 5830 of file lex.cc.
References iskeyword().
|
inline |
Definition at line 668 of file lex.h.
Referenced by octave::base_parser::make_statement().
Definition at line 6291 of file lex.cc.
References panic_impossible.
void base_lexer::handle_continuation | ( | void | ) |
Definition at line 6213 of file lex.cc.
References is_space_or_tab().
int base_lexer::handle_end_of_input | ( | void | ) |
Definition at line 5419 of file lex.cc.
References END_OF_INPUT, and warning().
int base_lexer::handle_fq_identifier | ( | void | ) |
Definition at line 6394 of file lex.cc.
References FQ_IDENT, is_space_or_tab(), and LEXICAL_ERROR.
int base_lexer::handle_identifier | ( | void | ) |
Definition at line 6428 of file lex.cc.
References octave::token::mark_may_be_command(), NAME, and STRUCT_ELT.
int base_lexer::handle_meta_identifier | ( | void | ) |
Definition at line 6363 of file lex.cc.
References is_space_or_tab(), LEXICAL_ERROR, and METAQUERY.
int octave::base_lexer::handle_number | ( | ) |
int octave::base_lexer::handle_number | ( | ) |
int octave::base_lexer::handle_number | ( | ) |
int octave::base_lexer::handle_number | ( | void | ) |
Definition at line 5928 of file lex.cc.
References LEXICAL_ERROR, make_integer_value(), num_digits(), NUMBER, and panic_impossible.
int octave::base_lexer::handle_number | ( | void | ) |
Definition at line 6021 of file lex.cc.
References flintmax(), imag(), octave_value::is_undefined(), max(), NUMBER, OCTAVE_LOCAL_BUFFER, octave_value(), and panic_impossible.
int octave::base_lexer::handle_number | ( | void | ) |
Definition at line 6136 of file lex.cc.
References LEXICAL_ERROR, make_integer_value(), num_digits(), and NUMBER.
Definition at line 6888 of file lex.cc.
References EXPR_AND, EXPR_LT, and FQ_IDENT_START.
int base_lexer::handle_superclass_identifier | ( | void | ) |
Definition at line 6329 of file lex.cc.
References is_space_or_tab(), iskeyword(), LEXICAL_ERROR, and SUPERCLASSREF.
void base_lexer::increment_token_count | ( | void | ) |
Definition at line 6756 of file lex.cc.
References settings::increment_token_count().
void base_lexer::init | ( | void | ) |
Definition at line 5359 of file lex.cc.
References m_scanner, yylex_init, and yyset_extra.
|
inlinevirtual |
Reimplemented in octave::lexer.
Definition at line 733 of file lex.h.
Referenced by octave::base_parser::make_anon_fcn_handle().
|
inlinevirtual |
Reimplemented in octave::lexer.
|
inlinevirtual |
Reimplemented in octave::lexer.
Definition at line 729 of file lex.h.
Referenced by octave::base_parser::make_anon_fcn_handle().
bool base_lexer::input_from_tmp_history_file | ( | void | ) |
Definition at line 6779 of file lex.cc.
References history_system::input_from_tmp_file().
Referenced by octave::base_parser::start_function().
|
inlinevirtual |
Reimplemented in octave::lexer, and octave::push_lexer.
|
inlinevirtual |
Reimplemented in octave::push_lexer.
bool base_lexer::looking_at_space | ( | void | ) |
Definition at line 5527 of file lex.cc.
References is_space_or_tab().
int base_lexer::make_keyword_token | ( | const std::string & | s | ) |
Definition at line 5552 of file lex.cc.
References arguments_kw, break_kw, case_kw, catch_kw, classdef_kw, continue_kw, do_kw, else_kw, elseif_kw, end_kw, end_try_catch_kw, end_unwind_protect_kw, endarguments_kw, endclassdef_kw, endenumeration_kw, endevents_kw, endfor_kw, endfunction_kw, endif_kw, endmethods_kw, endparfor_kw, endproperties_kw, endspmd_kw, endswitch_kw, endwhile_kw, enumeration_kw, events_kw, for_kw, function_kw, get_kw, global_kw, if_kw, octave_kw_hash::in_word_set(), octave_kw::kw_id, magic_file_kw, magic_line_kw, methods_kw, otherwise_kw, panic_impossible, parfor_kw, persistent_kw, properties_kw, return_kw, set_kw, spmd_kw, switch_kw, octave_kw::tok, try_kw, until_kw, unwind_protect_cleanup_kw, unwind_protect_kw, and while_kw.
|
inherited |
Definition at line 5239 of file lex.cc.
References octave::symbol_scope::mark_as_variable().
Referenced by octave::base_parser::make_assign_op(), and octave::base_parser::make_for_command().
|
inherited |
Definition at line 5248 of file lex.cc.
References octave::symbol_scope::mark_as_variables().
Referenced by octave::base_parser::make_assign_op(), octave::base_parser::make_decl_command(), octave::base_parser::make_for_command(), and octave::base_parser::validate_matrix_for_assignment().
|
inherited |
Definition at line 5197 of file lex.cc.
References octave::token::mark_trailing_space().
Definition at line 6865 of file lex.cc.
References is_space_or_tab().
void base_lexer::maybe_warn_language_extension_comment | ( | char | c | ) |
void base_lexer::maybe_warn_separator_insert | ( | char | sep | ) |
Definition at line 6499 of file lex.cc.
References warning_with_id().
|
delete |
void base_lexer::pop_start_state | ( | void | ) |
Definition at line 6797 of file lex.cc.
References BEGIN, and OCTAVE_YYG.
void base_lexer::prep_for_file | ( | void | ) |
Definition at line 5403 of file lex.cc.
References INPUT_FILE_START.
|
inherited |
Definition at line 5212 of file lex.cc.
References ADD_EQ, AND_EQ, DIV_EQ, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, 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, MUL_EQ, OR_EQ, POW, POW_EQ, and SUB_EQ.
|
inherited |
Definition at line 5232 of file lex.cc.
References octave::token::iskeyword().
|
inherited |
Definition at line 5257 of file lex.cc.
References octave::token::may_be_command().
|
inherited |
Definition at line 5183 of file lex.cc.
References octave::token::token_value().
Definition at line 5190 of file lex.cc.
References octave::token::token_value_is().
void base_lexer::push_start_state | ( | int | state | ) |
Definition at line 6787 of file lex.cc.
References BEGIN, OCTAVE_YYG, and octave::state.
void base_lexer::push_token | ( | token * | tok | ) |
Definition at line 6588 of file lex.cc.
References m_scanner, yyget_lval, and YYSTYPE.
|
virtual |
Reimplemented in octave::lexer.
Definition at line 5380 of file lex.cc.
References m_scanner, and yyrestart.
Referenced by octave::lexer::reset(), and octave::base_parser::reset().
|
inherited |
Definition at line 5205 of file lex.cc.
References octave::token::space_follows_token().
int base_lexer::text_yyinput | ( | void | ) |
Definition at line 5456 of file lex.cc.
References display_character(), and m_scanner.
void base_lexer::warn_deprecated_operator | ( | const std::string & | deprecated_op, |
const std::string & | recommended_op, | ||
const std::string & | version | ||
) |
void base_lexer::warn_deprecated_syntax | ( | const std::string & | msg | ) |
Definition at line 6567 of file lex.cc.
References warning_with_id().
void base_lexer::warn_language_extension | ( | const std::string & | msg | ) |
Definition at line 6529 of file lex.cc.
References warning_with_id().
void base_lexer::warn_language_extension_continuation | ( | void | ) |
void base_lexer::warn_language_extension_operator | ( | const std::string & | op | ) |
void base_lexer::warn_single_quote_string | ( | void | ) |
Definition at line 6514 of file lex.cc.
References warning_with_id().
void base_lexer::xunput | ( | char | c, |
char * | buf | ||
) |
Definition at line 5491 of file lex.cc.
References display_character(), m_scanner, and yyunput().
|
inherited |
Definition at line 358 of file lex.h.
Referenced by octave::base_parser::disallow_command_syntax().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 442 of file lex.h.
Referenced by octave::base_parser::finish_function().
|
inherited |
|
inherited |
comment_buffer octave::base_lexer::m_comment_buf |
Definition at line 725 of file lex.h.
Referenced by octave::base_parser::finish_if_command(), octave::base_parser::finish_switch_command(), octave::base_parser::make_do_until_command(), octave::base_parser::make_for_command(), octave::base_parser::make_try_command(), octave::base_parser::make_unwind_command(), octave::base_parser::make_while_command(), and octave::base_parser::start_function().
|
inherited |
|
inherited |
|
inherited |
Definition at line 454 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
|
inherited |
Definition at line 501 of file lex.h.
Referenced by octave::base_parser::finish_function(), octave::base_parser::make_script(), and octave::base_parser::start_function().
|
inherited |
Definition at line 355 of file lex.h.
Referenced by octave::base_parser::at_end_of_input(), and octave::base_parser::finish_input().
|
inherited |
Definition at line 498 of file lex.h.
Referenced by octave::base_parser::make_anon_fcn_handle(), octave::base_parser::make_classdef(), 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(), octave::push_parser::run(), octave::parser::run(), and octave::base_parser::start_function().
|
inherited |
Definition at line 495 of file lex.h.
Referenced by octave::base_parser::make_classdef(), octave::base_parser::make_fcn_name(), octave::base_parser::make_script(), and octave::base_parser::start_function().
|
inherited |
Definition at line 429 of file lex.h.
Referenced by octave::base_parser::start_function().
|
inherited |
Definition at line 492 of file lex.h.
Referenced by octave::base_parser::finish_function().
|
inherited |
Definition at line 489 of file lex.h.
Referenced by octave::base_parser::make_script(), and octave::base_parser::start_function().
input_buffer octave::base_lexer::m_input_buf |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 371 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
|
inherited |
Definition at line 368 of file lex.h.
Referenced by octave::base_parser::recover_from_parsing_function().
|
inherited |
|
inherited |
Definition at line 451 of file lex.h.
Referenced by octave::base_parser::make_break_command(), octave::base_parser::make_continue_command(), octave::base_parser::make_do_until_command(), octave::base_parser::make_for_command(), and octave::base_parser::make_while_command().
|
inherited |
Definition at line 416 of file lex.h.
Referenced by octave::base_parser::make_fcn_name().
|
inherited |
|
inherited |
Definition at line 504 of file lex.h.
Referenced by octave::base_parser::start_function().
|
inherited |
Definition at line 513 of file lex.h.
Referenced by octave::base_parser::make_fcn_name(), and octave::base_parser::recover_from_parsing_function().
|
inherited |
|
inherited |
Definition at line 399 of file lex.h.
Referenced by octave::base_parser::start_function().
|
inherited |
Definition at line 402 of file lex.h.
Referenced by octave::base_parser::start_function().
|
inherited |
|
inherited |
Definition at line 419 of file lex.h.
Referenced by octave::base_parser::start_function().
|
inherited |
Definition at line 422 of file lex.h.
Referenced by octave::base_parser::start_function().
|
inherited |
|
inherited |
Definition at line 438 of file lex.h.
Referenced by octave::base_parser::finish_classdef_file(), and octave::base_parser::start_function().
|
inherited |
Definition at line 432 of file lex.h.
Referenced by octave::base_parser::finish_function(), octave::base_parser::recover_from_parsing_function(), and octave::base_parser::start_function().
|
inherited |
Definition at line 435 of file lex.h.
Referenced by octave::base_parser::make_decl_command(), octave::base_parser::push_fcn_symtab(), and octave::base_parser::start_function().
void* octave::base_lexer::m_scanner |
Definition at line 719 of file lex.h.
Referenced by octave::push_parser::run().
|
inherited |
Definition at line 516 of file lex.h.
Referenced by octave::base_parser::make_anon_fcn_handle(), octave::base_parser::make_classdef(), octave::base_parser::make_fcn_name(), octave::base_parser::make_identifier(), octave::base_parser::make_script(), octave::base_parser::push_fcn_symtab(), octave::base_parser::recover_from_parsing_function(), and octave::base_parser::start_function().
|
inherited |
|
protected |