diff options
Diffstat (limited to 'xsd/xsd/type-map/parser.cxx')
-rw-r--r-- | xsd/xsd/type-map/parser.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/xsd/xsd/type-map/parser.cxx b/xsd/xsd/type-map/parser.cxx index 9f5e2b5..e391cf7 100644 --- a/xsd/xsd/type-map/parser.cxx +++ b/xsd/xsd/type-map/parser.cxx @@ -1,11 +1,10 @@ // file : xsd/type-map/parser.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2007-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2007-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <iostream> -#include <backend-elements/regex.hxx> +#include <cutl/re.hxx> #include <type-map/parser.hxx> @@ -14,14 +13,14 @@ using std::endl; namespace TypeMap { typedef Lexer::Token Token; - typedef BackendElements::Regex::Format<WideChar> Format; + typedef cutl::re::wformat Format; Parser::Parser (Lexer& lex, String const& path) : lex_ (lex), path_ (path), e (std::wcerr) { } - Boolean Parser:: + bool Parser:: parse (Namespaces& ns) { try @@ -83,7 +82,7 @@ namespace TypeMap return true; } - Boolean Parser:: + bool Parser:: namespace_ (Namespaces& ns) { // First get XML namespace. @@ -99,7 +98,7 @@ namespace TypeMap catch (Format const& ex) { e << path_ << ":" << t.line () << ": invalid namespace pattern: " - << ex.description () << endl; + << ex.description ().c_str () << endl; return false; } @@ -115,7 +114,7 @@ namespace TypeMap // t = lex_.next (); - Boolean has_cxx_name (false); + bool has_cxx_name (false); String cxx_name; if (t.type () != Token::token) @@ -191,7 +190,7 @@ namespace TypeMap return true; } - Boolean Parser:: + bool Parser:: include (Namespace& n) { Token t (lex_.next ()); @@ -222,7 +221,7 @@ namespace TypeMap return true; } - Boolean Parser:: + bool Parser:: type (Token t, Namespace& n) { Pattern xsd_name; @@ -234,7 +233,7 @@ namespace TypeMap catch (Format const& ex) { e << path_ << ":" << t.line () << ": invalid namespace pattern: " - << ex.description () << endl; + << ex.description ().c_str () << endl; return false; } |