//////////////////////////////////////////////////////////////////////////////////
template <typename Lexer, typename InputIterator, typename Param>
- bool parse(Lexer &lexer, InputIterator& it, Param& param = EmptyType())
+ bool parse(Lexer &lexer, InputIterator& it, Param& param)
{
return lexer.parse(it, param);
}
+ template <typename Lexer, typename InputIterator>
+ bool parse(Lexer &lexer, InputIterator& it)
+ {
+ EmptyType e;
+ return lexer.parse(it, e);
+ }
+
+ template <typename Lexer, typename Param>
+ bool parse(Lexer &lexer, const char* s, Param& param)
+ {
+ return lexer.parse(s, param);
+ }
+
+ template <typename Lexer>
+ bool parse(Lexer &lexer, const char* s)
+ {
+ EmptyType e;
+ return lexer.parse(s, e);
+ }
+
//////////////////////////////////////////////////////////////////////////////////
template <typename Lexer, typename OutputStream, typename Param>
- void generate(const Lexer &lexer, OutputStream& os, Param& param = EmptyType())
+ void generate(const Lexer &lexer, OutputStream& os, Param& param)
{
lexer.generate(os, param);
}
+ template <typename Lexer, typename OutputStream>
+ void generate(const Lexer &lexer, OutputStream& os)
+ {
+ EmptyType e;
+ lexer.generate(os, e);
+ }
+
//////////////////////////////////////////////////////////////////////////////////
}
}
{
try{
lexical::println(fixed_char<'U'>());
- lexical::println(fixed_ptr<char>("aaa",3));
+ //lexical::println(fixed_ptr<char>("aaa",3));
+ lexical::println(fixed_string("aaca",3));
+
+ printf("%d\n", lexical::parse(fixed_char<'U'>(), "Z") );
}
catch(const ::std::string &s)
{