GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "lo-regexp.h"
Classes | |
class | match_data |
class | match_element |
class | opts |
Public Member Functions | |
regexp (const std::string &pat="", const regexp::opts &opt=regexp::opts(), const std::string &w="regexp") | |
regexp (const regexp &rx) | |
~regexp (void) | |
void | compile (const std::string &pat, const regexp::opts &opt=regexp::opts()) |
bool | is_match (const std::string &buffer) |
Array< bool > | is_match (const string_vector &buffer) |
match_data | match (const std::string &buffer) |
regexp & | operator= (const regexp &rx) |
std::string | replace (const std::string &buffer, const std::string &replacement) |
Private Member Functions | |
void | compile_internal (void) |
void | free (void) |
Private Attributes | |
void * | data |
std::string | m |
Array< int > | named_idx |
string_vector | named_pats |
int | nnames |
opts | options |
std::string | pattern |
std::string | who |
Definition at line 36 of file lo-regexp.h.
|
inline |
Definition at line 45 of file lo-regexp.h.
|
inline |
Definition at line 54 of file lo-regexp.h.
|
inline |
Definition at line 73 of file lo-regexp.h.
References free().
|
inline |
Definition at line 75 of file lo-regexp.h.
|
private |
Definition at line 68 of file lo-regexp.cc.
References string_vector::append(), regexp::opts::case_insensitive(), data, regexp::opts::dotexceptnewline(), free(), regexp::opts::freespacing(), regexp::opts::lineanchors(), lookbehind_warned, MAXLOOKBEHIND, named_idx, named_pats, nnames, options, pattern, Array< T >::resize(), and who.
|
private |
bool regexp::is_match | ( | const std::string & | buffer | ) |
Definition at line 427 of file lo-regexp.cc.
References match(), and octave_base_list< elt_type >::size().
Referenced by symbol_table::do_clear_variable_regexp(), symbol_table::do_regexp(), is_match(), is_regexp_match(), and symbol_table::regexp_global_variables().
Array< bool > regexp::is_match | ( | const string_vector & | buffer | ) |
Definition at line 435 of file lo-regexp.cc.
References is_match(), and Array< T >::length().
regexp::match_data regexp::match | ( | const std::string & | buffer | ) |
Definition at line 243 of file lo-regexp.cc.
References data, regexp::opts::emptymatch(), named_idx, named_pats, nnames, OCTAVE_LOCAL_BUFFER, OCTAVE_QUIT, regexp::opts::once(), options, PCRE_MATCHLIMIT_MAX, Matrix::resize(), and who.
Referenced by is_match(), regexp_match(), and replace().
Definition at line 59 of file lo-regexp.h.
References data, named_idx, named_pats, nnames, and pattern.
std::string regexp::replace | ( | const std::string & | buffer, |
const std::string & | replacement | ||
) |
Definition at line 456 of file lo-regexp.cc.
References Matrix::append(), octave_base_list< elt_type >::begin(), match(), rep_token_t::num, OCTAVE_QUIT, rep_token_t::pos, and octave_base_list< elt_type >::size().
Referenced by regexp_replace().
|
private |
Definition at line 231 of file lo-regexp.h.
Referenced by compile_internal(), free(), match(), and operator=().
|
private |
Definition at line 233 of file lo-regexp.h.
Definition at line 236 of file lo-regexp.h.
Referenced by compile_internal(), match(), and operator=().
|
private |
Definition at line 234 of file lo-regexp.h.
Referenced by compile_internal(), match(), and operator=().
|
private |
Definition at line 235 of file lo-regexp.h.
Referenced by compile_internal(), match(), and operator=().
|
private |
Definition at line 228 of file lo-regexp.h.
Referenced by compile_internal(), and match().
|
private |
Definition at line 226 of file lo-regexp.h.
Referenced by compile_internal(), and operator=().
|
private |
Definition at line 237 of file lo-regexp.h.
Referenced by compile_internal(), and match().