reflex Namespace Reference

updated Tue Nov 15 2016
 
Classes | Functions
reflex Namespace Reference

Classes

class  AbstractLexer
 < More...
 
class  AbstractMatcher
 
class  Bits
 
class  BoostMatcher
 
class  BoostPerlMatcher
 
class  BoostPosixMatcher
 
class  FlexLexer
 < More...
 
class  Input
 
struct  lazy_intersection
 Intersection of two ordered sets, with an iterator to get elements lazely. More...
 
struct  lazy_union
 Union of two ordered sets, with an iterator to get elements lazely. More...
 
class  Matcher
 
class  ORanges
 
class  Pattern
 
class  PatternMatcher
 < More...
 
struct  range_compare
 Functor to order ranges in the reflex::Ranges set container. More...
 
class  Ranges
 
struct  TypeOp
 TypeOp<T>::Type = T, TypeOp<T>::ConstType = const T, TypeOp<T>::NonConstType = non-const T. More...
 
struct  TypeOp< const T >
 Template specialization of reflex::TypeOp. More...
 

Functions

int isword (int c)
 
template<typename S1 , typename S2 >
bool is_disjoint (const S1 &s1, const S2 &s2)
 
template<typename T , typename S >
bool is_in_set (const T &x, const S &s)
 
template<typename S1 , typename S2 >
bool is_subset (const S1 &s1, const S2 &s2)
 
template<typename S1 , typename S2 >
void set_insert (S1 &s1, const S2 &s2)
 Insert set s2 into set s1. More...
 
template<typename S1 , typename S2 >
void set_delete (S1 &s1, const S2 &s2)
 Delete elements of set s2 from set s1. More...
 
std::string utf8 (wchar_t a, wchar_t b, bool strict=true, const char *esc=NULL)
 
size_t utf8 (wchar_t c, char *s)
 

Function Documentation

template<typename S1 , typename S2 >
bool reflex::is_disjoint ( const S1 &  s1,
const S2 &  s2 
)

Check if sets s1 and s2 are disjoint.

Returns
true or false
template<typename T , typename S >
bool reflex::is_in_set ( const T &  x,
const S &  s 
)
inline

Check if value x is in set s.

Returns
true or false
template<typename S1 , typename S2 >
bool reflex::is_subset ( const S1 &  s1,
const S2 &  s2 
)

Check if set s1 is a subset of set s2.

Returns
true or false
int reflex::isword ( int  c)
inline

Check word character.

Returns
nonzero if argument c is in [A-Za-z0-9_], zero otherwise.
template<typename S1 , typename S2 >
void reflex::set_delete ( S1 &  s1,
const S2 &  s2 
)

Delete elements of set s2 from set s1.

template<typename S1 , typename S2 >
void reflex::set_insert ( S1 &  s1,
const S2 &  s2 
)
inline

Insert set s2 into set s1.

std::string reflex::utf8 ( wchar_t  a,
wchar_t  b,
bool  strict = true,
const char *  esc = NULL 
)

Convert a UCS range [a,b] to a UTF-8 regex pattern.

Returns
regex string to match the UCS range encoded in UTF-8.
Parameters
alower bound of UCS range
bupper bound of UCS range
strictreturned regex is strict UTF-8 (true) or lean UTF-8 (false)
escescape char(s), 0-3 chars limit, one backslash "\\" is the default
size_t reflex::utf8 ( wchar_t  c,
char *  s 
)
inline

Convert UCS to UTF-8.

Returns
length (in bytes) of UTF-8 character sequence stored in s.
Parameters
cUCS character
spoints to the buffer to populate with UTF-8 (1 to 6 bytes)