// Hannibal: partial C++ grammar to parse C++ type information // Copyright (c) 2005-2006 Danny Havenith // // Boost.Wave: A Standard compliant C++ preprocessor // Copyright (c) 2001-2009 Hartmut Kaiser // // http://www.boost.org/ // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if !defined(HANNIBAL_TRANSLATION_UNIT_SKIPPER_H_INCLUDED) #define HANNIBAL_TRANSLATION_UNIT_SKIPPER_H_INCLUDED #include #include #include #include #include /////////////////////////////////////////////////////////////////////////////// struct translation_unit_skipper : public boost::spirit::classic::grammar { template struct definition { definition(translation_unit_skipper const& /*self*/) { using namespace boost::spirit::classic; using namespace boost::wave; using boost::wave::util::pattern_p; skip = pattern_p(WhiteSpaceTokenType, TokenTypeMask) | pattern_p(EOLTokenType, TokenTypeMask) | pattern_p(EOFTokenType, TokenTypeMask) | comment_p(pattern_p(PPTokenType, TokenTypeMask), pattern_p(EOLTokenType, TokenTypeMask)) ; } boost::spirit::classic::rule skip; boost::spirit::classic::rule const& start() const { return skip; } }; }; #endif // HANNIBAL_TRANSLATION_UNIT_SKIPPER_H_INCLUDED