mirror of
https://github.com/boostorg/wave.git
synced 2026-01-19 04:42:16 +00:00
Merge with the offending files removed.
[SVN r39995]
This commit is contained in:
@@ -144,11 +144,13 @@ CHANGELOG
|
||||
hooks consistent. Now return 'false' generally means: normal execution and
|
||||
return 'true' generally means: skip execution of the corresponding
|
||||
preprocessor action.
|
||||
- Fixed compilation problems on gcc, fixed ambiguity in with boost code
|
||||
(detail namespace was ambigious).
|
||||
- Fixed compilation problems on gcc, fixed ambiguity with boost code (detail
|
||||
namespace was ambigious).
|
||||
- Fixed predefined macro support to be thread safe.
|
||||
- Added missing file to real_positions example. Thanks to Ludovic Aubert for
|
||||
spotting the problem.
|
||||
- Unterminated C++/C comment diagnostics are now a warning and not an error
|
||||
anymore.
|
||||
|
||||
Boost V1.34.0
|
||||
- Wave Version 1.2.4
|
||||
|
||||
@@ -33,6 +33,7 @@ lib boost_wave
|
||||
$(SOURCES)
|
||||
../../filesystem/build//boost_filesystem
|
||||
../../thread/build//boost_thread
|
||||
../../date_time/build//boost_date_time
|
||||
;
|
||||
|
||||
for local source in $(SOURCES)
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
string_type const &get_value() const { return data->get_value(); }
|
||||
position_type const &get_position() const { return data->get_position(); }
|
||||
bool is_eoi() const { return token_id(*data) == T_EOI; }
|
||||
|
||||
|
||||
void set_token_id (token_id id_) { make_unique(); data->set_token_id(id_); }
|
||||
void set_value (string_type const &value_) { make_unique(); data->set_value(value_); }
|
||||
void set_position (position_type const &pos_) { make_unique(); data->set_position(pos_); }
|
||||
|
||||
@@ -60,6 +60,41 @@
|
||||
#endif // BOOST_NO_STRINGSTREAM
|
||||
#endif // BOOST_WAVE_LEXER_THROW
|
||||
|
||||
#if !defined(BOOST_WAVE_LEXER_THROW_VAR)
|
||||
#ifdef BOOST_NO_STRINGSTREAM
|
||||
#include <strstream>
|
||||
#define BOOST_WAVE_LEXER_THROW_VAR(cls, codearg, msg, line, column, name) \
|
||||
{ \
|
||||
using namespace boost::wave; \
|
||||
cls::error_code code = static_cast<cls::error_code>(codearg); \
|
||||
std::strstream stream; \
|
||||
stream << cls::severity_text(code) << ": " \
|
||||
<< cls::error_text(code); \
|
||||
if ((msg)[0] != 0) stream << ": " << (msg); \
|
||||
stream << std::ends; \
|
||||
std::string throwmsg = stream.str(); stream.freeze(false); \
|
||||
boost::throw_exception(cls(throwmsg.c_str(), code, line, column, \
|
||||
name)); \
|
||||
} \
|
||||
/**/
|
||||
#else
|
||||
#include <sstream>
|
||||
#define BOOST_WAVE_LEXER_THROW_VAR(cls, codearg, msg, line, column, name) \
|
||||
{ \
|
||||
using namespace boost::wave; \
|
||||
cls::error_code code = static_cast<cls::error_code>(codearg); \
|
||||
std::stringstream stream; \
|
||||
stream << cls::severity_text(code) << ": " \
|
||||
<< cls::error_text(code); \
|
||||
if ((msg)[0] != 0) stream << ": " << (msg); \
|
||||
stream << std::ends; \
|
||||
boost::throw_exception(cls(stream.str().c_str(), code, line, column, \
|
||||
name)); \
|
||||
} \
|
||||
/**/
|
||||
#endif // BOOST_NO_STRINGSTREAM
|
||||
#endif // BOOST_WAVE_LEXER_THROW
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost {
|
||||
namespace wave {
|
||||
@@ -135,7 +170,8 @@ public:
|
||||
universal_char_base_charset = 2,
|
||||
universal_char_not_allowed = 3,
|
||||
invalid_long_long_literal = 4,
|
||||
generic_lexing_error = 5
|
||||
generic_lexing_error = 5,
|
||||
generic_lexing_warning = 6
|
||||
};
|
||||
|
||||
lexing_exception(char const *what_, error_code code, int line_,
|
||||
@@ -173,6 +209,8 @@ public:
|
||||
case lexing_exception::universal_char_base_charset:
|
||||
case lexing_exception::universal_char_not_allowed:
|
||||
case lexing_exception::invalid_long_long_literal:
|
||||
case lexing_exception::generic_lexing_warning:
|
||||
case lexing_exception::generic_lexing_error:
|
||||
return true; // for now allow all exceptions to be recoverable
|
||||
|
||||
case lexing_exception::unexpected_error:
|
||||
@@ -194,7 +232,8 @@ public:
|
||||
"this universal character is not allowed in an identifier", // universal_char_not_allowed
|
||||
"long long suffixes are not allowed in pure C++ mode, "
|
||||
"enable long_long mode to allow these", // invalid_long_long_literal
|
||||
"generic lexing error" // generic_lexing_error
|
||||
"generic lexer error", // generic_lexing_error
|
||||
"generic lexer warning" // generic_lexing_warning
|
||||
};
|
||||
return preprocess_exception_errors[code];
|
||||
}
|
||||
@@ -207,7 +246,8 @@ public:
|
||||
util::severity_error, // universal_char_base_charset
|
||||
util::severity_error, // universal_char_not_allowed
|
||||
util::severity_warning, // invalid_long_long_literal
|
||||
util::severity_error // generic_lexing_error
|
||||
util::severity_error, // generic_lexing_error
|
||||
util::severity_warning // invalid_long_long_literal
|
||||
};
|
||||
return preprocess_exception_severity[code];
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
typedef typename token_type::string_type string_type;
|
||||
|
||||
lexer(IteratorT const &first, IteratorT const &last,
|
||||
PositionT const &pos, boost::wave::language_support language);
|
||||
PositionT const &pos, boost::wave::language_support language_);
|
||||
~lexer();
|
||||
|
||||
lex_token<PositionT> get();
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
#endif
|
||||
|
||||
// error reporting from the re2c generated lexer
|
||||
static int report_error(Scanner const* s, char const *, ...);
|
||||
static int report_error(Scanner const* s, int code, char const *, ...);
|
||||
|
||||
private:
|
||||
static char const *tok_names[];
|
||||
@@ -110,8 +110,8 @@ template <typename IteratorT, typename PositionT>
|
||||
inline
|
||||
lexer<IteratorT, PositionT>::lexer(IteratorT const &first,
|
||||
IteratorT const &last, PositionT const &pos,
|
||||
boost::wave::language_support language)
|
||||
: filename(pos.get_file()), at_eof(false), language(language)
|
||||
boost::wave::language_support language_)
|
||||
: filename(pos.get_file()), at_eof(false), language(language_)
|
||||
{
|
||||
using namespace std; // some systems have memset in std
|
||||
memset(&scanner, '\0', sizeof(Scanner));
|
||||
@@ -132,17 +132,17 @@ lexer<IteratorT, PositionT>::lexer(IteratorT const &first,
|
||||
#endif
|
||||
|
||||
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
|
||||
scanner.act_in_c99_mode = boost::wave::need_c99(language);
|
||||
scanner.act_in_c99_mode = boost::wave::need_c99(language_);
|
||||
#endif
|
||||
|
||||
#if BOOST_WAVE_SUPPORT_IMPORT_KEYWORD != 0
|
||||
scanner.enable_import_keyword = !boost::wave::need_c99(language);
|
||||
scanner.enable_import_keyword = !boost::wave::need_c99(language_);
|
||||
#else
|
||||
scanner.enable_import_keyword = false;
|
||||
#endif
|
||||
|
||||
scanner.detect_pp_numbers = boost::wave::need_prefer_pp_numbers(language);
|
||||
scanner.single_line_only = boost::wave::need_single_line(language);
|
||||
scanner.detect_pp_numbers = boost::wave::need_prefer_pp_numbers(language_);
|
||||
scanner.single_line_only = boost::wave::need_single_line(language_);
|
||||
}
|
||||
|
||||
template <typename IteratorT, typename PositionT>
|
||||
@@ -291,7 +291,8 @@ lexer<IteratorT, PositionT>::get()
|
||||
|
||||
template <typename IteratorT, typename PositionT>
|
||||
inline int
|
||||
lexer<IteratorT, PositionT>::report_error(Scanner const *s, char const *msg, ...)
|
||||
lexer<IteratorT, PositionT>::report_error(Scanner const *s, int errcode,
|
||||
char const *msg, ...)
|
||||
{
|
||||
BOOST_ASSERT(0 != s);
|
||||
BOOST_ASSERT(0 != msg);
|
||||
@@ -304,8 +305,8 @@ lexer<IteratorT, PositionT>::report_error(Scanner const *s, char const *msg, ...
|
||||
vsprintf(buffer, msg, params);
|
||||
va_end(params);
|
||||
|
||||
BOOST_WAVE_LEXER_THROW(lexing_exception, generic_lexing_error, buffer,
|
||||
s->line, s->column, s->file_name);
|
||||
BOOST_WAVE_LEXER_THROW_VAR(lexing_exception, errcode, buffer, s->line,
|
||||
s->column, s->file_name);
|
||||
// BOOST_UNREACHABLE_RETURN(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ namespace re2clex {
|
||||
|
||||
struct Scanner;
|
||||
typedef unsigned char uchar;
|
||||
typedef int (* ReportErrorProc)(struct Scanner const *, char const *, ...);
|
||||
typedef int (* ReportErrorProc)(struct Scanner const *, int errorcode,
|
||||
char const *, ...);
|
||||
|
||||
typedef struct Scanner {
|
||||
uchar* first; /* start of input buffer */
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
void reset_macromap();
|
||||
|
||||
position_type &get_main_pos() { return main_pos; }
|
||||
|
||||
|
||||
// interface for macro name introspection
|
||||
typedef typename defined_macros_type::name_iterator name_iterator;
|
||||
typedef typename defined_macros_type::const_name_iterator const_name_iterator;
|
||||
@@ -1238,8 +1238,8 @@ ContainerT replacement_list;
|
||||
macro_def.macrodefinition, curr_token, arguments);
|
||||
#else
|
||||
if (ctx.get_hooks().expanding_function_like_macro(
|
||||
ctx, macro_def.macroname, macro_def.macroparameters,
|
||||
macro_def.macrodefinition, curr_token, arguments,
|
||||
ctx, macro_def.macroname, macro_def.macroparameters,
|
||||
macro_def.macrodefinition, curr_token, arguments,
|
||||
seqstart, first))
|
||||
{
|
||||
// do not expand this macro, just copy the whole sequence
|
||||
|
||||
@@ -44,22 +44,22 @@ namespace util {
|
||||
class predefined_macros
|
||||
{
|
||||
typedef BOOST_WAVE_STRINGTYPE string_type;
|
||||
|
||||
|
||||
public:
|
||||
// list of static predefined macros
|
||||
struct static_macros {
|
||||
char const *name;
|
||||
boost::wave::token_id token_id;
|
||||
char const *value;
|
||||
};
|
||||
struct static_macros {
|
||||
char const *name;
|
||||
boost::wave::token_id token_id;
|
||||
char const *value;
|
||||
};
|
||||
|
||||
// list of dynamic predefined macros
|
||||
struct dynamic_macros {
|
||||
char const *name;
|
||||
boost::wave::token_id token_id;
|
||||
string_type (predefined_macros:: *generator)() const;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
private:
|
||||
boost::wave::util::time_conversion_helper compilation_time_;
|
||||
string_type datestr_; // __DATE__
|
||||
@@ -69,12 +69,12 @@ namespace util {
|
||||
|
||||
protected:
|
||||
void reset_datestr()
|
||||
{
|
||||
static const char *const monthnames[] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
|
||||
{
|
||||
static const char *const monthnames[] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
|
||||
// for some systems sprintf, time_t etc. is in namespace std
|
||||
using namespace std;
|
||||
|
||||
@@ -91,11 +91,11 @@ namespace util {
|
||||
}
|
||||
else {
|
||||
datestr_ = "\"??? ?? ????\"";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void reset_timestr()
|
||||
{
|
||||
{
|
||||
// for some systems sprintf, time_t etc. is in namespace std
|
||||
using namespace std;
|
||||
|
||||
@@ -112,57 +112,57 @@ namespace util {
|
||||
}
|
||||
else {
|
||||
timestr_ = "\"??:??:??\"";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void reset_version()
|
||||
{
|
||||
char buffer[sizeof("0x00000000")+1];
|
||||
{
|
||||
char buffer[sizeof("0x00000000")+1];
|
||||
|
||||
// for some systems sprintf, time_t etc. is in namespace std
|
||||
using namespace std;
|
||||
|
||||
// for some systems sprintf, time_t etc. is in namespace std
|
||||
using namespace std;
|
||||
// calculate the number of days since Dec 13 2001
|
||||
// (the day the Wave project was started)
|
||||
tm first_day;
|
||||
|
||||
// calculate the number of days since Dec 13 2001
|
||||
// (the day the Wave project was started)
|
||||
tm first_day;
|
||||
|
||||
using namespace std; // for some systems memset is in namespace std
|
||||
memset (&first_day, 0, sizeof(tm));
|
||||
first_day.tm_mon = 11; // Dec
|
||||
first_day.tm_mday = 13; // 13
|
||||
first_day.tm_year = 101; // 2001
|
||||
using namespace std; // for some systems memset is in namespace std
|
||||
memset (&first_day, 0, sizeof(tm));
|
||||
first_day.tm_mon = 11; // Dec
|
||||
first_day.tm_mday = 13; // 13
|
||||
first_day.tm_year = 101; // 2001
|
||||
|
||||
long seconds = long(difftime(compilation_time_.get_time(), mktime(&first_day)));
|
||||
|
||||
sprintf(buffer, "0x%02d%1d%1d%04ld", BOOST_WAVE_VERSION_MAJOR,
|
||||
BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR,
|
||||
seconds/(3600*24));
|
||||
sprintf(buffer, "0x%02d%1d%1d%04ld", BOOST_WAVE_VERSION_MAJOR,
|
||||
BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR,
|
||||
seconds/(3600*24));
|
||||
version_ = buffer;
|
||||
}
|
||||
}
|
||||
|
||||
void reset_versionstr()
|
||||
{
|
||||
char buffer[sizeof("\"00.00.00.0000 \"")+sizeof(BOOST_PLATFORM)+sizeof(BOOST_COMPILER)+4];
|
||||
{
|
||||
char buffer[sizeof("\"00.00.00.0000 \"")+sizeof(BOOST_PLATFORM)+sizeof(BOOST_COMPILER)+4];
|
||||
|
||||
// for some systems sprintf, time_t etc. is in namespace std
|
||||
using namespace std;
|
||||
// for some systems sprintf, time_t etc. is in namespace std
|
||||
using namespace std;
|
||||
|
||||
// calculate the number of days since Dec 13 2001
|
||||
// (the day the Wave project was started)
|
||||
tm first_day;
|
||||
// calculate the number of days since Dec 13 2001
|
||||
// (the day the Wave project was started)
|
||||
tm first_day;
|
||||
|
||||
memset (&first_day, 0, sizeof(tm));
|
||||
first_day.tm_mon = 11; // Dec
|
||||
first_day.tm_mday = 13; // 13
|
||||
first_day.tm_year = 101; // 2001
|
||||
memset (&first_day, 0, sizeof(tm));
|
||||
first_day.tm_mon = 11; // Dec
|
||||
first_day.tm_mday = 13; // 13
|
||||
first_day.tm_year = 101; // 2001
|
||||
|
||||
long seconds = long(difftime(compilation_time_.get_time(), mktime(&first_day)));
|
||||
|
||||
sprintf(buffer, "\"%d.%d.%d.%ld [%s/%s]\"", BOOST_WAVE_VERSION_MAJOR,
|
||||
BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR,
|
||||
seconds/(3600*24), BOOST_PLATFORM, BOOST_COMPILER);
|
||||
sprintf(buffer, "\"%d.%d.%d.%ld [%s/%s]\"", BOOST_WAVE_VERSION_MAJOR,
|
||||
BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR,
|
||||
seconds/(3600*24), BOOST_PLATFORM, BOOST_COMPILER);
|
||||
versionstr_ = buffer;
|
||||
}
|
||||
}
|
||||
|
||||
// dynamic predefined macros
|
||||
string_type get_date() const { return datestr_; } // __DATE__
|
||||
@@ -170,7 +170,7 @@ namespace util {
|
||||
|
||||
// __SPIRIT_PP__/__WAVE__
|
||||
string_type get_version() const
|
||||
{
|
||||
{
|
||||
char buffer[sizeof("0x0000")+1];
|
||||
|
||||
using namespace std; // for some systems sprintf is in namespace std
|
||||
@@ -178,11 +178,11 @@ namespace util {
|
||||
BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
// __WAVE_CONFIG__
|
||||
string_type get_config() const
|
||||
{
|
||||
char buffer[sizeof("0x00000000")+1];
|
||||
char buffer[sizeof("0x00000000")+1];
|
||||
|
||||
using namespace std; // for some systems sprintf is in namespace std
|
||||
sprintf(buffer, "0x%08x", BOOST_WAVE_CONFIG);
|
||||
@@ -209,7 +209,7 @@ namespace util {
|
||||
|
||||
// __SPIRIT_PP_VERSION_STR__/__WAVE_VERSION_STR__
|
||||
string_type get_versionstr() const { return versionstr_; }
|
||||
|
||||
|
||||
// C++ mode
|
||||
static_macros const& static_data_cpp(std::size_t i) const
|
||||
{
|
||||
@@ -221,10 +221,7 @@ namespace util {
|
||||
BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
|
||||
return data[i];
|
||||
}
|
||||
std::size_t static_data_cpp_size() const
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
|
||||
// C99 mode
|
||||
static_macros const& static_data_c99(std::size_t i) const
|
||||
@@ -235,18 +232,15 @@ namespace util {
|
||||
{ "__STDC_HOSTED__", T_INTLIT, "0" },
|
||||
{ "__WAVE_HAS_VARIADICS__", T_INTLIT, "1" },
|
||||
{ 0, T_EOF, 0 }
|
||||
};
|
||||
};
|
||||
BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
|
||||
return data[i];
|
||||
}
|
||||
std::size_t static_data_c99_size() const
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
dynamic_macros const& dynamic_data(std::size_t i) const
|
||||
{
|
||||
static dynamic_macros data[] = {
|
||||
{
|
||||
static dynamic_macros data[] = {
|
||||
{ "__DATE__", T_STRINGLIT, &predefined_macros::get_date },
|
||||
{ "__TIME__", T_STRINGLIT, &predefined_macros::get_time },
|
||||
{ "__SPIRIT_PP__", T_INTLIT, &predefined_macros::get_version },
|
||||
@@ -256,13 +250,10 @@ namespace util {
|
||||
{ "__WAVE_VERSION__", T_INTLIT, &predefined_macros::get_fullversion },
|
||||
{ "__WAVE_VERSION_STR__", T_STRINGLIT, &predefined_macros::get_versionstr },
|
||||
{ "__WAVE_CONFIG__", T_INTLIT, &predefined_macros::get_config },
|
||||
{ 0, T_EOF, 0 }
|
||||
};
|
||||
BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
|
||||
return data[i];
|
||||
}
|
||||
std::size_t dynamic_data_size() const
|
||||
{
|
||||
{ 0, T_EOF, 0 }
|
||||
};
|
||||
BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
|
||||
return data[i];
|
||||
}
|
||||
|
||||
}; // predefined_macros
|
||||
|
||||
@@ -98,6 +98,7 @@ class StoragePolicy
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <iosfwd>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
@@ -1405,7 +1406,7 @@ template <typename E,
|
||||
class Storage = AllocatorStringStorage<E, A> >
|
||||
class flex_string : private Storage
|
||||
{
|
||||
#if defined(THROW_ON_ENFORCE)
|
||||
#if defined(BOOST_WAVE_FLEXSTRING_THROW_ON_ENFORCE)
|
||||
template <typename Exception>
|
||||
static void Enforce(bool condition, Exception*, const char* msg)
|
||||
{ if (!condition) boost::throw_exception(Exception(msg)); }
|
||||
@@ -1413,8 +1414,9 @@ class flex_string : private Storage
|
||||
template <typename Exception>
|
||||
static inline void Enforce(bool condition, Exception*, const char* msg)
|
||||
{ BOOST_ASSERT(condition && msg); }
|
||||
#endif // defined(THROW_ON_ENFORCE)
|
||||
#endif // defined(BOOST_WAVE_FLEXSTRING_THROW_ON_ENFORCE)
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool Sane() const
|
||||
{
|
||||
return
|
||||
@@ -1428,9 +1430,9 @@ class flex_string : private Storage
|
||||
|
||||
struct Invariant;
|
||||
friend struct Invariant;
|
||||
|
||||
struct Invariant
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
Invariant(const flex_string& s) : s_(s)
|
||||
{
|
||||
BOOST_ASSERT(s_.Sane());
|
||||
@@ -1441,10 +1443,8 @@ class flex_string : private Storage
|
||||
}
|
||||
private:
|
||||
const flex_string& s_;
|
||||
#else
|
||||
Invariant(const flex_string&) {}
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
public:
|
||||
// types
|
||||
@@ -1644,7 +1644,9 @@ public:
|
||||
|
||||
flex_string& append(const value_type* s, const size_type n)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
static std::less_equal<const value_type*> le;
|
||||
if (le(&*begin(), s) && le(s, &*end())) // aliasing
|
||||
{
|
||||
@@ -1699,7 +1701,9 @@ public:
|
||||
|
||||
flex_string& assign(const value_type* s, size_type n)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
if (size() >= n)
|
||||
{
|
||||
std::copy(s, s + n, begin());
|
||||
@@ -1762,7 +1766,9 @@ private:
|
||||
flex_string& InsertImplDiscr(iterator p,
|
||||
size_type n, value_type c, Selector<1>)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
assert(p >= begin() && p <= end());
|
||||
if (capacity() - size() < n)
|
||||
{
|
||||
@@ -1798,7 +1804,9 @@ private:
|
||||
void InsertImpl(iterator i,
|
||||
FwdIterator s1, FwdIterator s2, std::forward_iterator_tag)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
const size_type pos = i - begin();
|
||||
const typename std::iterator_traits<FwdIterator>::difference_type n2 =
|
||||
std::distance(s1, s2);
|
||||
@@ -1860,7 +1868,9 @@ public:
|
||||
|
||||
flex_string& erase(size_type pos = 0, size_type n = npos)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
Enforce(pos <= length(), (std::out_of_range*)0, "");
|
||||
Procust(n, length() - pos);
|
||||
std::copy(begin() + pos + n, end(), begin() + pos);
|
||||
@@ -1909,7 +1919,9 @@ public:
|
||||
flex_string& replace(size_type pos, size_type n1,
|
||||
StrOrLength s_or_n2, NumOrChar n_or_c)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
Enforce(pos <= size(), (std::out_of_range*)0, "");
|
||||
Procust(n1, length() - pos);
|
||||
const iterator b = begin() + pos;
|
||||
@@ -1962,7 +1974,9 @@ private:
|
||||
void ReplaceImpl(iterator i1, iterator i2,
|
||||
FwdIterator s1, FwdIterator s2, std::forward_iterator_tag)
|
||||
{
|
||||
Invariant checker(*this); checker;
|
||||
#ifndef NDEBUG
|
||||
Invariant checker(*this);
|
||||
#endif
|
||||
const typename std::iterator_traits<iterator>::difference_type n1 =
|
||||
i2 - i1;
|
||||
assert(n1 >= 0);
|
||||
|
||||
@@ -11,5 +11,7 @@
|
||||
exe advanced_hooks
|
||||
: ../advanced_hooks.cpp
|
||||
/boost/wave//boost_wave
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
SOURCES =
|
||||
../cpp_tokens
|
||||
../cpp_tokens
|
||||
../instantiate_cpp_exprgrammar
|
||||
../instantiate_cpp_grammar
|
||||
../instantiate_cpp_literalgrs
|
||||
@@ -24,6 +24,8 @@ exe cpp_tokens
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
for local source in $(SOURCES)
|
||||
|
||||
@@ -151,14 +151,14 @@ private:
|
||||
#define FLOAT_SUFFIX "(" "[fF][lL]?" OR "[lL][fF]?" ")"
|
||||
#define CHAR_SPEC "L?"
|
||||
|
||||
#define BACKSLASH "(" "\\" OR TRI(Q("/")) ")"
|
||||
#define BACKSLASH "(" Q("\\") OR TRI(Q("/")) ")"
|
||||
#define ESCAPESEQ "(" BACKSLASH "(" \
|
||||
"[abfnrtv?'\"]" OR \
|
||||
BACKSLASH OR \
|
||||
"x" HEXDIGIT "+" OR \
|
||||
OCTALDIGIT OCTALDIGIT "?" OCTALDIGIT "?" \
|
||||
"))"
|
||||
#define HEXQUAD HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT
|
||||
#define HEXQUAD "(" HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT ")"
|
||||
#define UNIVERSALCHAR "(" BACKSLASH "(" \
|
||||
"u" HEXQUAD OR \
|
||||
"U" HEXQUAD HEXQUAD \
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/spirit/iterator/multi_pass.hpp>
|
||||
|
||||
#include <boost/wave/language_support.hpp>
|
||||
@@ -55,7 +56,7 @@ public:
|
||||
boost::wave::language_support language)
|
||||
: functor_ptr(slex_input_interface<TokenT>
|
||||
::new_lexer(first, last, pos, language))
|
||||
#if 0 != __DECCXX_VER
|
||||
#if 0 != __DECCXX_VER || BOOST_WORKAROUND(BOOST_INTEL_LINUX, == 910)
|
||||
, eof()
|
||||
#endif // 0 != __DECCXX_VER
|
||||
{}
|
||||
|
||||
@@ -14,5 +14,7 @@ exe hannibal
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
|
||||
@@ -13,5 +13,7 @@ exe lexed_tokens
|
||||
/boost/wave//boost_wave
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
SOURCES =
|
||||
../list_includes.cpp
|
||||
../list_includes.cpp
|
||||
../instantiate_cpp_exprgrammar
|
||||
../instantiate_cpp_grammar
|
||||
../instantiate_cpp_literalgrs
|
||||
@@ -24,6 +24,8 @@ exe list_includes
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
for local source in $(SOURCES)
|
||||
|
||||
@@ -11,5 +11,8 @@
|
||||
exe quick_start
|
||||
: ../quick_start.cpp
|
||||
/boost/wave//boost_wave
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
|
||||
@@ -20,5 +20,6 @@ exe real_positions
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
|
||||
@@ -22,12 +22,15 @@ exe token_statistics
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
for local source in $(SOURCES)
|
||||
{
|
||||
local requirements ;
|
||||
requirements += <toolset-msvc:version>7.1:<rtti>off ; # workaround for compiler bug
|
||||
requirements += <toolset-msvc:version>7.1_stlport4:<rtti>off ;
|
||||
obj $(source) : $(source).cpp : $(requirements) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,12 @@ SOURCES =
|
||||
|
||||
exe waveidl
|
||||
:
|
||||
$(SOURCES)
|
||||
$(SOURCES)
|
||||
/boost/wave//boost_wave
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
;
|
||||
|
||||
for local source in $(SOURCES)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <boost/wave/token_ids.hpp>
|
||||
#include <boost/wave/cpplexer/re2clex/aq.hpp>
|
||||
#include <boost/wave/cpplexer/re2clex/scanner.hpp>
|
||||
#include <boost/wave/cpplexer/cpplexer_exceptions.hpp>
|
||||
|
||||
#include "idl_re.hpp"
|
||||
|
||||
@@ -199,8 +200,11 @@ fill(boost::wave::cpplexer::re2clex::Scanner *s,
|
||||
if (buf == 0)
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if (0 != s->error_proc)
|
||||
(*s->error_proc)(s, "Out of memory!");
|
||||
if (0 != s->error_proc) {
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::unexpected_error,
|
||||
"Out of memory!");
|
||||
}
|
||||
else
|
||||
printf("Out of memory!\n");
|
||||
|
||||
@@ -473,8 +477,11 @@ Pound = "#" | "??=" | "%:";
|
||||
if(cursor != s->eof)
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if (0 != s->error_proc)
|
||||
(*s->error_proc)(s, "'\\000' in input stream");
|
||||
if (0 != s->error_proc) {
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"'\\000' in input stream");
|
||||
}
|
||||
else
|
||||
printf("Error: 0 in file\n");
|
||||
}
|
||||
@@ -506,14 +513,18 @@ ccomment:
|
||||
if(cursor == s->eof)
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "Unterminated comment");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_warning,
|
||||
"Unterminated comment");
|
||||
else
|
||||
printf("Error: Unterminated comment\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "'\\000' in input stream");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"'\\000' in input stream");
|
||||
else
|
||||
printf("Error: 0 in file");
|
||||
}
|
||||
@@ -526,7 +537,9 @@ ccomment:
|
||||
anyctrl
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "invalid character in input stream");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"invalid character in input stream");
|
||||
else
|
||||
printf("Error: 0 in file");
|
||||
}
|
||||
@@ -551,7 +564,9 @@ cppcomment:
|
||||
if(cursor != s->eof)
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "'\\000' in input stream");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"'\\000' in input stream");
|
||||
else
|
||||
printf("Error: 0 in file");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Generated by re2c 0.12.1 on Tue Jun 26 14:37:16 2007 */
|
||||
#line 1 "idl.re"
|
||||
/* Generated by re2c 0.12.1 on Tue Oct 02 12:07:30 2007 */
|
||||
#line 1 "..\\..\\idllexer\\idl.re"
|
||||
/*=============================================================================
|
||||
Boost.Wave: A Standard compliant C++ preprocessor library
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <boost/wave/token_ids.hpp>
|
||||
#include <boost/wave/cpplexer/re2clex/aq.hpp>
|
||||
#include <boost/wave/cpplexer/re2clex/scanner.hpp>
|
||||
#include <boost/wave/cpplexer/cpplexer_exceptions.hpp>
|
||||
|
||||
#include "idl_re.hpp"
|
||||
|
||||
@@ -201,8 +202,11 @@ fill(boost::wave::cpplexer::re2clex::Scanner *s,
|
||||
if (buf == 0)
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if (0 != s->error_proc)
|
||||
(*s->error_proc)(s, "Out of memory!");
|
||||
if (0 != s->error_proc) {
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::unexpected_error,
|
||||
"Out of memory!");
|
||||
}
|
||||
else
|
||||
printf("Out of memory!\n");
|
||||
|
||||
@@ -354,7 +358,7 @@ scan(boost::wave::cpplexer::re2clex::Scanner *s)
|
||||
|
||||
uchar *cursor = s->tok = s->cur;
|
||||
|
||||
#line 374 "idl.re"
|
||||
#line 378 "..\\..\\idllexer\\idl.re"
|
||||
|
||||
|
||||
{
|
||||
@@ -427,7 +431,7 @@ scan(boost::wave::cpplexer::re2clex::Scanner *s)
|
||||
68, 68, 68, 68, 68, 68, 68, 68,
|
||||
};
|
||||
|
||||
#line 431 "idl_re.cpp"
|
||||
#line 435 "..\\..\\idllexer\\idl_re.cpp"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
@@ -539,18 +543,18 @@ yy2:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '*') goto yy356;
|
||||
if(yych == '/') goto yy354;
|
||||
#line 398 "idl.re"
|
||||
#line 402 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_DIVIDE); }
|
||||
#line 545 "idl_re.cpp"
|
||||
#line 549 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy4:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if(yych == 'R') goto yy350;
|
||||
goto yy202;
|
||||
yy5:
|
||||
#line 421 "idl.re"
|
||||
#line 425 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_IDENTIFIER); }
|
||||
#line 554 "idl_re.cpp"
|
||||
#line 558 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy6:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -558,24 +562,24 @@ yy6:
|
||||
goto yy202;
|
||||
yy7:
|
||||
++YYCURSOR;
|
||||
#line 383 "idl.re"
|
||||
#line 387 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_LEFTBRACE); }
|
||||
#line 564 "idl_re.cpp"
|
||||
#line 568 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy9:
|
||||
++YYCURSOR;
|
||||
#line 384 "idl.re"
|
||||
#line 388 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_RIGHTBRACE); }
|
||||
#line 569 "idl_re.cpp"
|
||||
#line 573 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy11:
|
||||
++YYCURSOR;
|
||||
#line 385 "idl.re"
|
||||
#line 389 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_LEFTBRACKET); }
|
||||
#line 574 "idl_re.cpp"
|
||||
#line 578 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy13:
|
||||
++YYCURSOR;
|
||||
#line 386 "idl.re"
|
||||
#line 390 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_RIGHTBRACKET); }
|
||||
#line 579 "idl_re.cpp"
|
||||
#line 583 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy15:
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -611,127 +615,127 @@ yy15:
|
||||
}
|
||||
}
|
||||
yy16:
|
||||
#line 387 "idl.re"
|
||||
#line 391 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_POUND); }
|
||||
#line 617 "idl_re.cpp"
|
||||
#line 621 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy17:
|
||||
++YYCURSOR;
|
||||
#line 389 "idl.re"
|
||||
#line 393 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_LEFTPAREN); }
|
||||
#line 622 "idl_re.cpp"
|
||||
#line 626 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy19:
|
||||
++YYCURSOR;
|
||||
#line 390 "idl.re"
|
||||
#line 394 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_RIGHTPAREN); }
|
||||
#line 627 "idl_re.cpp"
|
||||
#line 631 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy21:
|
||||
++YYCURSOR;
|
||||
#line 391 "idl.re"
|
||||
#line 395 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_SEMICOLON); }
|
||||
#line 632 "idl_re.cpp"
|
||||
#line 636 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy23:
|
||||
++YYCURSOR;
|
||||
#line 392 "idl.re"
|
||||
#line 396 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_COLON); }
|
||||
#line 637 "idl_re.cpp"
|
||||
#line 641 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy25:
|
||||
yyaccept = 2;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if(yych == '?') goto yy341;
|
||||
yy26:
|
||||
#line 393 "idl.re"
|
||||
#line 397 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_QUESTION_MARK); }
|
||||
#line 645 "idl_re.cpp"
|
||||
#line 649 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy27:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) <= '/') goto yy28;
|
||||
if(yych <= '9') goto yy168;
|
||||
yy28:
|
||||
#line 394 "idl.re"
|
||||
#line 398 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_DOT); }
|
||||
#line 653 "idl_re.cpp"
|
||||
#line 657 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy29:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '+') goto yy339;
|
||||
#line 395 "idl.re"
|
||||
#line 399 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PLUS); }
|
||||
#line 659 "idl_re.cpp"
|
||||
#line 663 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy31:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '-') goto yy337;
|
||||
#line 396 "idl.re"
|
||||
#line 400 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_MINUS); }
|
||||
#line 665 "idl_re.cpp"
|
||||
#line 669 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy33:
|
||||
++YYCURSOR;
|
||||
#line 397 "idl.re"
|
||||
#line 401 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_STAR); }
|
||||
#line 670 "idl_re.cpp"
|
||||
#line 674 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy35:
|
||||
yyaccept = 3;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if(yych == ':') goto yy238;
|
||||
yy36:
|
||||
#line 399 "idl.re"
|
||||
#line 403 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PERCENT); }
|
||||
#line 678 "idl_re.cpp"
|
||||
#line 682 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy37:
|
||||
++YYCURSOR;
|
||||
#line 400 "idl.re"
|
||||
#line 404 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_XOR); }
|
||||
#line 683 "idl_re.cpp"
|
||||
#line 687 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy39:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '&') goto yy236;
|
||||
#line 401 "idl.re"
|
||||
#line 405 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_AND); }
|
||||
#line 689 "idl_re.cpp"
|
||||
#line 693 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy41:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '|') goto yy234;
|
||||
#line 402 "idl.re"
|
||||
#line 406 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_OR); }
|
||||
#line 695 "idl_re.cpp"
|
||||
#line 699 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy43:
|
||||
++YYCURSOR;
|
||||
#line 403 "idl.re"
|
||||
#line 407 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_COMPL); }
|
||||
#line 700 "idl_re.cpp"
|
||||
#line 704 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy45:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '=') goto yy232;
|
||||
#line 404 "idl.re"
|
||||
#line 408 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_NOT); }
|
||||
#line 706 "idl_re.cpp"
|
||||
#line 710 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy47:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '=') goto yy230;
|
||||
#line 405 "idl.re"
|
||||
#line 409 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_ASSIGN); }
|
||||
#line 712 "idl_re.cpp"
|
||||
#line 716 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy49:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) <= ';') goto yy50;
|
||||
if(yych <= '<') goto yy228;
|
||||
if(yych <= '=') goto yy226;
|
||||
yy50:
|
||||
#line 406 "idl.re"
|
||||
#line 410 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_LESS); }
|
||||
#line 721 "idl_re.cpp"
|
||||
#line 725 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy51:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) <= '<') goto yy52;
|
||||
if(yych <= '=') goto yy222;
|
||||
if(yych <= '>') goto yy224;
|
||||
yy52:
|
||||
#line 407 "idl.re"
|
||||
#line 411 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_GREATER); }
|
||||
#line 730 "idl_re.cpp"
|
||||
#line 734 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy53:
|
||||
++YYCURSOR;
|
||||
#line 418 "idl.re"
|
||||
#line 422 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_COMMA); }
|
||||
#line 735 "idl_re.cpp"
|
||||
#line 739 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy55:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -761,11 +765,11 @@ yy57:
|
||||
if(yych == 'U') goto yy193;
|
||||
if(yych == 'u') goto yy192;
|
||||
yy58:
|
||||
#line 485 "idl.re"
|
||||
#line 492 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType));
|
||||
}
|
||||
#line 769 "idl_re.cpp"
|
||||
#line 773 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy59:
|
||||
yyaccept = 5;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -807,9 +811,9 @@ yy59:
|
||||
}
|
||||
}
|
||||
yy60:
|
||||
#line 424 "idl.re"
|
||||
#line 428 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_INTLIT); }
|
||||
#line 813 "idl_re.cpp"
|
||||
#line 817 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy61:
|
||||
yyaccept = 5;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -870,37 +874,40 @@ yy64:
|
||||
yych = *YYCURSOR;
|
||||
goto yy74;
|
||||
yy65:
|
||||
#line 463 "idl.re"
|
||||
#line 467 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_SPACE); }
|
||||
#line 876 "idl_re.cpp"
|
||||
#line 880 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy66:
|
||||
++YYCURSOR;
|
||||
yy67:
|
||||
#line 466 "idl.re"
|
||||
#line 470 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
s->line++;
|
||||
BOOST_WAVE_RET(T_NEWLINE);
|
||||
}
|
||||
#line 885 "idl_re.cpp"
|
||||
#line 889 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy68:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych == 0x0A) goto yy72;
|
||||
goto yy67;
|
||||
yy69:
|
||||
++YYCURSOR;
|
||||
#line 472 "idl.re"
|
||||
#line 476 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
if(cursor != s->eof)
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if (0 != s->error_proc)
|
||||
(*s->error_proc)(s, "'\\000' in input stream");
|
||||
if (0 != s->error_proc) {
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"'\\000' in input stream");
|
||||
}
|
||||
else
|
||||
printf("Error: 0 in file\n");
|
||||
}
|
||||
BOOST_WAVE_RET(T_EOF);
|
||||
}
|
||||
#line 904 "idl_re.cpp"
|
||||
#line 911 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy71:
|
||||
yych = *++YYCURSOR;
|
||||
goto yy58;
|
||||
@@ -1039,9 +1046,9 @@ yy79:
|
||||
yy80:
|
||||
++YYCURSOR;
|
||||
yy81:
|
||||
#line 436 "idl.re"
|
||||
#line 440 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_STRINGLIT); }
|
||||
#line 1045 "idl_re.cpp"
|
||||
#line 1052 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy82:
|
||||
++YYCURSOR;
|
||||
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
||||
@@ -1886,9 +1893,9 @@ yy128:
|
||||
yy130:
|
||||
++YYCURSOR;
|
||||
yy131:
|
||||
#line 433 "idl.re"
|
||||
#line 437 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_CHARLIT); }
|
||||
#line 1892 "idl_re.cpp"
|
||||
#line 1899 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy132:
|
||||
++YYCURSOR;
|
||||
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
||||
@@ -2510,9 +2517,9 @@ yy163:
|
||||
}
|
||||
yy164:
|
||||
++YYCURSOR;
|
||||
#line 430 "idl.re"
|
||||
#line 434 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_FIXEDPOINTLIT); }
|
||||
#line 2516 "idl_re.cpp"
|
||||
#line 2523 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy166:
|
||||
yyaccept = 5;
|
||||
YYMARKER = ++YYCURSOR;
|
||||
@@ -2573,9 +2580,9 @@ yy168:
|
||||
}
|
||||
}
|
||||
yy170:
|
||||
#line 427 "idl.re"
|
||||
#line 431 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_FLOATLIT); }
|
||||
#line 2579 "idl_re.cpp"
|
||||
#line 2586 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy171:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych <= ',') {
|
||||
@@ -3081,44 +3088,44 @@ yy221:
|
||||
goto yy121;
|
||||
yy222:
|
||||
++YYCURSOR;
|
||||
#line 413 "idl.re"
|
||||
#line 417 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_GREATEREQUAL); }
|
||||
#line 3087 "idl_re.cpp"
|
||||
#line 3094 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy224:
|
||||
++YYCURSOR;
|
||||
#line 409 "idl.re"
|
||||
#line 413 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_SHIFTRIGHT); }
|
||||
#line 3092 "idl_re.cpp"
|
||||
#line 3099 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy226:
|
||||
++YYCURSOR;
|
||||
#line 412 "idl.re"
|
||||
#line 416 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_LESSEQUAL); }
|
||||
#line 3097 "idl_re.cpp"
|
||||
#line 3104 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy228:
|
||||
++YYCURSOR;
|
||||
#line 408 "idl.re"
|
||||
#line 412 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_SHIFTLEFT); }
|
||||
#line 3102 "idl_re.cpp"
|
||||
#line 3109 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy230:
|
||||
++YYCURSOR;
|
||||
#line 410 "idl.re"
|
||||
#line 414 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_EQUAL); }
|
||||
#line 3107 "idl_re.cpp"
|
||||
#line 3114 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy232:
|
||||
++YYCURSOR;
|
||||
#line 411 "idl.re"
|
||||
#line 415 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_NOTEQUAL); }
|
||||
#line 3112 "idl_re.cpp"
|
||||
#line 3119 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy234:
|
||||
++YYCURSOR;
|
||||
#line 415 "idl.re"
|
||||
#line 419 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_OROR); }
|
||||
#line 3117 "idl_re.cpp"
|
||||
#line 3124 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy236:
|
||||
++YYCURSOR;
|
||||
#line 414 "idl.re"
|
||||
#line 418 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_ANDAND); }
|
||||
#line 3122 "idl_re.cpp"
|
||||
#line 3129 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy238:
|
||||
++YYCURSOR;
|
||||
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
|
||||
@@ -3199,9 +3206,9 @@ yy247:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'g') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 460 "idl.re"
|
||||
#line 464 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_WARNING); }
|
||||
#line 3205 "idl_re.cpp"
|
||||
#line 3212 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy255:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'a') goto yy77;
|
||||
@@ -3212,18 +3219,18 @@ yy255:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'a') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 458 "idl.re"
|
||||
#line 462 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_PRAGMA); }
|
||||
#line 3218 "idl_re.cpp"
|
||||
#line 3225 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy261:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'n') goto yy77;
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'e') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 456 "idl.re"
|
||||
#line 460 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_LINE); }
|
||||
#line 3227 "idl_re.cpp"
|
||||
#line 3234 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy265:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'd') goto yy77;
|
||||
@@ -3232,9 +3239,9 @@ yy265:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'f') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 455 "idl.re"
|
||||
#line 459 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_UNDEF); }
|
||||
#line 3238 "idl_re.cpp"
|
||||
#line 3245 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy270:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'f') goto yy77;
|
||||
@@ -3245,9 +3252,9 @@ yy270:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'e') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 454 "idl.re"
|
||||
#line 458 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_DEFINE); }
|
||||
#line 3251 "idl_re.cpp"
|
||||
#line 3258 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy276:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych == 'r') goto yy289;
|
||||
@@ -3267,41 +3274,41 @@ yy280:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'f') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 452 "idl.re"
|
||||
#line 456 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_ELIF); }
|
||||
#line 3273 "idl_re.cpp"
|
||||
#line 3280 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy283:
|
||||
++YYCURSOR;
|
||||
#line 451 "idl.re"
|
||||
#line 455 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_ELSE); }
|
||||
#line 3278 "idl_re.cpp"
|
||||
#line 3285 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy285:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'i') goto yy77;
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'f') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 453 "idl.re"
|
||||
#line 457 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_ENDIF); }
|
||||
#line 3287 "idl_re.cpp"
|
||||
#line 3294 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy289:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'o') goto yy77;
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'r') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 457 "idl.re"
|
||||
#line 461 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_ERROR); }
|
||||
#line 3296 "idl_re.cpp"
|
||||
#line 3303 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy293:
|
||||
yyaccept = 9;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if(yych == 'd') goto yy321;
|
||||
if(yych == 'n') goto yy322;
|
||||
yy294:
|
||||
#line 448 "idl.re"
|
||||
#line 452 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_IF); }
|
||||
#line 3305 "idl_re.cpp"
|
||||
#line 3312 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy295:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'c') goto yy77;
|
||||
@@ -3333,9 +3340,9 @@ yy300:
|
||||
}
|
||||
}
|
||||
yy302:
|
||||
#line 446 "idl.re"
|
||||
#line 450 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_INCLUDE); }
|
||||
#line 3339 "idl_re.cpp"
|
||||
#line 3346 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy303:
|
||||
++YYCURSOR;
|
||||
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
||||
@@ -3360,9 +3367,9 @@ yy307:
|
||||
}
|
||||
if(yych <= '=') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 440 "idl.re"
|
||||
#line 444 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_HHEADER); }
|
||||
#line 3366 "idl_re.cpp"
|
||||
#line 3373 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy310:
|
||||
++YYCURSOR;
|
||||
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
||||
@@ -3373,9 +3380,9 @@ yy311:
|
||||
}
|
||||
if(yych <= '!') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 443 "idl.re"
|
||||
#line 447 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_QHEADER); }
|
||||
#line 3379 "idl_re.cpp"
|
||||
#line 3386 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy314:
|
||||
++YYCURSOR;
|
||||
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
||||
@@ -3431,16 +3438,16 @@ yy322:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'f') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 450 "idl.re"
|
||||
#line 454 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_IFNDEF); }
|
||||
#line 3437 "idl_re.cpp"
|
||||
#line 3444 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy327:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych != 'f') goto yy77;
|
||||
++YYCURSOR;
|
||||
#line 449 "idl.re"
|
||||
#line 453 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PP_IFDEF); }
|
||||
#line 3444 "idl_re.cpp"
|
||||
#line 3451 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy330:
|
||||
++YYCURSOR;
|
||||
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
||||
@@ -3496,14 +3503,14 @@ yy334:
|
||||
}
|
||||
yy337:
|
||||
++YYCURSOR;
|
||||
#line 417 "idl.re"
|
||||
#line 421 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_MINUSMINUS); }
|
||||
#line 3502 "idl_re.cpp"
|
||||
#line 3509 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy339:
|
||||
++YYCURSOR;
|
||||
#line 416 "idl.re"
|
||||
#line 420 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_PLUSPLUS); }
|
||||
#line 3507 "idl_re.cpp"
|
||||
#line 3514 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy341:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych == '/') goto yy342;
|
||||
@@ -3516,9 +3523,9 @@ yy342:
|
||||
goto yy77;
|
||||
yy343:
|
||||
++YYCURSOR;
|
||||
#line 388 "idl.re"
|
||||
#line 392 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_POUND_POUND); }
|
||||
#line 3522 "idl_re.cpp"
|
||||
#line 3529 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy345:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -3537,9 +3544,9 @@ yy345:
|
||||
if(yych == '?') goto yy204;
|
||||
if(yych == '\\') goto yy203;
|
||||
yy349:
|
||||
#line 381 "idl.re"
|
||||
#line 385 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_FALSE); }
|
||||
#line 3543 "idl_re.cpp"
|
||||
#line 3550 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy350:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
@@ -3555,28 +3562,28 @@ yy350:
|
||||
if(yych == '?') goto yy204;
|
||||
if(yych == '\\') goto yy203;
|
||||
yy353:
|
||||
#line 380 "idl.re"
|
||||
#line 384 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_TRUE); }
|
||||
#line 3561 "idl_re.cpp"
|
||||
#line 3568 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy354:
|
||||
++YYCURSOR;
|
||||
#line 378 "idl.re"
|
||||
#line 382 "..\\..\\idllexer\\idl.re"
|
||||
{ goto cppcomment; }
|
||||
#line 3566 "idl_re.cpp"
|
||||
#line 3573 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy356:
|
||||
++YYCURSOR;
|
||||
#line 377 "idl.re"
|
||||
#line 381 "..\\..\\idllexer\\idl.re"
|
||||
{ goto ccomment; }
|
||||
#line 3571 "idl_re.cpp"
|
||||
#line 3578 "..\\..\\idllexer\\idl_re.cpp"
|
||||
}
|
||||
}
|
||||
#line 488 "idl.re"
|
||||
#line 495 "..\\..\\idllexer\\idl.re"
|
||||
|
||||
|
||||
ccomment:
|
||||
{
|
||||
|
||||
#line 3580 "idl_re.cpp"
|
||||
#line 3587 "..\\..\\idllexer\\idl_re.cpp"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
||||
@@ -3600,20 +3607,20 @@ ccomment:
|
||||
++YYCURSOR;
|
||||
if((yych = *YYCURSOR) == '/') goto yy371;
|
||||
yy361:
|
||||
#line 501 "idl.re"
|
||||
#line 508 "..\\..\\idllexer\\idl.re"
|
||||
{ goto ccomment; }
|
||||
#line 3606 "idl_re.cpp"
|
||||
#line 3613 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy362:
|
||||
++YYCURSOR;
|
||||
yy363:
|
||||
#line 494 "idl.re"
|
||||
#line 501 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
/*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/
|
||||
/*s->tok = cursor; */
|
||||
s->line += count_backslash_newlines(s, cursor) +1;
|
||||
goto ccomment;
|
||||
}
|
||||
#line 3617 "idl_re.cpp"
|
||||
#line 3624 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy364:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych == 0x0A) goto yy370;
|
||||
@@ -3623,20 +3630,24 @@ yy365:
|
||||
goto yy361;
|
||||
yy366:
|
||||
++YYCURSOR;
|
||||
#line 504 "idl.re"
|
||||
#line 511 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if(cursor == s->eof)
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "Unterminated comment");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_warning,
|
||||
"Unterminated comment");
|
||||
else
|
||||
printf("Error: Unterminated comment\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "'\\000' in input stream");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"'\\000' in input stream");
|
||||
else
|
||||
printf("Error: 0 in file");
|
||||
}
|
||||
@@ -3645,34 +3656,36 @@ yy366:
|
||||
/* the comment is unterminated, but nevertheless its a comment */
|
||||
BOOST_WAVE_RET(T_CCOMMENT);
|
||||
}
|
||||
#line 3649 "idl_re.cpp"
|
||||
#line 3660 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy368:
|
||||
++YYCURSOR;
|
||||
#line 527 "idl.re"
|
||||
#line 538 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "invalid character in input stream");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"invalid character in input stream");
|
||||
else
|
||||
printf("Error: 0 in file");
|
||||
}
|
||||
#line 3659 "idl_re.cpp"
|
||||
#line 3672 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy370:
|
||||
yych = *++YYCURSOR;
|
||||
goto yy363;
|
||||
yy371:
|
||||
++YYCURSOR;
|
||||
#line 492 "idl.re"
|
||||
#line 499 "..\\..\\idllexer\\idl.re"
|
||||
{ BOOST_WAVE_RET(T_CCOMMENT); }
|
||||
#line 3667 "idl_re.cpp"
|
||||
#line 3680 "..\\..\\idllexer\\idl_re.cpp"
|
||||
}
|
||||
}
|
||||
#line 534 "idl.re"
|
||||
#line 547 "..\\..\\idllexer\\idl.re"
|
||||
|
||||
|
||||
cppcomment:
|
||||
{
|
||||
|
||||
#line 3676 "idl_re.cpp"
|
||||
#line 3689 "..\\..\\idllexer\\idl_re.cpp"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
||||
@@ -3691,32 +3704,34 @@ yy375:
|
||||
yy376:
|
||||
++YYCURSOR;
|
||||
yy377:
|
||||
#line 539 "idl.re"
|
||||
#line 552 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
/*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */
|
||||
/*s->tok = cursor; */
|
||||
s->line++;
|
||||
BOOST_WAVE_RET(T_CPPCOMMENT);
|
||||
}
|
||||
#line 3702 "idl_re.cpp"
|
||||
#line 3715 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy378:
|
||||
yych = *++YYCURSOR;
|
||||
if(yych == 0x0A) goto yy383;
|
||||
goto yy377;
|
||||
yy379:
|
||||
++YYCURSOR;
|
||||
#line 546 "idl.re"
|
||||
#line 559 "..\\..\\idllexer\\idl.re"
|
||||
{ goto cppcomment; }
|
||||
#line 3711 "idl_re.cpp"
|
||||
#line 3724 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy381:
|
||||
++YYCURSOR;
|
||||
#line 549 "idl.re"
|
||||
#line 562 "..\\..\\idllexer\\idl.re"
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if(cursor != s->eof)
|
||||
{
|
||||
if (s->error_proc)
|
||||
(*s->error_proc)(s, "'\\000' in input stream");
|
||||
(*s->error_proc)(s,
|
||||
cpplexer::lexing_exception::generic_lexing_error,
|
||||
"'\\000' in input stream");
|
||||
else
|
||||
printf("Error: 0 in file");
|
||||
}
|
||||
@@ -3725,14 +3740,14 @@ yy381:
|
||||
/* the comment is unterminated, but nevertheless its a comment */
|
||||
BOOST_WAVE_RET(T_CPPCOMMENT);
|
||||
}
|
||||
#line 3729 "idl_re.cpp"
|
||||
#line 3744 "..\\..\\idllexer\\idl_re.cpp"
|
||||
yy383:
|
||||
++YYCURSOR;
|
||||
yych = *YYCURSOR;
|
||||
goto yy377;
|
||||
}
|
||||
}
|
||||
#line 563 "idl.re"
|
||||
#line 578 "..\\..\\idllexer\\idl.re"
|
||||
|
||||
|
||||
} /* end of scan */
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
}
|
||||
|
||||
// error reporting from the re2c generated lexer
|
||||
static int report_error(scanner_t const *s, char const *, ...);
|
||||
static int report_error(scanner_t const *s, int code, char const *, ...);
|
||||
|
||||
private:
|
||||
static char const *tok_names[];
|
||||
@@ -164,7 +164,8 @@ lexer<IteratorT, PositionT>::get()
|
||||
|
||||
template <typename IteratorT, typename PositionT>
|
||||
inline int
|
||||
lexer<IteratorT, PositionT>::report_error(scanner_t const *s, char const* msg, ...)
|
||||
lexer<IteratorT, PositionT>::report_error(scanner_t const *s, int errcode,
|
||||
char const* msg, ...)
|
||||
{
|
||||
BOOST_ASSERT(0 != s);
|
||||
BOOST_ASSERT(0 != msg);
|
||||
@@ -177,8 +178,8 @@ lexer<IteratorT, PositionT>::report_error(scanner_t const *s, char const* msg, .
|
||||
vsprintf(buffer, msg, params);
|
||||
va_end(params);
|
||||
|
||||
BOOST_WAVE_LEXER_THROW(boost::wave::cpplexer::lexing_exception,
|
||||
generic_lexing_error, buffer, s->line, -1, s->file_name);
|
||||
BOOST_WAVE_LEXER_THROW_VAR(boost::wave::cpplexer::lexing_exception,
|
||||
errcode, buffer, s->line, -1, s->file_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,8 @@ NonDigit = [a-zA-Z_$] | UniversalChar;
|
||||
if (s->eof && cursor != s->eof)
|
||||
{
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\000' in input stream");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\000' in input stream");
|
||||
}
|
||||
BOOST_WAVE_RET(T_EOF);
|
||||
}
|
||||
@@ -301,8 +302,8 @@ NonDigit = [a-zA-Z_$] | UniversalChar;
|
||||
{
|
||||
// flag the error
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\%03o' in input stream",
|
||||
*--YYCURSOR);
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\%03o' in input stream", *--YYCURSOR);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -326,13 +327,15 @@ ccomment:
|
||||
if(cursor == s->eof)
|
||||
{
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "Unterminated 'C' style comment");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_warning,
|
||||
"Unterminated 'C' style comment");
|
||||
}
|
||||
else
|
||||
{
|
||||
--YYCURSOR; // next call returns T_EOF
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character: '\\000' in input stream");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character: '\\000' in input stream");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,8 +343,8 @@ ccomment:
|
||||
{
|
||||
// flag the error
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\%03o' in input stream",
|
||||
*--YYCURSOR);
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\%03o' in input stream", *--YYCURSOR);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -364,14 +367,16 @@ cppcomment:
|
||||
{
|
||||
--YYCURSOR; // next call returns T_EOF
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\000' in input stream");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\000' in input stream");
|
||||
}
|
||||
|
||||
--YYCURSOR; // next call returns T_EOF
|
||||
if (!s->single_line_only)
|
||||
{
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "Unterminated 'C++' style comment");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_warning,
|
||||
"Unterminated 'C++' style comment");
|
||||
}
|
||||
BOOST_WAVE_RET(T_CPPCOMMENT);
|
||||
}
|
||||
@@ -380,8 +385,8 @@ cppcomment:
|
||||
{
|
||||
// flag the error
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\%03o' in input stream",
|
||||
*--YYCURSOR);
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\%03o' in input stream", *--YYCURSOR);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <boost/wave/cpplexer/re2clex/aq.hpp>
|
||||
#include <boost/wave/cpplexer/re2clex/scanner.hpp>
|
||||
#include <boost/wave/cpplexer/re2clex/cpp_re.hpp>
|
||||
#include <boost/wave/cpplexer/cpplexer_exceptions.hpp>
|
||||
|
||||
// this must occur after all of the includes and before any code appears
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
@@ -212,8 +213,10 @@ uchar *fill(Scanner *s, uchar *cursor)
|
||||
if (buf == 0)
|
||||
{
|
||||
using namespace std; // some systems have printf in std
|
||||
if (0 != s->error_proc)
|
||||
(*s->error_proc)(s, "Out of memory!");
|
||||
if (0 != s->error_proc) {
|
||||
(*s->error_proc)(s, lexing_exception::unexpected_error,
|
||||
"Out of memory!");
|
||||
}
|
||||
else
|
||||
printf("Out of memory!\n");
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -290,7 +290,8 @@ NonDigit = [a-zA-Z_] | UniversalChar;
|
||||
if (s->eof && cursor != s->eof)
|
||||
{
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\000' in input stream");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\000' in input stream");
|
||||
}
|
||||
BOOST_WAVE_RET(T_EOF);
|
||||
}
|
||||
@@ -301,8 +302,8 @@ NonDigit = [a-zA-Z_] | UniversalChar;
|
||||
{
|
||||
// flag the error
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\%03o' in input stream",
|
||||
*--YYCURSOR);
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\%03o' in input stream", *--YYCURSOR);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -326,13 +327,15 @@ ccomment:
|
||||
if(cursor == s->eof)
|
||||
{
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "unterminated 'C' style comment");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_warning,
|
||||
"unterminated 'C' style comment");
|
||||
}
|
||||
else
|
||||
{
|
||||
--YYCURSOR; // next call returns T_EOF
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character: '\\000' in input stream");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character: '\\000' in input stream");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,8 +343,8 @@ ccomment:
|
||||
{
|
||||
// flag the error
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\%03o' in input stream",
|
||||
*--YYCURSOR);
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\%03o' in input stream", *--YYCURSOR);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -364,14 +367,16 @@ cppcomment:
|
||||
{
|
||||
--YYCURSOR; // next call returns T_EOF
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\000' in input stream");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\000' in input stream");
|
||||
}
|
||||
|
||||
--YYCURSOR; // next call returns T_EOF
|
||||
if (!s->single_line_only)
|
||||
{
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "Unterminated 'C++' style comment");
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_warning,
|
||||
"Unterminated 'C++' style comment");
|
||||
}
|
||||
BOOST_WAVE_RET(T_CPPCOMMENT);
|
||||
}
|
||||
@@ -380,8 +385,8 @@ cppcomment:
|
||||
{
|
||||
// flag the error
|
||||
BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
|
||||
(*s->error_proc)(s, "invalid character '\\%03o' in input stream",
|
||||
*--YYCURSOR);
|
||||
(*s->error_proc)(s, lexing_exception::generic_lexing_error,
|
||||
"invalid character '\\%03o' in input stream", *--YYCURSOR);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,10 +12,17 @@
|
||||
#
|
||||
# These are the sources to compile for the testwave application
|
||||
#
|
||||
SOURCES = testwave testwave_app
|
||||
SOURCES_STATIC = testwave testwave_app
|
||||
;
|
||||
|
||||
path-constant TESTWAVE_DIR : ../testwave/testfiles ;
|
||||
SOURCES_DYNAMIC = testwave_dll testwave_app_dll
|
||||
;
|
||||
|
||||
SOURCES = $(SOURCE_STATIC) $(SOURCES_DYNAMIC)
|
||||
;
|
||||
|
||||
path-constant TESTWAVE_DIR : ../testwave/testfiles
|
||||
;
|
||||
|
||||
#
|
||||
# This are the arguments for the testwave executable
|
||||
@@ -33,12 +40,6 @@ TESTWAVE_FILES = test.cfg
|
||||
;
|
||||
|
||||
project wave/test
|
||||
: requirements
|
||||
<threading>single
|
||||
<variant>debug
|
||||
<define>BOOST_LIB_DIAGNOSTIC=1
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
<link>shared:<define>BOOST_ALL_DYN_LINK=1
|
||||
;
|
||||
|
||||
for local source in $(SOURCES)
|
||||
@@ -57,12 +58,13 @@ test-suite wave
|
||||
[
|
||||
run
|
||||
# sources
|
||||
../testwave/$(SOURCES).cpp
|
||||
../testwave/$(SOURCES_DYNAMIC).cpp
|
||||
/boost/wave//boost_wave
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/date_time//boost_date_time
|
||||
:
|
||||
# arguments
|
||||
$(TESTWAVE_ARGUMENTS)
|
||||
@@ -71,7 +73,11 @@ test-suite wave
|
||||
# input files
|
||||
:
|
||||
# requirements
|
||||
:
|
||||
<threading>multi
|
||||
<variant>debug
|
||||
<link>shared:<define>BOOST_ALL_DYN_LINK=1
|
||||
# <define>BOOST_LIB_DIAGNOSTIC=1
|
||||
:
|
||||
# name
|
||||
testwave_dll
|
||||
]
|
||||
@@ -79,12 +85,13 @@ test-suite wave
|
||||
[
|
||||
run
|
||||
# sources
|
||||
../testwave/$(SOURCES).cpp
|
||||
../testwave/$(SOURCES_STATIC).cpp
|
||||
/boost/wave//boost_wave/<link>static
|
||||
/boost/program_options//boost_program_options/<link>static
|
||||
/boost/filesystem//boost_filesystem/<link>static
|
||||
/boost/system//boost_system/<link>static
|
||||
/boost/thread//boost_thread/<link>static
|
||||
/boost/date_time//boost_date_time/<link>static
|
||||
:
|
||||
# arguments
|
||||
$(TESTWAVE_ARGUMENTS)
|
||||
@@ -93,7 +100,10 @@ test-suite wave
|
||||
# input files
|
||||
:
|
||||
# requirements
|
||||
<link>static # Linking to DLL tested by testwave_dll
|
||||
<threading>multi
|
||||
<variant>debug
|
||||
<link>static # Linking to DLL tested by testwave_dll
|
||||
# <define>BOOST_LIB_DIAGNOSTIC=1
|
||||
:
|
||||
# name
|
||||
testwave
|
||||
@@ -107,14 +117,17 @@ test-suite wave
|
||||
/boost/wave//boost_wave
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/system//boost_system
|
||||
/boost/date_time//boost_date_time
|
||||
:
|
||||
# arguments
|
||||
:
|
||||
# input files
|
||||
:
|
||||
# requirements
|
||||
<threading>multi
|
||||
<variant>debug
|
||||
:
|
||||
# name
|
||||
test_slex_lexer
|
||||
@@ -127,14 +140,17 @@ test-suite wave
|
||||
/boost/wave//boost_wave
|
||||
/boost/program_options//boost_program_options
|
||||
/boost/filesystem//boost_filesystem
|
||||
/boost/system//boost_system
|
||||
/boost/thread//boost_thread
|
||||
/boost/system//boost_system
|
||||
/boost/date_time//boost_date_time
|
||||
:
|
||||
# arguments
|
||||
:
|
||||
# input files
|
||||
:
|
||||
# requirements
|
||||
<threading>multi
|
||||
<variant>debug
|
||||
:
|
||||
# name
|
||||
test_re2c_lexer
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// Tests error reporting: undefined behavior: End of a source file with an
|
||||
// unterminated comment.
|
||||
|
||||
//E t_6_067.hpp(48): error: generic lexing error: Unterminated 'C' style comment
|
||||
//E t_6_067.hpp(48): warning: generic lexer warning: Unterminated 'C' style comment
|
||||
#include "t_6_067.hpp"
|
||||
|
||||
//R #line 19 "t_6_067.hpp"
|
||||
|
||||
13
test/testwave/testwave_app_dll.cpp
Normal file
13
test/testwave/testwave_app_dll.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Boost.Wave: A Standard compliant C++ preprocessor library
|
||||
http://www.boost.org/
|
||||
|
||||
Copyright (c) 2001-2007 Hartmut Kaiser. 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)
|
||||
=============================================================================*/
|
||||
|
||||
// This file is necessary only because Boost.Build V2 isn't able to handle
|
||||
// several testcases using the same source files.
|
||||
|
||||
#include "testwave_app.cpp"
|
||||
13
test/testwave/testwave_dll.cpp
Normal file
13
test/testwave/testwave_dll.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Boost.Wave: A Standard compliant C++ preprocessor library
|
||||
http://www.boost.org/
|
||||
|
||||
Copyright (c) 2001-2007 Hartmut Kaiser. 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)
|
||||
=============================================================================*/
|
||||
|
||||
// This file is necessary only because Boost.Build V2 isn't able to handle
|
||||
// several testcases using the same source files.
|
||||
|
||||
#include "testwave.cpp"
|
||||
@@ -22,6 +22,7 @@ exe wave
|
||||
/boost//serialization
|
||||
/boost//system
|
||||
/boost//thread
|
||||
/boost//date_time
|
||||
:
|
||||
# <debug-symbols>on
|
||||
:
|
||||
|
||||
Reference in New Issue
Block a user