{
};
+ ////////////////////////////////////////////////////////////////
template <typename T1, typename T2>
class seq2
{
- };
+ public:
+ template <typename T>
+ bool analyze(const T& it)
+ {
+ T1 t1;
+ if ( t1.analyze(it) == false )
+ return false;
+ T1 t2;
+ if ( t2.analyze(it) == false )
+ return false;
+ return true;
+ }
+ };
+ ////////////////////////////////////////////////////////////////
+
template <typename T1, typename T2, typename T3>
class seq3
{
- };
+ public:
+ template <typename T>
+ bool analyze(const T& it)
+ {
+ T1 t1;
+ if ( t1.analyze(it) == false )
+ return false;
+ T1 t2;
+ if ( t2.analyze(it) == false )
+ return false;
+ T1 t3;
+ if ( t3.analyze(it) == false )
+ return false;
+ return true;
+ }
+ };
+ ////////////////////////////////////////////////////////////////
+
template <typename T1, typename T2, typename T3, typename T4>
class seq4
{
{
};
- class _reqws
- {
- };
- class _nrqws
- {
- };
+ ///////////////////////////////////////////////////
- class reqws
- {
- };
- class nrqws
+ typedef
+ class requre_whitespace
{
- };
- class optws
- {
- };
+ }
+ _reqws, reqws;
+
+ /////////////////////
+
+ typedef
+ class no_requre_whitespace
+ {
+ public:
+ template <typename T>
+ bool analyze(const T& it)
+ {
+ for(;;)
+ {
+ //char c = it.operator *();
+ switch(*it)
+ {
+ case ' ':
+ case '\t':
+ case '\r':
+ case '\n':
+ continue;
+ }
+
+ break;
+ }
+
+ return true;
+ }
+ }
+ _nrqws, _noreqws, nrqws, noreqws, optws;
+
+ ///////////////////////////////////////////////////
}
///////////////////////////////////////
template <typename T>
class structure_base
{
+ public:
+ template <typename T>
+ bool analyze(const T& s)
+ {
+ return ( *s == '>' );
+ }
};
}
}
////////////////////////////////////////////////////
- typedef lexical::structure_base<
+ /*typedef lexical::structure_base<
::roast::lexical::structure::seq3<
structure::nothing_<structure::header>,
structure::nothing_<structure::body>,
structure::nothing
>
+ > _structure;*/
+ typedef ::roast::lexical::structure::seq3
+ <
+ structure::nothing_<structure::header>,
+ structure::nothing_<structure::body>,
+ structure::nothing
> _structure;
}
}