}
};
+ template <typename T>
+ class test
+ {
+ public:
+ template <typename _It, typename _Param>
+ bool analyze(_It& it, _Param& param)
+ {
+ _It it_work = it;
+ T t;
+ return t.analyze(it, param);
+ }
+ };
+ // Alias : test -> check
+ template <typename T> class check : public test<T> {};
+
////////////////////////////////////////////////////////////////
/*template <typename U>
////////////////////
template <typename T>
- class repeat
+ class repeat // optional_repeat
{
public:
template <typename _It, typename _Param>
> // >
> comment;
+ typedef repeat<comment> opt_comments;
+
/*class optcomm
{
};*/
{
};*/
typedef seq<
- //get_string_end_by< lesser >,
- //optional< comment >,
+ // comments
repeat< comment >,
- push_num<20>,
- repeat<
- seq<get_string_end_by<lesser>, optional<comment>,
- not< seq<lesser, not<exclamation> > >
+
+ repeat<
+ seq<
+ // text body
+ push_num<20>,
+ get_string_end_by<lesser>,
+ push_num<11>,
+
+ // comments
+ repeat<comment>,
+
+ // end when tag start.
+ test< not<
+ seq<
+ lesser, // <
+ not<exclamation> // not !
+ >
+ > >
>
- >,
- push_num<11>
+ >
> text;
// Element, Body
- /*typedef normal_tag;
- typedef empty_elem_tag;
- typedef or<normal_tag, empty_elem_tag> tag;*/
-
- /*typedef startend_element_impl;
- typedef empty_element_impl;
- typedef or<startend_element_impl, empty_element_impl> element_impl;*/
-
class element_;
typedef seq<
greater,
+
+ // Texts and Elements.
text,
- //lesser,
repeat<
- seq< element_, text >
+ seq< _debug_print<21>,element_,_debug_print<211>, text, _debug_print<213> >
>,
+
+ _debug_print<1>,
push_num<62>, // Close Tag Name start
get_string_end_by< or<slash, whitespace> >,
noreqws,
push_num<11>, // Start Tag Name end
attrs,
or<
- seq< slash, push_num<69> >,
- startend_element_impl
+ seq< slash, push_num<69> >, // for Empty Element Tag
+ startend_element_impl // Normal Tag
>
> element_impl;