Ticket #1410: boost.wave.diff
File boost.wave.diff, 11.2 KB (added by , 15 years ago) |
---|
-
wave/cpplexer/re2clex/cpp_re.hpp
33 33 namespace cpplexer { 34 34 namespace re2clex { 35 35 36 struct Scanner; 37 36 38 /////////////////////////////////////////////////////////////////////////////// 37 39 // The scanner function to call whenever a new token is requested 38 40 BOOST_WAVE_DECL boost::wave::token_id scan(Scanner *s); -
wave/cpplexer/cpp_lex_interface_generator.hpp
17 17 #include <boost/wave/util/file_position.hpp> 18 18 #include <boost/wave/language_support.hpp> 19 19 #include <boost/wave/cpplexer/cpp_lex_interface.hpp> 20 #include <boost/wave/cpplexer/cpp_lex_token.hpp> // lex_token 20 21 21 22 // this must occur after all of the includes and before any code appears 22 23 #ifdef BOOST_HAS_ABI_HEADERS -
wave/whitespace_handling.hpp
104 104 bool &skipped_newline) 105 105 { 106 106 // re-initialize the preserve comments state 107 // FIXME: Where is need_preserve_comments defined? 107 108 preserve_comments = boost::wave::need_preserve_comments(ctx.get_language()); 108 109 return (this->*state)(token, skipped_newline); 109 110 } -
wave/grammars/cpp_expression_value.hpp
16 16 #endif // defined(BOOST_SPIRIT_DEBUG) 17 17 18 18 #include <boost/wave/wave_config.hpp> 19 #include <boost/wave/grammars/cpp_value_error.hpp> // value_error 19 20 20 21 // this must occur after all of the includes and before any code appears 21 22 #ifdef BOOST_HAS_ABI_HEADERS … … 185 186 case is_bool: 186 187 { 187 188 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)) 190 192 { 191 193 valid = error_integer_overflow; 192 194 } … … 199 201 case is_int: 200 202 { 201 203 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)) 204 206 { 205 207 valid = error_integer_overflow; 206 208 } … … 252 254 case is_bool: 253 255 { 254 256 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)) 257 259 { 258 260 valid = error_integer_overflow; 259 261 } … … 266 268 case is_int: 267 269 { 268 270 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)) 271 273 { 272 274 valid = error_integer_overflow; 273 275 } … … 310 312 case is_int: 311 313 { 312 314 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)) 315 317 { 316 318 valid = error_integer_overflow; 317 319 } -
wave/cpp_iteration_context.hpp
22 22 #include <boost/wave/cpp_exceptions.hpp> 23 23 #include <boost/wave/language_support.hpp> 24 24 #include <boost/wave/util/file_position.hpp> 25 #include <boost/spirit/iterator/multi_pass.hpp> // make_multi_pass 25 26 26 27 // this must occur after all of the includes and before any code appears 27 28 #ifdef BOOST_HAS_ABI_HEADERS -
wave/util/cpp_iterator.hpp
476 476 477 477 // if comments shouldn't be preserved replace them with newlines 478 478 id = token_id(act_token); 479 // FIXME: Where is need_preserve_comments defined? 479 480 if (!need_preserve_comments(ctx.get_language()) && 480 481 (T_CPPCOMMENT == id || context_policies::util::ccomment_has_newline(act_token))) 481 482 { -
wave/util/time_conversion_helper.hpp
31 31 #endif // SPIRIT_VERSION >= 0x1700 32 32 #endif // !defined(spirit_append_actor) 33 33 34 #include <string.h> // memset 35 34 36 // this must occur after all of the includes and before any code appears 35 37 #ifdef BOOST_HAS_ABI_HEADERS 36 38 #include BOOST_ABI_PREFIX -
wave/util/symbol_table.hpp
20 20 #endif 21 21 22 22 #include <boost/iterator/transform_iterator.hpp> 23 #include <boost/shared_ptr.hpp> 23 24 24 25 // this must occur after all of the includes and before any code appears 25 26 #ifdef BOOST_HAS_ABI_HEADERS -
wave/util/insert_whitespace_detection.hpp
84 84 } 85 85 // T_INTLIT 86 86 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*/) 88 88 { 89 89 using namespace boost::wave; 90 90 switch (static_cast<unsigned int>(prev)) { … … 101 101 // T_FLOATLIT 102 102 inline bool 103 103 handle_floatlit(boost::wave::token_id prev, 104 boost::wave::token_id before)104 boost::wave::token_id /*before*/) 105 105 { 106 106 using namespace boost::wave; 107 107 switch (static_cast<unsigned int>(prev)) { … … 118 118 // <% T_LEFTBRACE 119 119 inline bool 120 120 handle_alt_leftbrace(boost::wave::token_id prev, 121 boost::wave::token_id before)121 boost::wave::token_id /*before*/) 122 122 { 123 123 using namespace boost::wave; 124 124 switch (static_cast<unsigned int>(prev)) { … … 131 131 // <: T_LEFTBRACKET 132 132 inline bool 133 133 handle_alt_leftbracket(boost::wave::token_id prev, 134 boost::wave::token_id before)134 boost::wave::token_id /*before*/) 135 135 { 136 136 using namespace boost::wave; 137 137 switch (static_cast<unsigned int>(prev)) { … … 144 144 // T_FIXEDPOINTLIT 145 145 inline bool 146 146 handle_fixedpointlit(boost::wave::token_id prev, 147 boost::wave::token_id before)147 boost::wave::token_id /*before*/) 148 148 { 149 149 using namespace boost::wave; 150 150 switch (static_cast<unsigned int>(prev)) { … … 174 174 // T_QUESTION_MARK 175 175 inline bool 176 176 handle_questionmark(boost::wave::token_id prev, 177 boost::wave::token_id before)177 boost::wave::token_id /*before*/) 178 178 { 179 179 using namespace boost::wave; 180 180 switch(static_cast<unsigned int>(prev)) { -
wave/util/cpp_macromap_utils.hpp
17 17 18 18 #include <boost/wave/wave_config.hpp> 19 19 #include <boost/wave/token_ids.hpp> 20 #include <boost/wave/util/unput_queue_iterator.hpp> 20 21 21 22 // this must occur after all of the includes and before any code appears 22 23 #ifdef BOOST_HAS_ABI_HEADERS … … 420 421 inline bool 421 422 is_whitespace_only (ContainerT const &argument) 422 423 { 423 using namespace cpplexer;424 425 424 typename ContainerT::const_iterator end = argument.end(); 426 425 for (typename ContainerT::const_iterator it = argument.begin(); 427 426 it != end; ++it) -
wave/util/cpp_macromap_predef.hpp
18 18 19 19 #include <boost/wave/wave_config.hpp> 20 20 #include <boost/wave/wave_config_constant.hpp> 21 #include <boost/wave/util/time_conversion_helper.hpp> // time_conversion_helper 21 22 #include <boost/wave/token_ids.hpp> 22 23 23 24 // this must occur after all of the includes and before any code appears -
wave/util/unput_queue_iterator.hpp
18 18 #include <boost/iterator_adaptors.hpp> 19 19 20 20 #include <boost/wave/wave_config.hpp> 21 #include <boost/wave/token_ids.hpp> // token_id 21 22 22 23 // this must occur after all of the includes and before any code appears 23 24 #ifdef BOOST_HAS_ABI_HEADERS … … 416 417 inline boost::wave::token_id 417 418 skip_whitespace(IteratorT &first, IteratorT const &last) 418 419 { 419 using namespace cpplexer;420 421 420 token_id id = next_token<IteratorT>::peek(first, last, false); 422 421 423 422 if (IS_CATEGORY(id, WhiteSpaceTokenType)) { … … 434 433 inline boost::wave::token_id 435 434 skip_whitespace(IteratorT &first, IteratorT const &last, ContainerT &queue) 436 435 { 437 using namespace cpplexer;438 436 queue.push_back (*first); // queue up the current token 439 437 440 438 token_id id = next_token<IteratorT>::peek(first, last, false); -
wave/wave_config.hpp
404 404 #define PHOENIX_LIMIT 6 405 405 #endif 406 406 #if PHOENIX_LIMIT < 6 407 // boost/spirit/attribute.hpp sets PHOENIX_LIMIT to 3!!!!? 407 408 #error "Boost.Wave: the constant PHOENIX_LIMIT must be at least defined to 4" \ 408 409 " to compile the library." 409 410 #endif