|
Defines production rule function to evaluate grammar expression describing white space.
UniverseT - Template parameter specifying type of the parseable universe. Can be either
cttl::const_edge or cttl::edge .
- Parameters:
-
- Returns:
- absolute position of the universe upper boundary after white space expression has been evaluated.
- Postcondition:
- The
match() function must always succeed and supposed to return a valid offset within specified universe of discourse.
- Remarks:
- Default policy supports strict grammar evaluation of the user input. The implementation of method
match is empty, therefore, it does no white space recognition. During grammar evaluation, the lexer implementation invokes match() function of the white space policy class, giving it a chance to modify upper boundary of the universe accordingly to the definition of white space. If match() function returns position before the white space, its behavior is described as non-greedy white space evaluation. On the other hand, if the function returns position immediately after the white space, the behavior is greedy. Non-greedy evaluations consume white space symbols, but offer capability to backtrack to the original position if necessary. The greedy version, on the other hand, consumes white space and suggests newly modified offset for future backtracking attempts.
Reimplemented from policy_default.
Reimplemented in policy_space< flag_greedy|flag_cpp_comments >.
Definition at line 601 of file policy.h.
References cttl::rule(). |