Ticket #1410: boost.wave.diff

File boost.wave.diff, 11.2 KB (added by jensseidel@…, 15 years ago)
  • wave/cpplexer/re2clex/cpp_re.hpp

     
    3333namespace cpplexer {
    3434namespace re2clex {
    3535
     36struct Scanner;
     37
    3638///////////////////////////////////////////////////////////////////////////////
    3739//  The scanner function to call whenever a new token is requested
    3840BOOST_WAVE_DECL boost::wave::token_id scan(Scanner *s);
  • wave/cpplexer/cpp_lex_interface_generator.hpp

     
    1717#include <boost/wave/util/file_position.hpp>
    1818#include <boost/wave/language_support.hpp>
    1919#include <boost/wave/cpplexer/cpp_lex_interface.hpp>
     20#include <boost/wave/cpplexer/cpp_lex_token.hpp> // lex_token
    2021
    2122// this must occur after all of the includes and before any code appears
    2223#ifdef BOOST_HAS_ABI_HEADERS
  • wave/whitespace_handling.hpp

     
    104104    bool &skipped_newline)
    105105{
    106106    // re-initialize the preserve comments state
     107    // FIXME: Where is need_preserve_comments defined?
    107108    preserve_comments = boost::wave::need_preserve_comments(ctx.get_language());
    108109    return (this->*state)(token, skipped_newline);
    109110}
  • wave/grammars/cpp_expression_value.hpp

     
    1616#endif // defined(BOOST_SPIRIT_DEBUG)
    1717
    1818#include <boost/wave/wave_config.hpp>
     19#include <boost/wave/grammars/cpp_value_error.hpp> // value_error
    1920
    2021// this must occur after all of the includes and before any code appears
    2122#ifdef BOOST_HAS_ABI_HEADERS
     
    185186            case is_bool:
    186187                {
    187188                    int_literal_type result = value.i + as_long(rhs);
    188                     if (rhs.value.i > 0L && value.i > result ||
    189                         rhs.value.i < 0L && value.i < result)
     189                    // warning: suggest parentheses around && within ||
     190                    if ((rhs.value.i > 0L && value.i > result) ||
     191                        (rhs.value.i < 0L && value.i < result))
    190192                    {
    191193                        valid = error_integer_overflow;
    192194                    }
     
    199201            case is_int:
    200202                {
    201203                    int_literal_type result = value.i + rhs.value.i;
    202                     if (rhs.value.i > 0L && value.i > result ||
    203                         rhs.value.i < 0L && value.i < result)
     204                    if ((rhs.value.i > 0L && value.i > result) ||
     205                        (rhs.value.i < 0L && value.i < result))
    204206                    {
    205207                        valid = error_integer_overflow;
    206208                    }
     
    252254            case is_bool:
    253255                {
    254256                    int_literal_type result = value.i - as_long(rhs);
    255                     if (rhs.value.i > 0L && result > value.i ||
    256                         rhs.value.i < 0L && result < value.i)
     257                    if ((rhs.value.i > 0L && result > value.i) ||
     258                        (rhs.value.i < 0L && result < value.i))
    257259                    {
    258260                        valid = error_integer_overflow;
    259261                    }
     
    266268            case is_int:
    267269                {
    268270                    int_literal_type result = value.i - rhs.value.i;
    269                     if (rhs.value.i > 0L && result > value.i ||
    270                         rhs.value.i < 0L && result < value.i)
     271                    if ((rhs.value.i > 0L && result > value.i) ||
     272                        (rhs.value.i < 0L && result < value.i))
    271273                    {
    272274                        valid = error_integer_overflow;
    273275                    }
     
    310312            case is_int:
    311313                {
    312314                    uint_literal_type result = value.ui - rhs.value.i;
    313                     if (rhs.value.i > 0L && result > value.ui ||
    314                         rhs.value.i < 0L && result < value.ui)
     315                    if ((rhs.value.i > 0L && result > value.ui) ||
     316                        (rhs.value.i < 0L && result < value.ui))
    315317                    {
    316318                        valid = error_integer_overflow;
    317319                    }
  • wave/cpp_iteration_context.hpp

     
    2222#include <boost/wave/cpp_exceptions.hpp>
    2323#include <boost/wave/language_support.hpp>
    2424#include <boost/wave/util/file_position.hpp>
     25#include <boost/spirit/iterator/multi_pass.hpp> // make_multi_pass
    2526
    2627// this must occur after all of the includes and before any code appears
    2728#ifdef BOOST_HAS_ABI_HEADERS
  • wave/util/cpp_iterator.hpp

     
    476476
    477477        // if comments shouldn't be preserved replace them with newlines
    478478            id = token_id(act_token);
     479            // FIXME: Where is need_preserve_comments defined?
    479480            if (!need_preserve_comments(ctx.get_language()) &&
    480481                (T_CPPCOMMENT == id || context_policies::util::ccomment_has_newline(act_token)))
    481482            {
  • wave/util/time_conversion_helper.hpp

     
    3131#endif // SPIRIT_VERSION >= 0x1700
    3232#endif // !defined(spirit_append_actor)
    3333
     34#include <string.h> // memset
     35
    3436// this must occur after all of the includes and before any code appears
    3537#ifdef BOOST_HAS_ABI_HEADERS
    3638#include BOOST_ABI_PREFIX
  • wave/util/symbol_table.hpp

     
    2020#endif
    2121
    2222#include <boost/iterator/transform_iterator.hpp>
     23#include <boost/shared_ptr.hpp>
    2324
    2425// this must occur after all of the includes and before any code appears
    2526#ifdef BOOST_HAS_ABI_HEADERS
  • wave/util/insert_whitespace_detection.hpp

     
    8484    }
    8585// T_INTLIT
    8686    inline bool
    87     handle_intlit(boost::wave::token_id prev, boost::wave::token_id before)
     87    handle_intlit(boost::wave::token_id prev, boost::wave::token_id /*before*/)
    8888    {
    8989        using namespace boost::wave;
    9090        switch (static_cast<unsigned int>(prev)) {
     
    101101// T_FLOATLIT
    102102    inline bool
    103103    handle_floatlit(boost::wave::token_id prev,
    104         boost::wave::token_id before)
     104        boost::wave::token_id /*before*/)
    105105    {
    106106        using namespace boost::wave;
    107107        switch (static_cast<unsigned int>(prev)) {
     
    118118// <% T_LEFTBRACE
    119119    inline bool
    120120    handle_alt_leftbrace(boost::wave::token_id prev,
    121         boost::wave::token_id before)
     121        boost::wave::token_id /*before*/)
    122122    {
    123123        using namespace boost::wave;
    124124        switch (static_cast<unsigned int>(prev)) {
     
    131131// <: T_LEFTBRACKET
    132132    inline bool
    133133    handle_alt_leftbracket(boost::wave::token_id prev,
    134         boost::wave::token_id before)
     134        boost::wave::token_id /*before*/)
    135135    {
    136136        using namespace boost::wave;
    137137        switch (static_cast<unsigned int>(prev)) {
     
    144144// T_FIXEDPOINTLIT
    145145    inline bool
    146146    handle_fixedpointlit(boost::wave::token_id prev,
    147         boost::wave::token_id before)
     147        boost::wave::token_id /*before*/)
    148148    {
    149149        using namespace boost::wave;
    150150        switch (static_cast<unsigned int>(prev)) {
     
    174174// T_QUESTION_MARK
    175175    inline bool
    176176    handle_questionmark(boost::wave::token_id prev,
    177         boost::wave::token_id before)
     177        boost::wave::token_id /*before*/)
    178178    {
    179179        using namespace boost::wave;
    180180        switch(static_cast<unsigned int>(prev)) {
  • wave/util/cpp_macromap_utils.hpp

     
    1717
    1818#include <boost/wave/wave_config.hpp>
    1919#include <boost/wave/token_ids.hpp>
     20#include <boost/wave/util/unput_queue_iterator.hpp>
    2021
    2122// this must occur after all of the includes and before any code appears
    2223#ifdef BOOST_HAS_ABI_HEADERS
     
    420421inline bool
    421422is_whitespace_only (ContainerT const &argument)
    422423{
    423     using namespace cpplexer;
    424    
    425424    typename ContainerT::const_iterator end = argument.end();
    426425    for (typename ContainerT::const_iterator it = argument.begin();
    427426          it != end; ++it)
  • wave/util/cpp_macromap_predef.hpp

     
    1818
    1919#include <boost/wave/wave_config.hpp>
    2020#include <boost/wave/wave_config_constant.hpp>
     21#include <boost/wave/util/time_conversion_helper.hpp> // time_conversion_helper
    2122#include <boost/wave/token_ids.hpp>
    2223
    2324// this must occur after all of the includes and before any code appears
  • wave/util/unput_queue_iterator.hpp

     
    1818#include <boost/iterator_adaptors.hpp>
    1919
    2020#include <boost/wave/wave_config.hpp>
     21#include <boost/wave/token_ids.hpp> // token_id
    2122
    2223// this must occur after all of the includes and before any code appears
    2324#ifdef BOOST_HAS_ABI_HEADERS
     
    416417    inline boost::wave::token_id
    417418    skip_whitespace(IteratorT &first, IteratorT const &last)
    418419    {
    419         using namespace cpplexer;
    420        
    421420    token_id id = next_token<IteratorT>::peek(first, last, false);
    422421
    423422        if (IS_CATEGORY(id, WhiteSpaceTokenType)) {
     
    434433    inline boost::wave::token_id
    435434    skip_whitespace(IteratorT &first, IteratorT const &last, ContainerT &queue)
    436435    {
    437         using namespace cpplexer;
    438436        queue.push_back (*first);       // queue up the current token
    439437       
    440438    token_id id = next_token<IteratorT>::peek(first, last, false);
  • wave/wave_config.hpp

     
    404404#define PHOENIX_LIMIT 6
    405405#endif
    406406#if PHOENIX_LIMIT < 6
     407// boost/spirit/attribute.hpp sets PHOENIX_LIMIT to 3!!!!?
    407408#error "Boost.Wave: the constant PHOENIX_LIMIT must be at least defined to 4" \
    408409       " to compile the library."
    409410#endif