#include <policy_state.h>
Public Types | |
typedef policy_default | strict_policy_T |
Defines space policy for strict-mode grammar evaluation. | |
Public Member Functions | |
policy_default () | |
Default constructor. | |
Static Public Member Functions | |
static size_t | lower_bound (size_t offset_, size_t) |
Validates offset_ position against void regions and adjusts the position accordigly. | |
template<typename SubstrT > | |
static bool | lower_bound (size_t, SubstrT &) |
Moves upper boundary of the parseable substring outside of a void region specified by the user. | |
template<typename SubstrT > | |
static size_t | match (SubstrT &substr_) |
Defines CTTL grammar production rule to evaluate grammar expression matching the white space. | |
static void | region_adjust (size_t, int) |
Adjusts map of void regions according to the specified position and delta offset. | |
template<typename StringT > | |
static StringT | region_difference (StringT const &str_, size_t first_offset_, size_t second_offset_) |
Returns substring pointed by the range of offsets, excluding existing void regions. | |
static void | region_erase (size_t, size_t) |
Erases void region(s). | |
static void | region_insert (size_t, size_t) |
Creates new void region. |
Definition at line 59 of file policy_state.h.
Defines space policy for strict-mode grammar evaluation.
Definition at line 70 of file policy_state.h.
cttl::policy_default::policy_default | ( | ) |
Default constructor.
Definition at line 202 of file policy_state.h.
00204 : 00205 m_flags( xtl_flag_default ) 00206 #endif //CTTL_STATEFUL_RUNTIME_MATCH 00207 { 00208 }
static size_t cttl::policy_default::lower_bound | ( | size_t | offset_, | |
size_t | ||||
) | [static] |
Validates offset_
position against void regions and adjusts the position accordigly.
offset_ | specifies entry position into the map of void regions. |
Definition at line 139 of file policy_state.h.
static bool cttl::policy_default::lower_bound | ( | size_t | , | |
SubstrT & | ||||
) | [static] |
Moves upper boundary of the parseable substring outside of a void region specified by the user.
SubstrT | specifies type of the parseable substring, such as cttl::const_edge or cttl::edge . |
substr_
is relocated even if the substring length becomes invalid. Therefore, the caller is responsible for checking whether the substr_
has valid length upon return. Definition at line 123 of file policy_state.h.
static size_t cttl::policy_default::match | ( | SubstrT & | substr_ | ) | [static] |
Defines CTTL grammar production rule to evaluate grammar expression matching the white space.
SubstrT | specifies type of the parseable substring, such as cttl::const_edge or cttl::edge. |
substr_ | references to the parseable substring. |
match
is empty. It does no white space recognition whatsoever. Reimplemented in cttl::policy_space< flag_follow_space >, cttl::policy_space< flag_greedy|flag_follow_space >, cttl::policy_space< flag_cpp_comments >, and cttl::policy_space< flag_greedy|flag_cpp_comments >.
Definition at line 100 of file policy_state.h.
static void cttl::policy_default::region_adjust | ( | size_t | , | |
int | ||||
) | [static] |
Adjusts map of void regions according to the specified position and delta offset.
Definition at line 148 of file policy_state.h.
static StringT cttl::policy_default::region_difference | ( | StringT const & | str_, | |
size_t | first_offset_, | |||
size_t | second_offset_ | |||
) | [static] |
Returns substring pointed by the range of offsets, excluding existing void regions.
Definition at line 167 of file policy_state.h.
00168 { 00169 return str_.substr( 00170 first_offset_, 00171 second_offset_ - first_offset_ 00172 ); 00173 }
static void cttl::policy_default::region_erase | ( | size_t | , | |
size_t | ||||
) | [static] |
static void cttl::policy_default::region_insert | ( | size_t | , | |
size_t | ||||
) | [static] |