cpp_expression_grammar_gen.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. #if !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED)
  9. #define CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED
  10. #include <boost/wave/wave_config.hpp>
  11. #include <boost/wave/cpp_iteration_context.hpp>
  12. #include <boost/wave/grammars/cpp_value_error.hpp>
  13. #include <list>
  14. #include <boost/pool/pool_alloc.hpp>
  15. // this must occur after all of the includes and before any code appears
  16. #ifdef BOOST_HAS_ABI_HEADERS
  17. #include BOOST_ABI_PREFIX
  18. #endif
  19. // suppress warnings about dependent classes not being exported from the dll
  20. #ifdef BOOST_MSVC
  21. #pragma warning(push)
  22. #pragma warning(disable : 4251 4231 4660)
  23. #endif
  24. ///////////////////////////////////////////////////////////////////////////////
  25. namespace boost {
  26. namespace wave {
  27. namespace grammars {
  28. ///////////////////////////////////////////////////////////////////////////////
  29. //
  30. // expression_grammar_gen template class
  31. //
  32. // This template helps separating the compilation of the
  33. // expression_grammar class from the compilation of the main
  34. // pp_iterator. This is done to safe compilation time.
  35. //
  36. ///////////////////////////////////////////////////////////////////////////////
  37. template <typename TokenT>
  38. struct BOOST_WAVE_DECL expression_grammar_gen {
  39. typedef TokenT token_type;
  40. typedef std::list<token_type, boost::fast_pool_allocator<token_type> >
  41. token_sequence_type;
  42. static bool evaluate(
  43. typename token_sequence_type::const_iterator const &first,
  44. typename token_sequence_type::const_iterator const &last,
  45. typename token_type::position_type const &tok,
  46. bool if_block_status, value_error &status);
  47. };
  48. ///////////////////////////////////////////////////////////////////////////////
  49. } // namespace grammars
  50. } // namespace wave
  51. } // namespace boost
  52. #ifdef BOOST_MSVC
  53. #pragma warning(pop)
  54. #endif
  55. // the suffix header occurs after all of the code
  56. #ifdef BOOST_HAS_ABI_HEADERS
  57. #include BOOST_ABI_SUFFIX
  58. #endif
  59. #endif // !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED)