/* openDCM, dimensional constraint manager Copyright (C) 2013 Stefan Troeger This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef DCM_PARSER_H #define DCM_PARSER_H #include #include #include #include #include #include "opendcm/core/clustergraph.hpp" #include "property_parser.hpp" #include "object_parser.hpp" #include "edge_vertex_parser.hpp" #include "extractor.hpp" namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; namespace phx = boost::phoenix; namespace dcm { typedef boost::spirit::istream_iterator IIterator; struct sp : qi::grammar { qi::rule start; sp() : sp::base_type(start) { start %= +qi::char_; }; static void print(std::string s) { std::cout<<"parsed string:"< struct parser : qi::grammar, qi::space_type> { typedef typename Sys::Cluster graph; parser(); qi::rule, qi::space_type> cluster; details::cluster_prop_par cluster_prop; details::obj_par objects; details::vertex_parser vertex; details::edge_parser edge; sp str; Injector in; }; } #ifndef USE_EXTERNAL #include "parser_imp.hpp" #endif #endif //DCM_PARSER_H