From b4d6fe14fe8121eee83ae2db461524fc96eeb5f3 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Wed, 25 Aug 2004 11:32:47 +0000 Subject: [PATCH] Updated Wave for the Boost review in October. [SVN r2281] --- ChangeLog | 39 +- build/Jamfile | 7 +- build/Jamfile.v2 | 7 +- doc/acknowledgements.html | 6 +- doc/class_reference_context.html | 64 +- doc/class_reference_fileposition.html | 14 +- doc/class_reference_inputpolicy.html | 27 +- doc/class_reference_lexer.html | 22 +- doc/class_reference_tokentype.html | 30 +- doc/class_reference_tracepolicy.html | 14 +- doc/compiletime_config.html | 26 +- doc/introduction.html | 11 +- doc/macro_expansion_process.html | 12 +- doc/predefined_macros.html | 12 +- doc/preface.html | 15 +- doc/preliminary_cpp0x_support.html | 317 - doc/quickstart.html | 26 +- doc/references.html | 12 +- doc/samples.html | 10 +- doc/supported_pragmas.html | 12 +- doc/theme/style.css | 4 + doc/token_ids.html | 12 +- doc/tracing_facility.html | 16 +- doc/wave_driver.html | 36 +- include/boost/wave.hpp | 7 +- include/boost/wave/cpp_context.hpp | 122 +- include/boost/wave/cpp_exceptions.hpp | 16 +- include/boost/wave/cpp_iteration_context.hpp | 30 +- .../boost/wave/cpplexer/cpp_lex_interface.hpp | 17 +- .../boost/wave/cpplexer/cpp_lex_iterator.hpp | 36 +- include/boost/wave/cpplexer/cpp_lex_token.hpp | 27 +- .../wave/cpplexer/cpplexer_exceptions.hpp | 7 +- include/boost/wave/cpplexer/re2clex/aq.hpp | 11 +- .../boost/wave/cpplexer/re2clex/cpp.re.hpp | 7 +- .../wave/cpplexer/re2clex/cpp_re2c_lexer.hpp | 44 +- .../boost/wave/cpplexer/re2clex/scanner.hpp | 11 +- include/boost/wave/cpplexer/token_cache.hpp | 7 +- .../wave/cpplexer/validate_universal_char.hpp | 7 +- .../boost/wave/grammars/cpp_chlit_grammar.hpp | 11 +- .../wave/grammars/cpp_defined_grammar.hpp | 52 +- .../wave/grammars/cpp_defined_grammar_gen.hpp | 21 +- .../wave/grammars/cpp_expression_grammar.hpp | 39 +- .../grammars/cpp_expression_grammar_gen.hpp | 19 +- .../wave/grammars/cpp_expression_value.hpp | 7 +- include/boost/wave/grammars/cpp_grammar.hpp | 111 +- .../boost/wave/grammars/cpp_grammar_gen.hpp | 29 +- .../wave/grammars/cpp_intlit_grammar.hpp | 11 +- .../wave/grammars/cpp_literal_grammar_gen.hpp | 7 +- .../wave/grammars/cpp_predef_macros_gen.hpp | 13 +- .../grammars/cpp_predef_macros_grammar.hpp | 7 +- include/boost/wave/language_support.hpp | 60 +- include/boost/wave/token_ids.hpp | 724 +- include/boost/wave/trace_policies.hpp | 7 +- include/boost/wave/util/cpp_ifblock.hpp | 7 +- .../boost/wave/util/cpp_include_pathes.hpp | 7 +- include/boost/wave/util/cpp_iterator.hpp | 476 +- include/boost/wave/util/cpp_macromap.hpp | 1182 +--- include/boost/wave/util/eat_whitespace.hpp | 18 +- include/boost/wave/util/file_position.hpp | 29 +- include/boost/wave/util/functor_input.hpp | 7 +- .../wave/util/insert_whitespace_detection.hpp | 7 +- include/boost/wave/util/interpret_pragma.hpp | 49 +- include/boost/wave/util/iteration_context.hpp | 7 +- include/boost/wave/util/macro_definition.hpp | 7 +- include/boost/wave/util/macro_helpers.hpp | 29 +- include/boost/wave/util/pattern_parser.hpp | 7 +- include/boost/wave/util/symbol_table.hpp | 337 +- .../wave/util/time_conversion_helper.hpp | 7 +- .../boost/wave/util/transform_iterator.hpp | 11 +- .../boost/wave/util/unput_queue_iterator.hpp | 29 +- include/boost/wave/wave_config.hpp | 50 +- include/boost/wave/wave_version.hpp | 11 +- index.html | 24 +- samples/cpp_tokens/build/Jamfile | 7 +- samples/cpp_tokens/build/Jamfile.v2 | 7 +- samples/cpp_tokens/cpp_tokens.cpp | 23 +- samples/cpp_tokens/cpp_tokens.hpp | 7 +- samples/cpp_tokens/cpp_tokens_config.hpp | 27 +- .../instantiate_cpp_exprgrammar.cpp | 13 +- .../cpp_tokens/instantiate_cpp_grammar.cpp | 13 +- .../instantiate_cpp_literalgrammars.cpp | 15 +- .../instantiate_defined_grammar.cpp | 11 +- samples/cpp_tokens/instantiate_slex_lexer.cpp | 7 +- samples/cpp_tokens/slex/cpp_slex_lexer.hpp | 75 +- samples/cpp_tokens/slex/lexer.hpp | 102 +- samples/cpp_tokens/slex_interface.hpp | 17 +- samples/cpp_tokens/slex_iterator.hpp | 25 +- samples/cpp_tokens/slex_token.hpp | 27 +- samples/list_includes/build/Jamfile | 7 +- samples/list_includes/build/Jamfile.v2 | 7 +- samples/list_includes/list_includes.cpp | 19 +- samples/list_includes/list_includes.hpp | 7 +- .../list_includes/list_includes_config.hpp | 30 +- .../list_includes/list_includes_version.hpp | 7 +- samples/quick_start/build/Jamfile | 7 +- samples/quick_start/build/Jamfile.v2 | 7 +- samples/quick_start/quick_start.cpp | 23 +- samples/waveidl/build/Jamfile | 7 +- samples/waveidl/build/Jamfile.v2 | 7 +- samples/waveidl/idl.cpp | 52 +- samples/waveidl/idl.hpp | 7 +- samples/waveidl/idl_config.hpp | 15 +- samples/waveidl/idl_version.hpp | 9 +- samples/waveidl/idllexer/idl.re | 7 +- samples/waveidl/idllexer/idl.re.cpp | 163 +- samples/waveidl/idllexer/idl.re.hpp | 7 +- .../waveidl/idllexer/idl_lex_interface.hpp | 17 +- samples/waveidl/idllexer/idl_lex_iterator.hpp | 25 +- samples/waveidl/idllexer/idl_re2c_lexer.hpp | 25 +- samples/waveidl/instantiate_cpp_grammar.cpp | 11 +- .../waveidl/instantiate_defined_grammar.cpp | 11 +- samples/waveidl/instantiate_predef_macros.cpp | 11 +- samples/waveidl/instantiate_re2c_lexer.cpp | 7 +- .../waveidl/instantiate_re2c_lexer_string.cpp | 7 +- src/cpplexer/re2clex/aq.cpp | 10 +- src/cpplexer/re2clex/cpp.re | 17 +- src/cpplexer/re2clex/cpp.re.cpp | 5910 ++++++++--------- src/instantiate_cpp_exprgrammar.cpp | 12 +- src/instantiate_cpp_grammar.cpp | 12 +- src/instantiate_cpp_literalgrammars.cpp | 14 +- src/instantiate_defined_grammar.cpp | 12 +- src/instantiate_predef_macros.cpp | 12 +- src/instantiate_re2c_lexer.cpp | 10 +- src/instantiate_re2c_lexer_string.cpp | 8 +- tool/build/Jamfile | 7 +- tool/build/Jamfile.v2 | 7 +- tool/cpp.cpp | 75 +- tool/cpp.hpp | 7 +- tool/cpp_config.hpp | 201 +- tool/cpp_version.hpp | 10 +- tool/trace_macro_expansion.hpp | 8 +- 131 files changed, 4556 insertions(+), 7173 deletions(-) delete mode 100644 doc/preliminary_cpp0x_support.html diff --git a/ChangeLog b/ChangeLog index db3f808..9fc4360 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,9 @@ Wave: A Standard compliant C++ preprocessor library -Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ -Use, modification and distribution is subject to 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) +Copyright (c) 2001-2004 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) ------------------------------------------------------------------------------- TODO (known issues): @@ -16,14 +15,40 @@ TODO (known issues): function. - Fix the trigraph backslash problem in the re2c (C/C++ and IDL) scanners, if there is the end of the (internal) buffer just in between a '??/' and a '\n'. + +- Do a sourceforge release. + +Wed Aug 25 13:23:27 WEDT 2004 +Version 1.1.7 +- Branched for Boost Release. +- Removed several features from the code base: + . removed C++0x support + . removed TST support +- Fixed the program_option validator syntax, which has changed since the last + update. +- Removed misleading configuration options from the cpp_config.hpp file, + because the application will have to use the same config options as were used + during the compilation of the library. +- Changed the naming convention of typedef'd types in the library. Removed the + _t suffix, wherever possible. +- Updated the documentation to reflect the removal of the C++0x features. + +- Changed the licensing scheme to: +// Copyright 2004 Joe Coder. 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) + +Mon May 24 10:02:47 WEDT 2004 +Version 1.1.6 +- Fixed a incompatibility with the new program_options version. Version 1.1.5 Version 1.0.6 - Fixed a bug, which reported an #include statement as ill formed, if it was followed by an empty C comment only. This was an error in the cpp.re regular - expression for C comments. Since this change simplified the Re2C generated - lexer a lot it was possible to remove the compiler workaround for the VC7.1 - compiler which prevented the optimization of this lexer. + expression for C comments. Additionally, since this change simplified the + Re2C generated lexer a lot it was possible to remove the compiler workaround + for the VC7.1 compiler which prevented the optimization of this lexer. Mon Mar 29 09:36:59 WEDT 2004 - Corrected the signature of the main() functions (was main(int, char const*[])). diff --git a/build/Jamfile b/build/Jamfile index 021372f..625faa3 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -2,12 +2,11 @@ # # Boost Wave Library Build Jamfile # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) subproject libs/wave/build ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 90e2f81..72ce658 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -2,12 +2,11 @@ # # Boost Wave Library Build Jamfile # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) project boost/wave : source-location ../src diff --git a/doc/acknowledgements.html b/doc/acknowledgements.html index 66021e6..60fc20a 100644 --- a/doc/acknowledgements.html +++ b/doc/acknowledgements.html @@ -30,7 +30,7 @@ testcases used for testing the correctness of the macro expansion.

Dan Nuffer, who wrote the initial Re2C based C++ lexer and the Slex (Spirit Lex) scanner generator sample.

-

Martin Wille for helping with the port to linux, testing on linux and for contributing +

Martin Wille for helping with the port to Linux, testing on Linux and for contributing the automated test scripts.

Vladimir Prus for helping with the command line and config file options analysis fro the Wave driver executable.

@@ -76,11 +76,11 @@ a policy based std::basic_string<> compatible string implementation.


Last updated: - Thursday, February 12, 2004 6:43 + Saturday, August 21, 2004 20:01 diff --git a/doc/class_reference_context.html b/doc/class_reference_context.html index 07e6b26..8357b7b 100644 --- a/doc/class_reference_context.html +++ b/doc/class_reference_context.html @@ -58,9 +58,9 @@ { public: - typedef pp_iterator<context> iterator_t; - typedef TokenT token_t; - typedef typename token_t::position_t position_t; + typedef pp_iterator<context> iterator_type; + typedef TokenT token_type; + typedef typename token_type::position_type position_type; // constructor context(IteratorT const &first_, @@ -69,8 +69,8 @@ TracePolicyT &trace = TracePolicyT()) // iterator interface - iterator_t begin() const; - iterator_t end() const; + iterator_type begin() const; + iterator_tySaturday, August 21, 2004 20:01lass="keyword">const; // maintain include paths bool add_include_path(char const *path_); @@ -88,8 +88,8 @@ void reset_macro_definitions(); // other options - void set_language(wave::language_support enable); - wave::language_support get_language() const;
+ void set_language(language_support enable); + language_support get_language() const;
void set_max_include_nesting_depth(size_t new_depth);
size_t get_max_include_nesting_depth() const;
// get the Wave version information static std::string get_version(); @@ -146,27 +146,27 @@ Public typedef's defined by the boost::wave::context class - iterator_t + iterator_type

The IteratorT template parameter provided, while the context class was instantiated.

- lex_t + lex_type

The LexIteratorT template parameter provided, while the context class was instantiated.

- token_t + token_type

The token type, which is returned by the context generated iterators. This type is taken from the LexIteratorT template parameter provided, whicle the context class was instantiated.

- input_policy_t + input_policy_type

The InputPolicyT template parameter provided, while the context class was instantiated.

- trace_policy_t - The TracePolicyT template parameter provided, while the context class was instantiated. + trace_policy_type +

The TracePolicyT template parameter provided, while the context class was instantiated.

- position_t + position_type

The type of the position information contained in every returned token, which describes the point, at which the given token was recognised.

@@ -201,14 +201,14 @@ from the underlying input stream. The returned iterators are conceptually of forward_iterator type.

begin

-
    iterator_t begin();
+
    iterator_type begin();

Initializes and returns the starting iterator for the preprocessed token stream.

end

-
    iterator_t end() const;
+
    iterator_type end() const;

Initializes and returns the end of stream iterator to compare with for detecting the end of the preprocessed token stream.

@@ -243,7 +243,7 @@

Adds the given file system path to the user include search paths. After a - call to the set_sysinclude_delimiter() + call to the set_sysinclude_delimiter() this function adds the given file system path to the system include search paths. Note though, that the given path is validated against the file system.

@@ -262,7 +262,7 @@ item, the function returns false. If the given path was successfully added to the system include search paths, the function returns true.

-

set_sysinclude_delimiter

+

set_sysinclude_delimiter

    void set_sysinclude_delimiter();

Switches the mode, how the add_include_path() @@ -388,14 +388,14 @@ predefined macro __WAVE_VERSION_STR__ is expanded.

Control extended options

-

set_language
+

set_language
get_language

-
    void set_language(wave::language_support language);
-    wave::language_support get_language() const;
+
    void set_language(language_support language);
+    language_support get_language() const;

This functions allow to specify the language mode, in which the Wave library should work. The possible language modes are defined by the enumerated - type wave::language_support:

+ type language_support:

    enum language_support {
     // support flags for C++98
         support_normal = 0x01,
@@ -404,16 +404,10 @@
     // support flags for C99
         support_variadics = 0x02,
         support_c99 = support_variadics,
-    
-    // support flags for experimental C++0x features
-        support_extensions = 0x04,
-        support_cpp0x = support_normal | 
-                        support_variadics | 
-                        support_extensions,
     };

When used with support_variadics the support for variadics, placemarkers and the operator _Pragma() is enabled in normal C++ mode. The support_c99 - and support_cpp0x switch to the respective language support.

+ switch to the C99 language support.

set_max_include_nesting_depth
g et_max_include_nesting_depth

@@ -436,12 +430,12 @@
-Last updated: -Thursday, January 29, 2004 9:04 - + 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)

+ +

 

diff --git a/doc/class_reference_fileposition.html b/doc/class_reference_fileposition.html index 533e2ca..bc0341e 100644 --- a/doc/class_reference_fileposition.html +++ b/doc/class_reference_fileposition.html @@ -79,7 +79,7 @@ correspondence to the supplied parameters. The parameters default to an empty filename and the line number and column number set to one.

-

get_file, get_line, get_column

+

get_file, get_line, get_column

        StringT const &get_file() const;
         int get_line() const;
         int get_column() const;
@@ -110,10 +110,10 @@
 
-Last updated: - Wednesday, January 28, 2004 17:00 - +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)

+ + + diff --git a/doc/class_reference_inputpolicy.html b/doc/class_reference_inputpolicy.html index b802f93..7a91a82 100644 --- a/doc/class_reference_inputpolicy.html +++ b/doc/class_reference_inputpolicy.html @@ -62,7 +62,7 @@ void init_iterators(IterContextT &iter_ctx, PositionT const &act_pos) { - typedef typename IterContextT::iterator_t iterator_t; + typedef typename IterContextT::iterator_type iterator_type; std::ifstream instream(iter_ctx.filename.c_str()); if (!instream.is_open()) { @@ -74,10 +74,10 @@ std::istreambuf_iterator(instream.rdbuf()), std::istreambuf_iterator()); - iter_ctx.first = iterator_t(iter_ctx.instring.begin(), + iter_ctx.first = iterator_type(iter_ctx.instring.begin(), iter_ctx.instring.end(), PositionT(iter_ctx.filename)); - iter_ctx.last = iterator_t(); + iter_ctx.last = iterator_type(); } private: @@ -95,7 +95,7 @@ This embedded class should have the name inner.

Template Parameters

The inner class is instantiated with one template parameter, the iteration - context type, from which the policy is a part of. The iterator type iterator_t + context type, from which the policy is a part of. The iterator type iterator_type which is used to access the underlying input stream has to be derived through a typedef as shown. The iterator pair to initialize (which is accessible as iter_ctx.first and iter_ctx.last) has to initialized from @@ -106,12 +106,11 @@ static void init_iterators( IterContextT iter_ctx, PositionT const &act_pos);

-Wednesday, January 28, 2004 17:00 - directive was found in the input token stream. The main rationale for this + +

directive was found in the input token stream. The main rationale for this function is to initialize the pair of iterators iter_ctx.first and iter_ctx.last, which are to be used to access the input stream corresponding - to the include file to be inserted from inside the preprocessing engine.
-

+ to the include file to be inserted from inside the preprocessing engine.

@@ -124,10 +123,10 @@
-Last updated: - Wednesday, January 14, 2004 12:36 - + 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)

+ + + diff --git a/doc/class_reference_lexer.html b/doc/class_reference_lexer.html index a5d0df6..115fe78 100644 --- a/doc/class_reference_lexer.html +++ b/doc/class_reference_lexer.html @@ -37,7 +37,7 @@ synopsis
    struct lex_iterator
     {
-        typedef boost::wave::lex_token<> token_t;
+        typedef boost::wave::lex_token<> token_type;
 
     // Every lex_iterator should implement at least a complete 
     // forward_iterator interface (not shown here)
@@ -48,7 +48,7 @@
 
         template <typename IteratorT>
         lex_iterator(IteratorT const &first, IteratorT const &last
-            typename token_t::position_t const &pos, 
+            typename token_type::position_type const &pos, 
             boost::wave::language_support language)
     };
 
@@ -60,13 +60,13 @@
     
- +
Public typedef's defined by the boost::wave::context class
token_ttoken_type

The token type returned by the lexer. This is type is used as the return value of the main iterators provided by the boost::wave:.context object too.

Member functions

Besides the functions, which should be provided for forward_iterators as mandated by the C++ Standard, every lexer must implement the following functions to be used with the Wave library:

-

constructor

+

constructor

    lex_iterator();

The default constructor should construct a lexer iterator, which may be used as the end iterator of the provided iterator range.

@@ -74,7 +74,7 @@
     template <typename IteratorT>
     lex_iterator(IteratorT const &first, IteratorT const &last,
-        typename token_t::position_t const &pos, 
+        typename token_type::position_type const &pos, 
         boost::wave::language_support language);

The second constructor should construct a lexer iterator, which may be used as a iterator traversing over the token sequence, generated by the lexer class.

@@ -93,10 +93,10 @@
-Last updated: - Wednesday, January 28, 2004 17:00 - +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)

+ + + diff --git a/doc/class_reference_tokentype.html b/doc/class_reference_tokentype.html index 65c6fe6..fc98890 100644 --- a/doc/class_reference_tokentype.html +++ b/doc/class_reference_tokentype.html @@ -59,20 +59,20 @@ class lex_token { public: - typedef std::basic_string string_t; - typedef PositionT position_t; + typedef std::basic_string<char> string_type; + typedef PositionT position_type; lex_token(); - lex_token(token_id id, string_t const &value, + lex_token(token_id id, string_type const &value, PositionT const &pos); // accessors operator token_id() const; - string_t const &get_value() const; - position_t const &get_position() const; + string_type const &get_value() const; + position_type const &get_position() const; void set_token_id (token_id id); - void set_value (string_t const &newval); - void set_position (position_t const &pos); + void set_value (string_type const &newval); + void set_position (position_type const &pos); }; } // namespace cpplexer @@ -107,7 +107,7 @@

Allows the access to the token id of the token. This access function is implemented as an implicit conversion function to allow the operation of Spirit - parsers directly on top oWednesday, January 28, 2004 17:01l">here.

+ parsers directly on top oSaturday, August 21, 2004 20:01l">here.

This function does not throw in any case.

get_value

@@ -162,11 +162,11 @@
-Last updated: - Monday, January 5, 2004 14:57 - + 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)

+ + + -Wednesday, January 28, 2004 17:01 \ No newline at end of file +Saturday, August 21, 2004 20:01 \ No newline at end of file diff --git a/doc/class_reference_tracepolicy.html b/doc/class_reference_tracepolicy.html index d0815c6..04236bc 100644 --- a/doc/class_reference_tracepolicy.html +++ b/doc/class_reference_tracepolicy.html @@ -96,7 +96,7 @@ }; } // namespace macro_trace_policy -} Wednesday, January 28, 2004 17:01st +}

Member functions

General control functions

@@ -240,10 +240,10 @@
-Last updated: - Wednesday, January 28, 2004 17:01 - +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)

+ + + diff --git a/doc/compiletime_config.html b/doc/compiletime_config.html index 49101ed..0703e77 100644 --- a/doc/compiletime_config.html +++ b/doc/compiletime_config.html @@ -21,7 +21,7 @@ - +

Library compile time configuration

@@ -90,14 +90,6 @@

If defined, it will determine the initial maximal possible include file nesting depth supported. It defaults to 1024.

- - BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS -

If defined, then the preprocessor library supports - a couple of experimental C++0x extensions, as macro scopes, variadics - and placemarkers in C++ mode, well defined token pasting of unrelated - tokens. For more details please refer to The - Preliminary C++0x support.

- BOOST_WAVE_SUPPORT_PRAGMA_ONCE

If defined, then the #pragma once directive is supported by Wave. This specifies that the file, in which the pragma resides, will be included @@ -109,7 +101,7 @@

Using a different token type or lexer type in conjunction with Wave

-

It is possible to use the Wave library while using your own token and/or lexer types. This may be achieved by providing your lexer type as the second template parameter while instantiating the boost::wave::context<> object. The token type used by the library is derived from the token_t typedef to be provided by the lexer type. If you want to provide your own token type only, you may use the boost::wave::lex_iterator<> type contained with the library. This type needs to be parametrized with the token type to use.

+

It is possible to use the Wave library while using your own token and/or lexer types. This may be achieved by providing your lexer type as the second template parameter while instantiating the boost::wave::context<> object. The token type used by the library is derived from the token_type typedef to be provided by the lexer type. If you want to provide your own token type only, you may use the boost::wave::lex_iterator<> type contained with the library. This type needs to be parametrized with the token type to use.

To show, how this may be done, the Wave library contains several samples illustrating this possibility. The cpp_tokens sample shows the usage of a custom lexer and a custom token types. The lexer type used is functionally fully compatible to the re2c [3] based lexer used by default. It is implemented based on the SLex [5] lexer example written by Dan Nuffer. The used theiring token type is functionally equivalent to the default token type except for an additional operator<< used for dumping the information carried bz the token.

Separation and inclusion compilation models

@@ -196,16 +188,16 @@ - +
-Last updated: - Wednesday, January 28, 2004 17:01 - +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)

+ + + diff --git a/doc/introduction.html b/doc/introduction.html index 21fde56..a50fd4e 100644 --- a/doc/introduction.html +++ b/doc/introduction.html @@ -83,9 +83,10 @@ implemented. Additionally there is implemented a IDL lexer, which allows to use
-Last updated: - Wednesday, February 11, 2004 6:58 - +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)

+ + + diff --git a/doc/macro_expansion_process.html b/doc/macro_expansion_process.html index 0e6a334..94b94e1 100644 --- a/doc/macro_expansion_process.html +++ b/doc/macro_expansion_process.html @@ -90,12 +90,12 @@
-Last updated: -Wednesday, January 28, 2004 17:01 - +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)

+ +

 

diff --git a/doc/predefined_macros.html b/doc/predefined_macros.html index ac3e0a8..0e16c41 100644 --- a/doc/predefined_macros.html +++ b/doc/predefined_macros.html @@ -166,10 +166,10 @@
-Last updated: - Wednesday, January 28, 2004 17:04 - + 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)

+ + + diff --git a/doc/preface.html b/doc/preface.html index 65f7039..c53c565 100644 --- a/doc/preface.html +++ b/doc/preface.html @@ -90,11 +90,10 @@ preprocessors when complexity increases.

such that it compiles several strict conformant macro definitions, which are not even compilable with EDG based preprocessors (i.e. Comeau or Intel). The only preprocessor known to have similar Standards conformance today is the preprocessor of the gcc C/C++ compiler.

-

During the last time Wave got another field of application: testing the usability and applicability of different Standards proposals. A new C++0x mode was implemented, which allows to try out and help to establish some ideas, which are designed to overcome some of the known limitations of the C++ preprocessor. You can read about this experimental features here.

- + @@ -102,10 +101,10 @@ today is the preprocessor of the gcc C/C++ compiler.


-Last updated: - Wednesday, January 28, 2004 17:00 - +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)

+ + + diff --git a/doc/preliminary_cpp0x_support.html b/doc/preliminary_cpp0x_support.html deleted file mode 100644 index bed7004..0000000 --- a/doc/preliminary_cpp0x_support.html +++ /dev/null @@ -1,317 +0,0 @@ - - - -Preliminary C++0x support - - - - - -
- - - - - -

Preliminary - C++0x support
-
- - - - - - - -
-

In order to prepare a proposal for the C++ Standards committee, which should - describe certain new and enhanced preprocessor features, the Wave preprocessor - library has implemented experimental support for the following features:

-

Variadic macros
- Placemarker tokens
- Well defined token-pasting
- Macro scoping mechanism
- New alternative tokens

-

The described features are enabled by the --c++0x command line option - of the Wave driver. Alternatively you can enable these features by - calling the boost::wave::context<>::set_language() function with the - boost::wave::support_cpp0x value.

-

Variadic macros

-

Both variadic macros and placemarker tokens have already been added to C99 - [2]. This represents an unnecessary incompatibility - between C and C++. Adding these facilities to the C++ preprocessor would cause - no code to break that is currently well-defined and would help closing the gap between - C and C++ in this field.

-

Variadic macros were added to the C preprocessor as of C99 [2]. - They are, effectively, a way to pass a variable number of arguments to a macro. - The specific syntax is as follows:

-
    #define A(...) __VA_ARGS__
-    #define B(a, ...) __VA_ARGS__
- 
-    A(1, 2, 3)     // expands to: 1, 2, 3
-    B(1, 2, 3)     // expands to: 2, 3
-
-

The ellipsis is used to denote that the macro can accept any number of trailing - arguments. It must always occur as the last formal parameter of the macro. The - variadic arguments passed to the macro are identified by the special symbol - __VA_ARGS__ in the replacement list of a variadic macro. The use of - this symbol is prohibited in any other context.

-

Placemarker tokens

-

Placemarker tokens (technically, preprocessing tokens) are simply a well-defined - way of passing "nothing" as a macro argument. This facility was also - added to the C preprocessor as of C99 [2].

-
    #define X(p) f(p)
-    X("abc")      // expands to: f("abc")
-    X()           // expands to: f()
- 
-    #define Y(a, b) int[a][b]
-    Y(2, 2)       // expands to: int[2][2]
-    Y(, 2)        // expands to: int[][2]
-
-

Placemarker tokens are a natural counterpart to variadic macros. They formalize the optional nature of a variadic argument (or arguments) so that variadic macros appear similar to the variadic functions, but have been generalized to include named parameters as well. -

-

Well defined token-pasting

-

Currently, as of both C++98 and C99, if token-pasting results in multiple preprocessing - tokens, the behavior is undefined. For example,

-
    #define PASTE(a, b) a ## b
-    PASTE(1, 2)   // okay
-    PASTE(+, -)   // undefined behavior
-

Token-pasting of unrelated tokens (i.e. token-pasting resulting in multiple - preprocessing tokens) is currently undefined for no substantial reason. It is - not dependent on architecture nor is it difficult for an implementation to diagnose. - Furthermore, retokenization is what most, if not all, preprocessors already - do and what most programmers already expect the preprocessor to do. Well-defined - behavior is simply standardizing existing practice and removing an arbitrary - and unnecessary undefined behavior from the standard.

-

To achieve well-defined behavior in this context Wave retokenizes - the result of the token-pasting and inserts the newly created token sequence - as the macro replacement text.

-
    PASTE(+, ==)  // expands to: += =
-

Macro scoping mechanism

-

One of the major problems of the preprocessor is that macro definitions do - not respect any of the scoping mechanisms of the core language. As history has - shown, this is a major inconvenience and drastically increases the likelihood - of name clashes within a translation unit. The solution is to add both a named - and unnamed scoping mechanism to the C++ preprocessor. This limits the scope - of macro definitions without limiting its accessibility. Here are the details. -

-

The scoping mechanism is implemented with the help of three new preprocessor - directives: #region, #endregion - and #import. Additionally it changes minor - details of some of the existing preprocessor directives: #ifdef, - #ifndef and the operator - defined().

-

The #region directive

-

The #region directive starts a new named - or unnamed macro scope.

-

Syntax

-
-

#region <qualified-identifier>

-

Where <qualified-identifier> is an optionally qualified name - defining the name of the region to open.
- This name is optional. If the name is omitted a nameless region is opened. -

-
-

If the qualified identifier starts with an '::' the name is looked - up relative to the global scope (the <qualified-identifier> is - called absolute), if it starts with an identifier, the region is looked - up relative to the current open region (the <qualified-identifier> - is called relative). If the specified region is not defined, it is - created.

-

The #region directive is opaque for all macro - definitions made outside this region, i.e. no macros defined inside of other - regions or at the global scope are directly accessible from inside the opened - region. To access such macros these must be imported (see the #import - directive) or must be referred to through it's qualified name.

-

Regions may be nested.

-

A region may be re-opened (i.e. a #region - directive with the same name is found at the same scope), and macros defined - inside the previous occurences of this region will be visible.

-

Region names and macro names of the same scope are stored into the same symbol - table. This implies, that at one scope there shall not be defined a region and - a macro with the same name.

-

Macros defined inside a nameless region may not be accessed from outside this - region. Further, from inside a nameless region it is not allowed to open an - enclosed region through an absolute name.

-

The argument of the #region directive is - not subject to macro expansion before it is evaluated.

-

The following is a small code sample, which shows possible usages of preprocessor - regions.

-
    #define A() 1
-    
-    /////////////////////////////////////
-    #region region_A
-    # define B() 2
- 
-    /////////////////////////////////////
-    # region region_B
-    #  define C() 3
-    A() // expands to: A()
-    B() // expands to: B()
-    C() // expands to: 3
-    # endregion // region_B
-    /////////////////////////////////////
- 
-    A() // expands to: A()
-    B() // expands to: 2
-    C() // expands to: C()
-    region_B::C()             // expands to: 3
-    ::region_A::region_B::C() // expands to: 3
-    #endregion // region_A
-    /////////////////////////////////////
-
-    A() // expands to: 1
-    B() // expands to: B()
-    region_A::B()   // expands to: 2
-    ::region_A::B() // expands to: 2
-    region_A::region_B::C()   // expands to: 3
-    ::region_A::region_B::C() // expands to: 3
- 
-    #define region_A ... // error, name clash with region_A
-    #region A            // error, name clash with macro A
-    #endregion
-
-

The #endregion directive

-

The #endregion directive closes the last - macro scope opened with a #region directive - .

-

Syntax

-
-

#endregion

-
-

The #endregion directive is opaque for all - macros defined inside the closed region. Macros defined inside this region may - be accessed from outside of this region only if imported (see the - #import directive) or if referenced through qualified names specifying - the region and the macro name and if the region isn't unnamed.

-

The #region and #endregion - directives shall be balanced over the whole translation unit. Otherwise an error - is raised.

-

The #import directive

-

The #import directive allows to import macros - or whole macro scopes into the current macro scope.

-

Syntax

-
-

#import <qualified-identifier> [, <qualified-identifier> - ...]

-
-
-

Where <qualified-identifier> is an optionally qualified name - defining the name of the macro or region to import. The #import - directive may specify one or more comma separated qualified names.

-
-

If the qualified identifier starts with an '::' the name is looked - up relative to the global scope (the <qualified-identifier> is - called absolute), if it starts with an identifier, the region is looked - up relative to the current open region (the <qualified-identifier> - is called relative).

-

If <qualified-identifier> refers to a macro, then the referenced - macro definition is made available in the current region, just if it were defined - here. Both macro definitions (the original macro definition and the imported - one) refer to the same macro. This is significant for disabling of a certain - macro during the rescanning of a replacement list. If one of the different instances - of the macro definition is marked as disabled for expansion, the others are - marked as disabled for expansion too.

-

If <qualified-identifier> refers to a region, then

-
    -
  • all macro definitions of the referenced region are made available in the - current region, just if these were defined here.
  • -
  • all sub-regions of the referenced region are made available from the current - region, just if these were defined as direct sub-regions of the current region.
  • -
-

Imported macros may be undefined with the #undef - directive as usual. This removes the referenced macro from the current region, - but leaves it unchanged in the original region, where it was defined initially.
-
- The argument of the #import directive is not - subject to macro expansion before it is evaluated.

-

Changes to the #ifdef, #ifndef directives and the operator defined()

-

To fully support macro regions, the #ifdef - and #ifndef directives and the operator - defined() may be used with qualified identifiers as its arguments too. - Therefor the following sample is completely wellformed (courtesy to Paul Mensonides):

-
    # ifndef ::CHAOS_PREPROCESSOR::chaos::WSTRINGIZE_HPP
-    # region ::CHAOS_PREPROCESSOR::chaos
-    #
-    # define WSTRINGIZE_HPP
-    #
-    # include <chaos/experimental/cat.hpp>
-    #
-    # // wstringize
-    #
-    # define wstringize(...) \
-        chaos::primitive_wstringize(__VA_ARGS__) \
-        /**/
-    #
-    # // primitive_wstringize
-    #
-    # define primitive_wstringize(...) \
-        chaos::primitive_cat(L, #__VA_ARGS__) \
-        /**/
-    #
-    # endregion
-    # endif
-
-    # import ::CHAOS_PREPROCESSOR
- 
-    chaos::wstringize(a,b,c) // L"a,b,c"
-
-

In the context of the #ifdef and #ifndef - directives and the operator defined() a qualified - macro name is considered to be defined if:

-
    -
  • all regions referenced by the qualified name exist (opened at least once) - and
  • -
  • the referenced macro scope contains the definition of a macro with the given - name.
  • -
-

New alternative tokens

-

Vesa Karvonen recently suggested on the Boost - mailing list the following addition to the preprocessor, which is implemented - by Wave in C++0x mode.

-

Consider the following example:

-
    #define ID(x) x
-    ID( (         )
-    ID(   a , b   )
-    ID(         ) )
-

The macro expansion of the above preprocessor code does not produce the intended - result:

-
    ( a , b )
-

The basic idea is that the keywords __lparen__, __rparen__ - and __comma__ could be used in place of '(', - ')' and ',', respectively. - The
- above example would now become:

-
    #define ID(x) x
-    ID( __lparen__                          )
-    ID(            a __comma__ b            )
-    ID(                          __rparen__ )
-

and it would expand into:

-
    __lparen__ a __comma__ b __rparen__
-

which would be recognized in translation phases after macro replacement as - equivalent to the token sequence:

-
    ( a , b )
-

This trivial extension makes it an order of magnitude easier to generate C++ - code using the C++ preprocessor.

- - - - - - - -
-
- -Last updated: -Wednesday, January 28, 2004 17:04 - -

 

- - diff --git a/doc/quickstart.html b/doc/quickstart.html index 781c865..580219f 100644 --- a/doc/quickstart.html +++ b/doc/quickstart.html @@ -45,7 +45,7 @@ Standard (such as for variadics and placemarkers)
the iterator type of the underlying input stream to use and the type of the lexer iterator to be used as the token source for the preprocessing engine.

Do not instantiate the main, preprocessing iterators yourself. Get them from the wave::context object instead.
-The following code snippet is taken from the quick_start sample, which shows a minimal usage scenario for Wave.

+The following code snippet is taken from the quick_start sample, which shows a minimal usage scenario for Wave.

    // The following preprocesses a given input file.
     // Open the file and read it into a string variable
     std::ifstream instream("input.cpp");
@@ -65,12 +65,12 @@ The following code snippet is taken from the typedef boost::wave::cpplexer::lex_iterator<
             boost::wave::cpplexer::lex_token<> >
-        lex_iterator_t;
+        lex_iterator_type;
     typedef boost::wave::context<
-            std::string::iterator, lex_iterator_t>
-        context_t;
+            std::string::iterator, lex_iterator_type>
+        context_type;
 
-    context_t ctx(input.begin(), input.end(), "input.cpp");
+    context_type ctx(input.begin(), input.end(), "input.cpp");
 
     // At this point you may want to set the parameters of the
     // preprocessing as include pathes and/or predefined macros.
@@ -79,8 +79,8 @@ The following code snippet is taken from the     // Get the preprocessor iterators and use them to generate 
     // the token sequence.
-    context_t::iterator_t first = ctx.begin();
-    context_t::iterator_t last = ctx.end();
+    context_type::iterator_type first = ctx.begin();
+    context_type::iterator_type last = ctx.end();
 
     // The input stream is preprocessed for you during iteration
// over [first, last)
while (first != last) { std::cout << (*first).get_value(); @@ -112,10 +112,10 @@ Note though, that this filename is used
-Last updated: - Thursday, February 12, 2004 6:42 - +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)

+ + + diff --git a/doc/references.html b/doc/references.html index ce3894d..681f93b 100644 --- a/doc/references.html +++ b/doc/references.html @@ -91,10 +91,10 @@
-Last updated: - Wednesday, January 28, 2004 17:04 - + 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)

+ + + diff --git a/doc/samples.html b/doc/samples.html index 0aec043..361a081 100644 --- a/doc/samples.html +++ b/doc/samples.html @@ -85,10 +85,12 @@ preprocessed tokens generated from a given input file. It is described in more d
-Last updated: -Saturday, January 31, 2004 13:08 - +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)

+ +

 

diff --git a/doc/supported_pragmas.html b/doc/supported_pragmas.html index 99c0397..d7cd57e 100644 --- a/doc/supported_pragmas.html +++ b/doc/supported_pragmas.html @@ -117,12 +117,12 @@
-Last updated: -Wednesday, January 28, 2004 17:04 - +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)

+ +

 

diff --git a/doc/theme/style.css b/doc/theme/style.css index e08f9a1..4ffecb9 100644 --- a/doc/theme/style.css +++ b/doc/theme/style.css @@ -1,3 +1,7 @@ +/* Use, modification and distribution is subject to 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) + */ body { background-image: url(bkd.gif); diff --git a/doc/token_ids.html b/doc/token_ids.html index aff9739..1d3e7b1 100644 --- a/doc/token_ids.html +++ b/doc/token_ids.html @@ -963,10 +963,10 @@
-Last updated: - Wednesday, January 28, 2004 17:04 - + 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)

+ + + diff --git a/doc/tracing_facility.html b/doc/tracing_facility.html index 4c2bed3..8355f23 100644 --- a/doc/tracing_facility.html +++ b/doc/tracing_facility.html @@ -57,7 +57,7 @@ // this macro expansion is to be traced CONCAT(X(1), Y()) // should expand to 12 #pragma wave trace(disable)
-

When preprocessed with 'wave -t test.trace test.cpp' the WaveWednesday, January 28, 2004 17:04e +

When preprocessed with 'wave -t test.trace test.cpp' the WaveFriday, May 21, 2004 8:18Date -->e numbers in front of the lines):

  1: test.cpp(8): CONCAT(X(1), Y())
   2:   test.cpp(5): see macro definition: CONCAT(x, y)
@@ -150,12 +150,12 @@
 
-Last updated: -Sunday, January 4, 2004 0:17 - +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)

+ + -Wednesday, January 28, 2004 17:04 \ No newline at end of file +Wednesday, January 28, 2004 17:04Friday, May 21, 2004 8:18 \ No newline at end of file diff --git a/doc/wave_driver.html b/doc/wave_driver.html index fdf8120..b237e8a 100644 --- a/doc/wave_driver.html +++ b/doc/wave_driver.html @@ -20,7 +20,7 @@
- + @@ -52,8 +52,7 @@ --timer output overall elapsed computing time --variadics: enable variadics and placemarkers in C++ mode --c99: enable C99 mode (implies variadics and placemarkers) - --c++0x: enable C++0x support (implies --variadics) - +

The possible options are straightforward and self explanatory. The following describes some of these options in more detail. Please note, that @@ -70,7 +69,7 @@

Add the given directory to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched - before the system header file directories.Wednesday, January 28, 2004 17:04-right order, the system directories + before the system header file directories.Friday, May 21, 2004 8:18-right order, the system directories come after.

-I- [--include-] option

@@ -157,20 +156,7 @@ specific token types as for '::', '->*' and '->.'. Several predefined macros are different for this mode, for more information about predefined macros you may look here. -
- Note that the --c99 and the --c++0x options are mutually exclusive. If both - options are given a diagnostic is provided and the C99 mode is assumed.

-
-

--c++0x

-
-

Enable the (experimental) C++0x mode. This mode enables certain - C++ features, which are to be proposed for the new C++ Standard as macro scopes, - variadics, placemarkers and well defined pasting of unrelated tokens.
- Note that the --c99 and the --c++0x options are mutually exclusive. If both - options are given a diagnostic is provided and the C99 mode is assumed.

-

This option is available only, if the library was compiled with - the WAVE_ENABLE_CPP0X_EXTENSIONS compile time constant defined (for - more information about this constant please refere here).

+

@ [--config-file] option

@@ -199,17 +185,17 @@ - +
-Last updated: - Wednesday, January 28, 2004 17:04 - +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)

+ + + diff --git a/include/boost/wave.hpp b/include/boost/wave.hpp index e5eb805..0931e9f 100644 --- a/include/boost/wave.hpp +++ b/include/boost/wave.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(WAVE_HPP_DCA0EA51_EF5B_4BF1_88A8_461DBC5F292B_INCLUDED) diff --git a/include/boost/wave/cpp_context.hpp b/include/boost/wave/cpp_context.hpp index 5bb116c..f929172 100644 --- a/include/boost/wave/cpp_context.hpp +++ b/include/boost/wave/cpp_context.hpp @@ -1,14 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Definition of the preprocessor context - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_CONTEXT_HPP_907485E2_6649_4A87_911B_7F7225F3E5B8_INCLUDED) @@ -74,33 +72,34 @@ public: BOOST_CLASS_REQUIRE(IteratorT, boost, ForwardIteratorConcept); // public typedefs - typedef typename LexIteratorT::token_t token_t; + typedef typename LexIteratorT::token_type token_type; typedef context - self_t; + self_type; - typedef IteratorT target_iterator_t; - typedef LexIteratorT lex_t; - typedef pp_iterator iterator_t; + typedef IteratorT target_iterator_type; + typedef LexIteratorT lexer_type; + typedef pp_iterator iterator_type; - typedef InputPolicyT input_policy_t; - typedef typename token_t::position_t position_t; + typedef InputPolicyT input_policy_type; + typedef typename token_type::position_type position_type; // type of a token sequence - typedef std::list > - token_sequence_t; + typedef std::list > + token_sequence_type; // types of the policies - typedef TraceT trace_policy_t; + typedef TraceT trace_policy_type; private: // stack of shared_ptr's to the pending iteration contexts - typedef boost::shared_ptr > iteration_ptr_t; - typedef boost::wave::util::iteration_context_stack - iteration_context_stack_t; - typedef typename iteration_context_stack_t::size_type iter_size_t; + typedef boost::shared_ptr > + iteration_ptr_type; + typedef boost::wave::util::iteration_context_stack + iteration_context_stack_type; + typedef typename iteration_context_stack_type::size_type iter_size_type; public: - context(target_iterator_t const &first_, target_iterator_t const &last_, + context(target_iterator_type const &first_, target_iterator_type const &last_, char const *fname = "", TraceT const &trace_ = TraceT()) : first(first_), last(last_), filename(fname) #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 @@ -114,13 +113,13 @@ public: } // iterator interface - iterator_t begin() + iterator_type begin() { - return iterator_t(*this, first, last, position_t(filename.c_str()), + return iterator_type(*this, first, last, position_type(filename.c_str()), get_language()); } - iterator_t end() const - { return iterator_t(); } + iterator_type end() const + { return iterator_type(); } // maintain include paths bool add_include_path(char const *path_) @@ -128,7 +127,7 @@ public: bool add_sysinclude_path(char const *path_) { return includes.add_include_path(path_, true);} void set_sysinclude_delimiter() { includes.set_sys_include_delimiter(); } - typename iteration_context_stack_t::size_type get_iteration_depth() const + typename iteration_context_stack_type::size_type get_iteration_depth() const { return iter_ctxs.size(); } // maintain defined macros @@ -138,15 +137,15 @@ public: { return boost::wave::util::add_macro_definition(*this, macrostring, is_predefined, get_language()); } #endif - bool add_macro_definition(token_t const &name, bool has_params, - std::vector ¶meters, token_sequence_t &definition, + bool add_macro_definition(token_type const &name, bool has_params, + std::vector ¶meters, token_sequence_type &definition, bool is_predefined = false) { return macros.add_macro(name, has_params, parameters, definition, is_predefined); } template bool is_defined_macro(IteratorT2 const &begin, IteratorT2 const &end) { return macros.is_defined(begin, end); } - bool remove_macro_definition(typename token_t::string_t const &name, + bool remove_macro_definition(typename token_type::string_type const &name, bool even_predefined = false) { return macros.remove_macro(name, even_predefined); } void reset_macro_definitions() @@ -166,24 +165,25 @@ public: boost::wave::language_support get_language() const { return language; } // change and ask for maximal possible include nesting depth - void set_max_include_nesting_depth(iter_size_t new_depth) + void set_max_include_nesting_depth(iter_size_type new_depth) { iter_ctxs.set_max_include_nesting_depth(new_depth); } - iter_size_t get_max_include_nesting_depth() const + iter_size_type get_max_include_nesting_depth() const { return iter_ctxs.get_max_include_nesting_depth(); } // enable/disable tracing void enable_tracing(trace_policies::trace_flags enable) - { trace.enable_tracing(enable); } + { trace.enable_tracing(enable); } trace_policies::trace_flags tracing_enabled() - { return trace.tracing_enabled(); } - trace_policy_t &get_trace_policy() { return trace; } + { return trace.tracing_enabled(); } + trace_policy_type &get_trace_policy() + { return trace; } #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) protected: friend class boost::wave::pp_iterator< - boost::wave::context >; + boost::wave::context >; friend class boost::wave::impl::pp_iterator_functor< - boost::wave::context >; + boost::wave::context >; #endif // maintain include pathes (helper functions) @@ -191,7 +191,7 @@ protected: char const *current_file) const { return includes.find_include_file(s, is_system, current_file); } void set_current_directory(char const *path_) - { includes.set_current_directory(path_); } + { includes.set_current_directory(path_); } // conditional compilation contexts bool get_if_block_status() const { return ifblocks.get_status(); } @@ -205,12 +205,12 @@ protected: { return ifblocks.get_if_block_depth(); } // stack of iteration contexts - iteration_ptr_t pop_iteration_context() - { iteration_ptr_t top = iter_ctxs.top(); iter_ctxs.pop(); return top; } - void push_iteration_context(position_t const &act_pos, iteration_ptr_t iter_ctx) + iteration_ptr_type pop_iteration_context() + { iteration_ptr_type top = iter_ctxs.top(); iter_ctxs.pop(); return top; } + void push_iteration_context(position_type const &act_pos, iteration_ptr_type iter_ctx) { iter_ctxs.push(act_pos, iter_ctx); } - position_t &get_main_pos() { return macros.get_main_pos(); } + position_type &get_main_pos() { return macros.get_main_pos(); } /////////////////////////////////////////////////////////////////////////////// // @@ -224,8 +224,8 @@ protected: // /////////////////////////////////////////////////////////////////////////////// template - token_t expand_tokensequence(IteratorT2 &first, IteratorT2 const &last, - token_sequence_t &pending, token_sequence_t &expanded, + token_type expand_tokensequence(IteratorT2 &first, IteratorT2 const &last, + token_sequence_type &pending, token_sequence_type &expanded, bool expand_undefined = false) { return macros.expand_tokensequence(first, last, pending, expanded, @@ -234,7 +234,7 @@ protected: template void expand_whole_tokensequence(IteratorT2 &first, IteratorT2 const &last, - token_sequence_t &expanded, bool expand_undefined = true) + token_sequence_type &expanded, bool expand_undefined = true) { bool seen_qualified_name = false; macros.expand_whole_tokensequence(expanded, first, last, @@ -244,18 +244,6 @@ protected: boost::wave::util::impl::remove_placeholders(expanded); } -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -// experimental: macro scoping support - template - void import_name(IteratorT2 const &begin, IteratorT2 const &end) - { macros.import_name(begin, end); } - template - void begin_scope(IteratorT2 const &begin, IteratorT2 const &end) - { macros.begin_scope(begin, end); } - void begin_unnamed_scope() { macros.begin_unnamed_scope(); } - void end_scope() { macros.end_scope(); } -#endif - public: #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 // support for #pragma once @@ -273,8 +261,8 @@ public: #endif template - bool interpret_pragma(ContainerT &pending, token_t const &option, - ContainerT const &values, token_t const &act_token, + bool interpret_pragma(ContainerT &pending, token_type const &option, + ContainerT const &values, token_type const &act_token, boost::wave::language_support language) { return trace.interpret_pragma(pending, option, values, act_token, @@ -283,19 +271,19 @@ public: private: // the main input stream - target_iterator_t const &first; // underlying input stream - target_iterator_t const &last; - std::string filename; // associated main filename + target_iterator_type const &first; // underlying input stream + target_iterator_type const &last; + std::string filename; // associated main filename #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 - std::string current_filename; // real name of current preprocessed file + std::string current_filename; // real name of current preprocessed file #endif - boost::wave::util::if_block_stack ifblocks; // conditional compilation contexts - boost::wave::util::include_pathes includes; // lists of include directories to search - iteration_context_stack_t iter_ctxs; // iteration contexts - boost::wave::util::macromap macros; // map of defined macros - boost::wave::language_support language; // supported language/extensions - trace_policy_t trace; // trace policy instance + boost::wave::util::if_block_stack ifblocks; // conditional compilation contexts + boost::wave::util::include_pathes includes; // lists of include directories to search + iteration_context_stack_type iter_ctxs; // iteration contexts + boost::wave::util::macromap macros; // map of defined macros + boost::wave::language_support language; // supported language/extensions + trace_policy_type trace; // trace policy instance }; /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/wave/cpp_exceptions.hpp b/include/boost/wave/cpp_exceptions.hpp index 5658935..509a38d 100644 --- a/include/boost/wave/cpp_exceptions.hpp +++ b/include/boost/wave/cpp_exceptions.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_EXCEPTIONS_HPP_5190E447_A781_4521_A275_5134FF9917D7_INCLUDED) @@ -150,8 +149,6 @@ public: ill_formed_pragma_option, include_nesting_too_deep, misplaced_operator, - unexpected_endregion, - illegal_global_region, alreadydefined_name, undefined_macroname, invalid_macroname, @@ -217,13 +214,10 @@ public: "unknown or illformed pragma option", // ill_formed_pragma_option "include files nested too deep", // include_nesting_too_deep "misplaced operator defined()", // misplaced_operator - "unexpected " BOOST_WAVE_PP_ENDREGION " at global scope", // unexpected_endregion - "a global " BOOST_WAVE_PP_REGION " may not be opened " - "inside a nameless " BOOST_WAVE_PP_REGION, // illegal_global_region "the name is already used in this scope as " "a macro or scope name", // alreadydefined_name "undefined macro or scope name may not be imported", // undefined_macroname - "ill formed macro name or " BOOST_WAVE_PP_REGION " name", // invalid_macroname + "ill formed macro name", // invalid_macroname "qualified names are supported in C++0x mode only", // unexpected_qualified_name "division by zero in preprocessor expression" // division_by_zero }; @@ -261,8 +255,6 @@ public: util::severity_warning, // ill_formed_pragma_option util::severity_fatal, // include_nesting_too_deep util::severity_error, // misplaced_operator - util::severity_error, // unexpected_endregion - util::severity_error, // illegal_global_region util::severity_error, // alreadydefined_name util::severity_error, // undefined_macroname util::severity_error, // invalid_macroname diff --git a/include/boost/wave/cpp_iteration_context.hpp b/include/boost/wave/cpp_iteration_context.hpp index 7c256d9..3e3b763 100644 --- a/include/boost/wave/cpp_iteration_context.hpp +++ b/include/boost/wave/cpp_iteration_context.hpp @@ -1,14 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Definition of the preprocessor context - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_ITERATION_CONTEXT_HPP_00312288_9DDB_4668_AFE5_25D3994FD095_INCLUDED) @@ -58,7 +56,7 @@ namespace iteration_context_policies { void init_iterators(IterContextT &iter_ctx, PositionT const &act_pos) { - typedef typename IterContextT::iterator_t iterator_t; + typedef typename IterContextT::iterator_type iterator_type; std::ifstream instream(iter_ctx.filename.c_str()); if (!instream.is_open()) { @@ -78,10 +76,10 @@ namespace iteration_context_policies { std::istreambuf_iterator()); #endif // defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) - iter_ctx.first = iterator_t(iter_ctx.instring.begin(), + iter_ctx.first = iterator_type(iter_ctx.instring.begin(), iter_ctx.instring.end(), PositionT(iter_ctx.filename), iter_ctx.language); - iter_ctx.last = iterator_t(); + iter_ctx.last = iterator_type(); } private: @@ -110,7 +108,7 @@ namespace iteration_context_policies { void init_iterators(IterContextT &iter_ctx, PositionT const &act_pos) { - typedef typename IterContextT::iterator_t iterator_t; + typedef typename IterContextT::iterator_type iterator_type; iter_ctx.instream.open(iter_ctx.filename.c_str()); if (!iter_ctx.instream.is_open()) { @@ -120,12 +118,12 @@ namespace iteration_context_policies { iter_ctx.instream.unsetf(std::ios::skipws); using boost::spirit::make_multi_pass; - iter_ctx.first = iterator_t( + iter_ctx.first = iterator_type( make_multi_pass(std::istreambuf_iterator( iter_ctx.instream.rdbuf())), make_multi_pass(std::istreambuf_iterator()), PositionT(iter_ctx.filename), iter_ctx.language); - iter_ctx.last = iterator_t(); + iter_ctx.last = iterator_type(); } private: @@ -171,18 +169,18 @@ struct iteration_context public InputPolicyT::template inner > { - typedef IteratorT iterator_t; - typedef typename IteratorT::token_t::position_t position_t; + typedef IteratorT iterator_type; + typedef typename IteratorT::token_type::position_type position_type; - typedef iteration_context self_t; + typedef iteration_context self_type; iteration_context(BOOST_WAVE_STRINGTYPE const &fname, - position_t const &act_pos, + position_type const &act_pos, boost::wave::language_support language_) : base_iteration_context(fname), language(language_) { - InputPolicyT::template inner::init_iterators(*this, act_pos); + InputPolicyT::template inner::init_iterators(*this, act_pos); } boost::wave::language_support language; diff --git a/include/boost/wave/cpplexer/cpp_lex_interface.hpp b/include/boost/wave/cpplexer/cpp_lex_interface.hpp index 3125727..6bae13e 100644 --- a/include/boost/wave/cpplexer/cpp_lex_interface.hpp +++ b/include/boost/wave/cpplexer/cpp_lex_interface.hpp @@ -3,12 +3,11 @@ Definition of the abstract lexer interface - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_LEX_INTERFACE_HPP_E83F52A4_90AC_4FBE_A9A7_B65F7F94C497_INCLUDED) @@ -31,7 +30,7 @@ template struct lex_input_interface; template < typename IteratorT, - typename PositionT = boost::wave::util::file_position_t + typename PositionT = boost::wave::util::file_position_type > struct new_lexer_gen { @@ -54,10 +53,10 @@ struct new_lexer_gen template struct lex_input_interface { - typedef typename TokenT::position_t position_t; + typedef typename TokenT::position_type position_type; virtual TokenT get() = 0; - virtual void set_position(position_t const &pos) = 0; + virtual void set_position(position_type const &pos) = 0; virtual ~lex_input_interface() {} @@ -67,9 +66,9 @@ struct lex_input_interface template static lex_input_interface * new_lexer(IteratorT const &first, IteratorT const &last, - position_t const &pos, boost::wave::language_support language) + position_type const &pos, boost::wave::language_support language) { - return new_lexer_gen::new_lexer (first, last, + return new_lexer_gen::new_lexer (first, last, pos, language); } }; diff --git a/include/boost/wave/cpplexer/cpp_lex_iterator.hpp b/include/boost/wave/cpplexer/cpp_lex_iterator.hpp index 41322ed..7b45608 100644 --- a/include/boost/wave/cpplexer/cpp_lex_iterator.hpp +++ b/include/boost/wave/cpplexer/cpp_lex_iterator.hpp @@ -3,12 +3,11 @@ Definition of the lexer iterator - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_LEX_ITERATOR_HPP_AF0C37E3_CBD8_4F33_A225_51CF576FA61F_INCLUDED) @@ -45,7 +44,7 @@ class lex_iterator_functor_shim public: template lex_iterator_functor_shim(IteratorT const &first, IteratorT const &last, - typename TokenT::position_t const &pos, + typename TokenT::position_type const &pos, boost::wave::language_support language) : functor_ptr(lex_input_interface ::new_lexer(first, last, pos, language)) @@ -61,7 +60,7 @@ public: BOOST_ASSERT(0 != functor_ptr.get()); return functor_ptr->get(); } - void set_position(typename TokenT::position_t const &pos) + void set_position(typename TokenT::position_type const &pos) { BOOST_ASSERT(0 != functor_ptr.get()); functor_ptr->set_position(pos); @@ -85,17 +84,22 @@ typename lex_iterator_functor_shim::result_type const // lex_iterator // // A generic C++ lexer interface class, which allows to plug in different -// lexer implementations (template parameter LexT). The following -// requirement apply: +// lexer implementations. The interface between the lexer tzpe used and +// the preprocessor component depends on the token type only (template +// parameter TokenT). +// Additionally, the following requirements apply: // // - the lexer type should have a function implemented, which returnes // the next lexed token from the input stream: -// typename LexT::token_t get(); +// typename TokenT get(); // - at the end of the input stream this function should return the // eof token equivalent // - the lexer should implement a constructor taking two iterators -// pointing to the beginning and the end of the input stream and +// pointing to the beginning and the end of the input stream, // a third parameter containing the name of the parsed input file +// and a 4th parameter of the type boost::wave::language_support +// which specifies, which language subset should be supported (C++, +// C99, C++0x etc.). // /////////////////////////////////////////////////////////////////////////////// @@ -106,24 +110,24 @@ class lex_iterator boost::wave::util::functor_input > { - typedef impl::lex_iterator_functor_shim input_policy_t; + typedef impl::lex_iterator_functor_shim input_policy_type; typedef - boost::spirit::multi_pass base_t; - typedef lex_iterator self_t; + typedef lex_iterator self_type; public: - typedef TokenT token_t; + typedef TokenT token_type; lex_iterator() {} template lex_iterator(IteratorT const &first, IteratorT const &last, - typename TokenT::position_t const &pos, + typename TokenT::position_type const &pos, boost::wave::language_support language) - : base_t(input_policy_t(first, last, pos, language)) + : base_t(input_policy_type(first, last, pos, language)) {} }; diff --git a/include/boost/wave/cpplexer/cpp_lex_token.hpp b/include/boost/wave/cpplexer/cpp_lex_token.hpp index 237a71c..104f7c5 100644 --- a/include/boost/wave/cpplexer/cpp_lex_token.hpp +++ b/include/boost/wave/cpplexer/cpp_lex_token.hpp @@ -3,12 +3,11 @@ A generic C++ lexer token definition - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_TOKEN_HPP_53A13BD2_FBAA_444B_9B8B_FCB225C2BBA8_INCLUDED) @@ -26,7 +25,7 @@ namespace cpplexer { /////////////////////////////////////////////////////////////////////////////// // forward declaration of the token type -template +template class lex_token; /////////////////////////////////////////////////////////////////////////////// @@ -39,31 +38,31 @@ template class lex_token { public: - typedef BOOST_WAVE_STRINGTYPE string_t; - typedef PositionT position_t; + typedef BOOST_WAVE_STRINGTYPE string_type; + typedef PositionT position_type; lex_token() : id(T_EOI) {} - lex_token(token_id id_, string_t const &value_, PositionT const &pos_) + lex_token(token_id id_, string_type const &value_, PositionT const &pos_) : id(id_), value(value_), pos(pos_) {} // accessors operator token_id() const { return id; } - string_t const &get_value() const { return value; } - position_t const &get_position() const { return pos; } + string_type const &get_value() const { return value; } + position_type const &get_position() const { return pos; } void set_token_id (token_id id_) { id = id_; } - void set_value (string_t const &newval) { value = newval; } - void set_position (position_t const &pos_) { pos = pos_; } + void set_value (string_type const &newval) { value = newval; } + void set_position (position_type const &pos_) { pos = pos_; } // debug support #if BOOST_WAVE_DUMP_PARSE_TREE != 0 // access functions for the tree_to_xml functionality static int get_token_id(lex_token const &t) { return ID_FROM_TOKEN(token_id(t)); } - static string_t get_token_value(lex_token const &t) + static string_type get_token_value(lex_token const &t) { return t.get_value(); } #endif @@ -87,7 +86,7 @@ public: private: token_id id; // the token id - string_t value; // the text, which was parsed into this token + string_type value; // the text, which was parsed into this token PositionT pos; // the original file position }; diff --git a/include/boost/wave/cpplexer/cpplexer_exceptions.hpp b/include/boost/wave/cpplexer/cpplexer_exceptions.hpp index 32c54fa..b9ccc28 100644 --- a/include/boost/wave/cpplexer/cpplexer_exceptions.hpp +++ b/include/boost/wave/cpplexer/cpplexer_exceptions.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPPLEXER_EXCEPTIONS_HPP_1A09DE1A_6D1F_4091_AF7F_5F13AB0D31AB_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/aq.hpp b/include/boost/wave/cpplexer/re2clex/aq.hpp index 1694686..cd093f7 100644 --- a/include/boost/wave/cpplexer/re2clex/aq.hpp +++ b/include/boost/wave/cpplexer/re2clex/aq.hpp @@ -1,13 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001 Daniel C. Nuffer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - - Use, modification and distribution is subject to 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) + + Copyright (c) 2001 Daniel C. Nuffer. + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/cpp.re.hpp b/include/boost/wave/cpplexer/re2clex/cpp.re.hpp index be54364..d1396d6 100644 --- a/include/boost/wave/cpplexer/re2clex/cpp.re.hpp +++ b/include/boost/wave/cpplexer/re2clex/cpp.re.hpp @@ -3,12 +3,11 @@ Re2C based C++ lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_RE_HPP_B76C4F5E_63E9_4B8A_9975_EC32FA6BF027_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp b/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp index da1f668..b7b917d 100644 --- a/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp +++ b/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp @@ -3,12 +3,11 @@ Re2C based C++ lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_RE2C_LEXER_HPP_B81A2629_D5B1_4944_A97D_60254182B9A8_INCLUDED) @@ -50,15 +49,15 @@ namespace re2clex { // /////////////////////////////////////////////////////////////////////////////// -template +template class lexer { public: typedef char char_t; typedef Scanner base_t; - typedef lex_token token_t; - typedef typename token_t::string_t string_t; + typedef lex_token token_type; + typedef typename token_type::string_type string_type; lexer(IteratorT const &first, IteratorT const &last, PositionT const &pos, boost::wave::language_support language); @@ -79,11 +78,11 @@ private: static char const *tok_names[]; Scanner scanner; - string_t filename; - string_t value; + string_type filename; + string_type value; bool at_eof; - token_cache token_cache; + token_cache token_cache; }; /////////////////////////////////////////////////////////////////////////////// @@ -112,9 +111,6 @@ lexer::lexer(IteratorT const &first, #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 scanner.act_in_c99_mode = boost::wave::need_c99(language); -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - scanner.act_in_cpp0x_mode = boost::wave::need_cpp0x(language); -#endif #endif boost::ignore_unused_variable_warning(language); @@ -142,14 +138,14 @@ lexer::get() switch (id) { case T_IDENTIFIER: // test identifier characters for validity (throws if invalid chars found) - value = string_t((char const *)scanner.tok, scanner.cur-scanner.tok); + value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); impl::validate_identifier_name(value, scanner.line, -1, filename); break; case T_STRINGLIT: case T_CHARLIT: // test literal characters for validity (throws if invalid chars found) - value = string_t((char const *)scanner.tok, scanner.cur-scanner.tok); + value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); impl::validate_literal(value, scanner.line, -1, filename); break; @@ -158,8 +154,8 @@ lexer::get() case T_PP_QHEADER: case T_PP_INCLUDE: // convert to the corresponding ..._next token, if appropriate - value = string_t((char const *)scanner.tok, scanner.cur-scanner.tok); - if (string_t::npos != value.find("include_")) + value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); + if (string_type::npos != value.find("include_")) id = token_id(id | AltTokenType); break; #endif @@ -175,7 +171,7 @@ lexer::get() case T_SPACE: case T_SPACE2: case T_ANY: - value = string_t((char const *)scanner.tok, scanner.cur-scanner.tok); + value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); break; case T_EOF: @@ -188,7 +184,7 @@ lexer::get() if (CATEGORY_FROM_TOKEN(id) != EXTCATEGORY_FROM_TOKEN(id) || IS_CATEGORY(id, UnknownTokenType)) { - value = string_t((char const *)scanner.tok, scanner.cur-scanner.tok); + value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); } else { value = token_cache.get_token_value(id); @@ -226,13 +222,13 @@ lexer::report_error(Scanner *s, char *msg, ...) // /////////////////////////////////////////////////////////////////////////////// -template +template class lex_functor -: public lex_input_interface::token_t> +: public lex_input_interface::token_type> { public: - typedef typename lexer::token_t token_t; + typedef typename lexer::token_type token_type; lex_functor(IteratorT const &first, IteratorT const &last, PositionT const &pos, boost::wave::language_support language) @@ -241,7 +237,7 @@ public: virtual ~lex_functor() {} // get the next token from the input stream - token_t get() { return lexer.get(); } + token_type get() { return lexer.get(); } void set_position(PositionT const &pos) { lexer.set_position(pos); } @@ -253,7 +249,7 @@ private: /////////////////////////////////////////////////////////////////////////////// // -// The new_lexer_gen<>::new_lexer function (declared in cpp_slex_token.hpp) +// The new_lexer_gen<>::new_lexer function (declared in cpp_lex_interface.hpp) // should be defined inline, if the lex_functor shouldn't be instantiated // separately from the lex_iterator. // diff --git a/include/boost/wave/cpplexer/re2clex/scanner.hpp b/include/boost/wave/cpplexer/re2clex/scanner.hpp index 5e3830a..f65fbe6 100644 --- a/include/boost/wave/cpplexer/re2clex/scanner.hpp +++ b/include/boost/wave/cpplexer/re2clex/scanner.hpp @@ -1,13 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001 Daniel C. Nuffer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - - Use, modification and distribution is subject to 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) + + Copyright (c) 2001 Daniel C. Nuffer. + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED) diff --git a/include/boost/wave/cpplexer/token_cache.hpp b/include/boost/wave/cpplexer/token_cache.hpp index 020760e..b28c5b3 100644 --- a/include/boost/wave/cpplexer/token_cache.hpp +++ b/include/boost/wave/cpplexer/token_cache.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(TOKEN_CACHE_HPP_4D2320B7_1D56_4113_A114_397E70FA438C_INCLUDED) diff --git a/include/boost/wave/cpplexer/validate_universal_char.hpp b/include/boost/wave/cpplexer/validate_universal_char.hpp index e6e6040..5b1d3c3 100644 --- a/include/boost/wave/cpplexer/validate_universal_char.hpp +++ b/include/boost/wave/cpplexer/validate_universal_char.hpp @@ -3,12 +3,11 @@ Grammar for universal character validation (see C++ standard: Annex E) - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(VALIDATE_UNIVERSAL_CHAR_HPP_55F1B811_CD76_4C72_8344_CBC69CF3B339_INCLUDED) #define VALIDATE_UNIVERSAL_CHAR_HPP_55F1B811_CD76_4C72_8344_CBC69CF3B339_INCLUDED diff --git a/include/boost/wave/grammars/cpp_chlit_grammar.hpp b/include/boost/wave/grammars/cpp_chlit_grammar.hpp index fb6e410..e2290dc 100644 --- a/include/boost/wave/grammars/cpp_chlit_grammar.hpp +++ b/include/boost/wave/grammars/cpp_chlit_grammar.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_CHLIT_GRAMMAR_HPP_9527D349_6592_449A_A409_42A001E6C64C_INCLUDED) @@ -209,8 +208,8 @@ chlit_grammar_gen::evaluate(TokenT const &token) static chlit_grammar g; unsigned int result = 0; -typename TokenT::string_t const &token_val = token.get_value(); -parse_info hit = +typename TokenT::string_type const &token_val = token.get_value(); +parse_info hit = parse(token_val.begin(), token_val.end(), g[spirit_assign_actor(result)]); if (!hit.hit) { diff --git a/include/boost/wave/grammars/cpp_defined_grammar.hpp b/include/boost/wave/grammars/cpp_defined_grammar.hpp index e7e13f4..0148d57 100644 --- a/include/boost/wave/grammars/cpp_defined_grammar.hpp +++ b/include/boost/wave/grammars/cpp_defined_grammar.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_DEFINED_GRAMMAR_HPP_F48287B2_DC67_40A8_B4A1_800EFBD67869_INCLUDED) @@ -64,9 +63,6 @@ struct defined_grammar : rule_t defined_op; rule_t identifier; -//#if !defined(WAVE_USE_RE2C_IDL_LEXER) - rule_t qualified_name; -//#endif definition(defined_grammar const &self) { @@ -74,44 +70,17 @@ struct defined_grammar : using namespace boost::wave; using namespace boost::wave::util; -//#if !defined(WAVE_USE_RE2C_IDL_LEXER) defined_op // parens not required, see C++ standard 16.1.1 = ch_p(T_IDENTIFIER) // token contains 'defined' >> ( ( ch_p(T_LEFTPAREN) - >> qualified_name + >> identifier >> ch_p(T_RIGHTPAREN) ) - | qualified_name + | identifier ) ; - qualified_name - = !ch_p(T_COLON_COLON) - [ - spirit_append_actor(self.result_seq) - ] - >> identifier - >> *( ch_p(T_COLON_COLON) - [ - spirit_append_actor(self.result_seq) - ] - >> identifier - ) - ; -//#else -// defined_op // parens not required, see C++ standard 16.1.1 -// = ch_p(T_IDENTIFIER) // token contains 'defined' -// >> ( -// ( ch_p(T_LEFTPAREN) -// >> identifier -// >> ch_p(T_RIGHTPAREN) -// ) -// | identifier -// ) -// ; -//#endif - identifier = ch_p(T_IDENTIFIER) [ @@ -125,9 +94,6 @@ struct defined_grammar : BOOST_SPIRIT_DEBUG_TRACE_RULE(defined_op, TRACE_CPP_DEFINED_GRAMMAR); BOOST_SPIRIT_DEBUG_TRACE_RULE(identifier, TRACE_CPP_DEFINED_GRAMMAR); -//#if !defined(WAVE_USE_RE2C_IDL_LEXER) - BOOST_SPIRIT_DEBUG_TRACE_RULE(qualified_name, TRACE_CPP_DEFINED_GRAMMAR); -//#endif } // start rule of this grammar @@ -169,12 +135,12 @@ boost::spirit::parse_info< > defined_grammar_gen::parse_operator_defined ( iterator1_t const &first, iterator1_t const &last, - token_sequence_t &found_qualified_name) + token_sequence_type &found_qualified_name) { using namespace boost::spirit; using namespace boost::wave; - defined_grammar g(found_qualified_name); + defined_grammar g(found_qualified_name); return boost::spirit::parse ( first, last, g, ch_p(T_SPACE) | ch_p(T_CCOMMENT)); } @@ -186,12 +152,12 @@ boost::spirit::parse_info< > defined_grammar_gen::parse_operator_defined ( iterator2_t const &first, iterator2_t const &last, - token_sequence_t &found_qualified_name) + token_sequence_type &found_qualified_name) { using namespace boost::spirit; using namespace boost::wave; - defined_grammar g(found_qualified_name); + defined_grammar g(found_qualified_name); return boost::spirit::parse ( first, last, g, ch_p(T_SPACE) | ch_p(T_CCOMMENT)); } diff --git a/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp b/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp index f3315ef..c23b828 100644 --- a/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_DEFINED_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED) @@ -27,9 +26,9 @@ namespace grammars { template struct defined_grammar_gen { - typedef typename LexIteratorT::token_t token_t; - typedef std::list > - token_sequence_t; + typedef typename LexIteratorT::token_type token_type; + typedef std::list > + token_sequence_type; // The parse_operator_define function is instantiated manually twice to // simplify the explicit specialization of this template. This way the user @@ -39,21 +38,21 @@ struct defined_grammar_gen // generated by the compiler twice anyway. typedef boost::wave::util::unput_queue_iterator< - typename token_sequence_t::iterator, token_t, token_sequence_t> + typename token_sequence_type::iterator, token_type, token_sequence_type> iterator1_t; typedef boost::wave::util::unput_queue_iterator< - LexIteratorT, token_t, token_sequence_t> + LexIteratorT, token_type, token_sequence_type> iterator2_t; // parse the operator defined and return the found qualified name static boost::spirit::parse_info parse_operator_defined (iterator1_t const &first, iterator1_t const &last, - token_sequence_t &found_qualified_name); + token_sequence_type &found_qualified_name); static boost::spirit::parse_info parse_operator_defined (iterator2_t const &first, iterator2_t const &last, - token_sequence_t &found_qualified_name); + token_sequence_type &found_qualified_name); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/wave/grammars/cpp_expression_grammar.hpp b/include/boost/wave/grammars/cpp_expression_grammar.hpp index c5eaab1..c49f101 100644 --- a/include/boost/wave/grammars/cpp_expression_grammar.hpp +++ b/include/boost/wave/grammars/cpp_expression_grammar.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_EXPRESSION_GRAMMAR_HPP_099CD1A4_A6C0_44BE_8F24_0B00F5BE5674_INCLUDED) @@ -173,8 +172,8 @@ struct expression_grammar : template struct definition { - typedef closures::cpp_expr_closure closure_t; - typedef boost::spirit::rule rule_t; + typedef closures::cpp_expr_closure closure_type; + typedef boost::spirit::rule rule_t; typedef boost::spirit::rule simple_rule_t; simple_rule_t pp_expression; @@ -195,7 +194,7 @@ struct expression_grammar : rule_t add_exp_nocalc, multiply_exp_nocalc; rule_t unary_exp_nocalc, primary_exp_nocalc, constant_nocalc; - boost::spirit::subrule<0, closure_t::context_t> const_exp_subrule; + boost::spirit::subrule<0, closure_type::context_t> const_exp_subrule; definition(expression_grammar const &self) { @@ -624,27 +623,27 @@ template BOOST_WAVE_EXPRGRAMMAR_GEN_INLINE bool expression_grammar_gen::evaluate( - typename token_sequence_t::const_iterator const &first, - typename token_sequence_t::const_iterator const &last, - typename token_t::position_t const &act_pos, + typename token_sequence_type::const_iterator const &first, + typename token_sequence_type::const_iterator const &last, + typename token_type::position_type const &act_pos, bool if_block_status) { using namespace boost::spirit; using namespace boost::wave; - typedef typename token_sequence_t::const_iterator iterator_t; + typedef typename token_sequence_type::const_iterator iterator_type; static expression_grammar g; // expression grammar boost::wave::grammars::closures::closure_value result; // expression result -parse_info hit = parse (first, last, g[spirit_assign_actor(result)], +parse_info hit = parse (first, last, g[spirit_assign_actor(result)], ch_p(T_SPACE) | ch_p(T_CCOMMENT) | ch_p(T_CPPCOMMENT)); if (!hit.hit) { // expression is illformed if (if_block_status) { - typedef typename token_sequence_t::value_type::string_t string_t; + typedef typename token_sequence_type::value_type::string_type string_type; BOOST_WAVE_THROW(preprocess_exception, ill_formed_expression, - boost::wave::util::impl::as_string(first, last), act_pos); + boost::wave::util::impl::as_string(first, last), act_pos); } else { // as the if_block_status is false any errors will not be reported @@ -656,7 +655,7 @@ parse_info hit = parse (first, last, g[spirit_assign_actor(result)], // The token list starts with a valid expression, but there remains // something. If the remainder consists out of whitespace only, the // expression is still valid. - iterator_t next = hit.stop; + iterator_type next = hit.stop; while (next != last) { switch (token_id(*next)) { @@ -673,10 +672,10 @@ parse_info hit = parse (first, last, g[spirit_assign_actor(result)], default: // expression is illformed if (if_block_status) { - typedef typename token_sequence_t::value_type::string_t - string_t; + typedef typename token_sequence_type::value_type::string_type + string_type; BOOST_WAVE_THROW(preprocess_exception, ill_formed_expression, - boost::wave::util::impl::as_string(first, last), + boost::wave::util::impl::as_string(first, last), act_pos); } else { @@ -691,9 +690,9 @@ parse_info hit = parse (first, last, g[spirit_assign_actor(result)], if (!result.is_valid()) { // division by zero occured - typedef typename token_sequence_t::value_type::string_t string_t; + typedef typename token_sequence_type::value_type::string_type string_type; BOOST_WAVE_THROW(preprocess_exception, division_by_zero, - boost::wave::util::impl::as_string(first, last), + boost::wave::util::impl::as_string(first, last), act_pos); } diff --git a/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp b/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp index a4f4d8e..6101aff 100644 --- a/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED) @@ -35,14 +34,14 @@ namespace grammars { template struct expression_grammar_gen { - typedef TokenT token_t; - typedef std::list > - token_sequence_t; + typedef TokenT token_type; + typedef std::list > + token_sequence_type; static bool evaluate( - typename token_sequence_t::const_iterator const &first, - typename token_sequence_t::const_iterator const &last, - typename token_t::position_t const &tok, + typename token_sequence_type::const_iterator const &first, + typename token_sequence_type::const_iterator const &last, + typename token_type::position_type const &tok, bool if_block_status); }; diff --git a/include/boost/wave/grammars/cpp_expression_value.hpp b/include/boost/wave/grammars/cpp_expression_value.hpp index 32c6da3..65319b7 100644 --- a/include/boost/wave/grammars/cpp_expression_value.hpp +++ b/include/boost/wave/grammars/cpp_expression_value.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_EXPRESSION_VALUE_HPP_452FE66D_8754_4107_AF1E_E42255A0C18A_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_grammar.hpp b/include/boost/wave/grammars/cpp_grammar.hpp index b8acea0..34ba21e 100644 --- a/include/boost/wave/grammars/cpp_grammar.hpp +++ b/include/boost/wave/grammars/cpp_grammar.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_GRAMMAR_HPP_FEAEBC2E_2734_428B_A7CA_85E5A415E23E_INCLUDED) @@ -182,12 +181,6 @@ struct cpp_grammar : rule_t ppwarning; rule_t pppragma; rule_t illformed; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - rule_t ppregion; - rule_t ppendregion; - rule_t ppimport; - rule_t pp_regionsupport; -#endif rule_t ppqualifiedname; rule_t eol_tokens; no_tree_rule_t ppsp; @@ -220,12 +213,6 @@ struct cpp_grammar : self.rule_ids.pragma_id = pppragma.id().to_long(); self.rule_ids.illformed_id = illformed.id().to_long(); self.rule_ids.ppspace_id = ppsp.id().to_long(); -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - self.rule_ids.ppregion_id = ppregion.id().to_long(); - self.rule_ids.ppendregion_id = ppendregion.id().to_long(); - self.rule_ids.pp_regionsupport_id = pp_regionsupport.id().to_long(); - self.rule_ids.ppimport_id = ppimport.id().to_long(); -#endif self.rule_ids.ppqualifiedname_id = ppqualifiedname.id().to_long(); #if BOOST_WAVE_DUMP_PARSE_TREE != 0 @@ -258,9 +245,6 @@ struct cpp_grammar : | pperror | ppwarning | pppragma -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - | pp_regionsupport -#endif | illformed ) >> eol_tokens @@ -271,16 +255,6 @@ struct cpp_grammar : // (BOOST_SPIRIT_DEBUG_FLAGS_CPP & BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR)) ; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - // the pp_regionsupport is factored out, because else - // VC7.1 complains about an out of heapspace error (non-fixable) - pp_regionsupport - = ppregion - | ppendregion - | ppimport - ; -#endif - // #include ... include_file // include "..." = ch_p(T_PP_QHEADER) @@ -507,67 +481,12 @@ struct cpp_grammar : ) ; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - // #region [name] - ppregion - = no_node_d - [ - ch_p(T_PP_REGION) - [ store_found_directive_t(self.found_directive) ] - ] - >> !( - no_node_d[+ppsp] - >> ppqualifiedname - ) - ; - - // #endregion - ppendregion - = no_node_d - [ - ch_p(T_PP_ENDREGION) - [ store_found_directive_t(self.found_directive) ] - ] - ; - - // #import name - ppimport - = no_node_d - [ - ch_p(T_PP_IMPORT) - [ store_found_directive_t(self.found_directive) ] - >> *ppsp - ] - >> list_p( - ppqualifiedname, - no_node_d[*ppsp >> ch_p(T_COMMA) >> *ppsp] - ) - ; -#endif - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - // possibly qualified name - ppqualifiedname - = ch_p(T_COLON_COLON) - || (no_node_d[*ppsp] - >> list_p( - ( ch_p(T_IDENTIFIER) - | pattern_p(KeywordTokenType, TokenTypeMask) - ), - no_node_d[*ppsp] - >> ch_p(T_COLON_COLON) - >> no_node_d[*ppsp] - ) - ) - ; -#else ppqualifiedname = no_node_d[*ppsp] >> ( ch_p(T_IDENTIFIER) | pattern_p(KeywordTokenType, TokenTypeMask) ) ; -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 // auxiliary helper rules ppsp // valid space in a line with a preprocessor directive @@ -609,13 +528,6 @@ struct cpp_grammar : BOOST_SPIRIT_DEBUG_TRACE_RULE(ppwarning, TRACE_CPP_GRAMMAR); BOOST_SPIRIT_DEBUG_TRACE_RULE(illformed, TRACE_CPP_GRAMMAR); BOOST_SPIRIT_DEBUG_TRACE_RULE(ppsp, TRACE_CPP_GRAMMAR); - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - BOOST_SPIRIT_DEBUG_TRACE_RULE(pp_regionsupport, TRACE_CPP_GRAMMAR); - BOOST_SPIRIT_DEBUG_TRACE_RULE(ppregion, TRACE_CPP_GRAMMAR); - BOOST_SPIRIT_DEBUG_TRACE_RULE(ppendregion, TRACE_CPP_GRAMMAR); - BOOST_SPIRIT_DEBUG_TRACE_RULE(ppimport, TRACE_CPP_GRAMMAR); -#endif BOOST_SPIRIT_DEBUG_TRACE_RULE(ppqualifiedname, TRACE_CPP_GRAMMAR); } @@ -672,12 +584,6 @@ struct cpp_grammar : { self.rule_ids.pragma_id, "pppragma" }, { self.rule_ids.illformed_id, "illformed" }, { self.rule_ids.ppsp_id, "ppsp" }, -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - { self.rule_ids.pp_regionsupport_id, "pp_regionsupport" }, - { self.rule_ids.ppregion_id, "pp" BOOST_WAVE_PP_REGION }, - { self.rule_ids.ppendregion_id, "pp" BOOST_WAVE_PP_ENDREGION }, - { self.rule_ids.ppimport_id, "pp" BOOST_WAVE_PP_IMPORT }, -#endif { self.rule_ids.ppqualifiedname_id, "ppqualifiedname" }, { 0 } }; @@ -731,11 +637,6 @@ namespace { case T_PP_ERROR: return "#error"; case T_PP_WARNING: return "#warning"; case T_PP_PRAGMA: return "#pragma"; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - case T_PP_REGION: return "#" BOOST_WAVE_PP_REGION; - case T_PP_ENDREGION: return "#" BOOST_WAVE_PP_ENDREGION; - case T_PP_IMPORT: return "#" BOOST_WAVE_PP_IMPORT; -#endif default: return "#unknown directive"; } @@ -747,16 +648,16 @@ BOOST_WAVE_GRAMMAR_GEN_INLINE boost::spirit::tree_parse_info cpp_grammar_gen::parse_cpp_grammar ( LexIteratorT const &first, LexIteratorT const &last, - bool &found_eof_, position_t const &act_pos) + bool &found_eof_, position_type const &act_pos) { using namespace boost::spirit; using namespace boost::wave; - pos_of_newline = position_t(); // reset position + pos_of_newline = position_type(); // reset position found_eof = false; // reset flag found_directive = T_EOF; // reset found directive - static cpp_grammar g( + static cpp_grammar g( rule_ids, pos_of_newline, found_eof, found_directive); tree_parse_info hit = pt_parse (first, last, g); diff --git a/include/boost/wave/grammars/cpp_grammar_gen.hpp b/include/boost/wave/grammars/cpp_grammar_gen.hpp index 0be45fe..7166f14 100644 --- a/include/boost/wave/grammars/cpp_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_grammar_gen.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED) @@ -48,12 +47,6 @@ struct cpp_grammar_rule_ids { std::size_t pragma_id; // #pragma std::size_t illformed_id; std::size_t ppspace_id; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - std::size_t pp_regionsupport_id; - std::size_t ppregion_id; // #region - std::size_t ppendregion_id; // #endregion - std::size_t ppimport_id; // #import -#endif std::size_t ppqualifiedname_id; }; @@ -70,9 +63,9 @@ struct cpp_grammar_rule_ids { template struct cpp_grammar_gen { - typedef LexIteratorT iterator_t; - typedef typename LexIteratorT::token_t token_t; - typedef typename token_t::position_t position_t; + typedef LexIteratorT iterator_type; + typedef typename LexIteratorT::token_type token_type; + typedef typename token_type::position_type position_type; // the parser_id's of all rules of the cpp_grammar are stored here // note: these are valid only after the first call to parse_cpp_grammar @@ -80,7 +73,7 @@ struct cpp_grammar_gen // the actual position of the last matched T_NEWLINE is stored here into the // member 'pos_of_newline' - static position_t pos_of_newline; + static position_type pos_of_newline; // the found_eof flag is set to true during the parsing, if the directive // under inspection terminates with a T__EOF token @@ -90,9 +83,9 @@ struct cpp_grammar_gen static boost::wave::token_id found_directive; // parse the cpp_grammar and return the resulting parse tree - static boost::spirit::tree_parse_info - parse_cpp_grammar (iterator_t const &first, iterator_t const &last, - bool &found_eof_, position_t const &act_pos); + static boost::spirit::tree_parse_info + parse_cpp_grammar (iterator_type const &first, iterator_type const &last, + bool &found_eof_, position_type const &act_pos); }; /////////////////////////////////////////////////////////////////////////////// @@ -102,7 +95,7 @@ cpp_grammar_rule_ids cpp_grammar_gen::rule_ids; template -typename LexIteratorT::token_t::position_t +typename LexIteratorT::token_type::position_type cpp_grammar_gen::pos_of_newline; template diff --git a/include/boost/wave/grammars/cpp_intlit_grammar.hpp b/include/boost/wave/grammars/cpp_intlit_grammar.hpp index 419d70a..4e16799 100644 --- a/include/boost/wave/grammars/cpp_intlit_grammar.hpp +++ b/include/boost/wave/grammars/cpp_intlit_grammar.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_INTLIT_GRAMMAR_HPP_2E1E70B1_F15C_4132_8554_10A231B0D91C_INCLUDED) @@ -163,8 +162,8 @@ intlit_grammar_gen::evaluate(TokenT const &token, intlit_grammar g(is_unsigned); unsigned long result = 0; -typename TokenT::string_t const &token_val = token.get_value(); -parse_info hit = +typename TokenT::string_type const &token_val = token.get_value(); +parse_info hit = parse(token_val.begin(), token_val.end(), g[spirit_assign_actor(result)]); if (!hit.hit) { diff --git a/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp b/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp index 89b7a1c..dd82097 100644 --- a/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_predef_macros_gen.hpp b/include/boost/wave/grammars/cpp_predef_macros_gen.hpp index 186bcdf..04ae8d6 100644 --- a/include/boost/wave/grammars/cpp_predef_macros_gen.hpp +++ b/include/boost/wave/grammars/cpp_predef_macros_gen.hpp @@ -1,12 +1,11 @@ /*============================================================================= A Standard compliant C++ preprocessor - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_PREDEF_MACROS_GEN_HPP_CADB6D2C_76A4_4988_83E1_EFFC6902B9A2_INCLUDED) @@ -49,15 +48,15 @@ struct predefined_macros_grammar_rule_ids { template struct predefined_macros_grammar_gen { - typedef LexIteratorT iterator_t; + typedef LexIteratorT iterator_type; // the parser_id's of all rules of the cpp_grammar are stored here // note: these are valid only after the first call to parse_cpp_grammar static predefined_macros_grammar_rule_ids rule_ids; // parse the cpp_grammar and return the resulting parse tree - static boost::spirit::tree_parse_info - parse_predefined_macro (iterator_t const &first, iterator_t const &last); + static boost::spirit::tree_parse_info + parse_predefined_macro (iterator_type const &first, iterator_type const &last); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp b/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp index 18ab79e..2eb7386 100644 --- a/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp +++ b/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_PREDEF_MACROS_GRAMMAR_HPP_53858C9A_C202_4D60_AD92_DC9CAE4DBB43_INCLUDED) diff --git a/include/boost/wave/language_support.hpp b/include/boost/wave/language_support.hpp index 8acf92d..2d256ad 100644 --- a/include/boost/wave/language_support.hpp +++ b/include/boost/wave/language_support.hpp @@ -1,14 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Definition of the various language support constants - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(LANGUAGE_SUPPORT_HPP_93EDD057_2DEF_44BC_BC9F_FDABB9F51AFA_INCLUDED) #define LANGUAGE_SUPPORT_HPP_93EDD057_2DEF_44BC_BC9F_FDABB9F51AFA_INCLUDED @@ -28,12 +26,6 @@ enum language_support { // support flags for C99 support_variadics = 0x02, support_c99 = support_variadics, - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -// support flags for the experimental C++0x features - support_extensions = 0x04, - support_cpp0x = support_normal | support_variadics | support_extensions, -#endif #endif }; @@ -106,52 +98,6 @@ enable_c99(bool enable = true) return enable ? support_c99 : support_cpp; } -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -/////////////////////////////////////////////////////////////////////////////// -// -// need_cpp0x -// -// Extract, if the language to support is C++0x -// -/////////////////////////////////////////////////////////////////////////////// -inline bool -need_cpp0x(language_support language) -{ - return language == support_cpp0x; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// enable_c99 -// -// Set, whether to support the C++0x features (alternatively C++98 is -// supported) -// -/////////////////////////////////////////////////////////////////////////////// -inline language_support -enable_cpp0x(bool enable = true) -{ - return enable ? support_cpp0x : support_cpp; -} - -#else // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - -/////////////////////////////////////////////////////////////////////////////// -inline bool -need_cpp0x(language_support language) -{ - return false; -} - -////////////////////////////////////////////////////////////////////////////// -inline language_support -enable_cpp0x(bool enable = true) -{ - return support_cpp; -} - -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - #else // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/wave/token_ids.hpp b/include/boost/wave/token_ids.hpp index e1a7943..f6b0ed4 100644 --- a/include/boost/wave/token_ids.hpp +++ b/include/boost/wave/token_ids.hpp @@ -1,15 +1,13 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - The definition of a default set of token identifiers and related functions. - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(TOKEN_IDS_HPP_414E9A58_F079_4789_8AFF_513815CE475B_INCLUDED) @@ -257,32 +255,22 @@ enum token_id { T_EOF = TOKEN_FROM_ID(401, EOFTokenType), // end of file reached T_EOI = TOKEN_FROM_ID(402, EOFTokenType), // end of input reached -// experimental: alternative pp-tokens - T_COMMA_ALT = TOKEN_FROM_ID(264, OperatorTokenType|AltTokenType), - T_LEFTPAREN_ALT = TOKEN_FROM_ID(277, OperatorTokenType|AltTokenType), - T_RIGHTPAREN_ALT = TOKEN_FROM_ID(294, OperatorTokenType|AltTokenType), - -// experimental: macro scoping support - T_PP_REGION = TOKEN_FROM_ID(403, PPTokenType), - T_PP_ENDREGION = TOKEN_FROM_ID(404, PPTokenType), - T_PP_IMPORT = TOKEN_FROM_ID(405, PPTokenType), - // MS extensions - T_MSEXT_INT8 = TOKEN_FROM_ID(406, KeywordTokenType), - T_MSEXT_INT16 = TOKEN_FROM_ID(407, KeywordTokenType), - T_MSEXT_INT32 = TOKEN_FROM_ID(408, KeywordTokenType), - T_MSEXT_INT64 = TOKEN_FROM_ID(409, KeywordTokenType), - T_MSEXT_BASED = TOKEN_FROM_ID(410, KeywordTokenType), - T_MSEXT_DECLSPEC = TOKEN_FROM_ID(411, KeywordTokenType), - T_MSEXT_CDECL = TOKEN_FROM_ID(412, KeywordTokenType), - T_MSEXT_FASTCALL = TOKEN_FROM_ID(413, KeywordTokenType), - T_MSEXT_STDCALL = TOKEN_FROM_ID(414, KeywordTokenType), - T_MSEXT_TRY = TOKEN_FROM_ID(415, KeywordTokenType), - T_MSEXT_EXCEPT = TOKEN_FROM_ID(416, KeywordTokenType), - T_MSEXT_FINALLY = TOKEN_FROM_ID(417, KeywordTokenType), - T_MSEXT_LEAVE = TOKEN_FROM_ID(418, KeywordTokenType), - T_MSEXT_INLINE = TOKEN_FROM_ID(419, KeywordTokenType), - T_MSEXT_ASM = TOKEN_FROM_ID(420, KeywordTokenType), + T_MSEXT_INT8 = TOKEN_FROM_ID(403, KeywordTokenType), + T_MSEXT_INT16 = TOKEN_FROM_ID(404, KeywordTokenType), + T_MSEXT_INT32 = TOKEN_FROM_ID(405, KeywordTokenType), + T_MSEXT_INT64 = TOKEN_FROM_ID(406, KeywordTokenType), + T_MSEXT_BASED = TOKEN_FROM_ID(407, KeywordTokenType), + T_MSEXT_DECLSPEC = TOKEN_FROM_ID(408, KeywordTokenType), + T_MSEXT_CDECL = TOKEN_FROM_ID(409, KeywordTokenType), + T_MSEXT_FASTCALL = TOKEN_FROM_ID(410, KeywordTokenType), + T_MSEXT_STDCALL = TOKEN_FROM_ID(411, KeywordTokenType), + T_MSEXT_TRY = TOKEN_FROM_ID(412, KeywordTokenType), + T_MSEXT_EXCEPT = TOKEN_FROM_ID(413, KeywordTokenType), + T_MSEXT_FINALLY = TOKEN_FROM_ID(414, KeywordTokenType), + T_MSEXT_LEAVE = TOKEN_FROM_ID(415, KeywordTokenType), + T_MSEXT_INLINE = TOKEN_FROM_ID(416, KeywordTokenType), + T_MSEXT_ASM = TOKEN_FROM_ID(417, KeywordTokenType), T_LAST_TOKEN_ID, T_LAST_TOKEN = ID_FROM_TOKEN(T_LAST_TOKEN_ID), @@ -314,180 +302,170 @@ get_token_name(token_id tokid) // Please note that the sequence of token names must match the sequence of // token id's defined in then enum token_id above. static char const *tok_names[] = { - "AND", - "ANDAND", - "ASSIGN", - "ANDASSIGN", - "OR", - "ORASSIGN", - "XOR", - "XORASSIGN", - "COMMA", - "COLON", - "DIVIDE", - "DIVIDEASSIGN", - "DOT", - "DOTSTAR", - "ELLIPSIS", - "EQUAL", - "GREATER", - "GREATEREQUAL", - "LEFTBRACE", - "LESS", - "LESSEQUAL", - "LEFTPAREN", - "LEFTBRACKET", - "MINUS", - "MINUSASSIGN", - "MINUSMINUS", - "PERCENT", - "PERCENTASSIGN", - "NOT", - "NOTEQUAL", - "OROR", - "PLUS", - "PLUSASSIGN", - "PLUSPLUS", - "ARROW", - "ARROWSTAR", - "QUESTION_MARK", - "RIGHTBRACE", - "RIGHTPAREN", - "RIGHTBRACKET", - "COLON_COLON", - "SEMICOLON", - "SHIFTLEFT", - "SHIFTLEFTASSIGN", - "SHIFTRIGHT", - "SHIFTRIGHTASSIGN", - "STAR", - "COMPL", - "STARASSIGN", - "ASM", - "AUTO", - "BOOL", - "FALSE", - "TRUE", - "BREAK", - "CASE", - "CATCH", - "CHAR", - "CLASS", - "CONST", - "CONSTCAST", - "CONTINUE", - "DEFAULT", - "DEFINED", - "DELETE", - "DO", - "DOUBLE", - "DYNAMICCAST", - "ELSE", - "ENUM", - "EXPLICIT", - "EXPORT", - "EXTERN", - "FLOAT", - "FOR", - "FRIEND", - "GOTO", - "IF", - "INLINE", - "INT", - "LONG", - "MUTABLE", - "NAMESPACE", - "NEW", - "OPERATOR", - "PRIVATE", - "PROTECTED", - "PUBLIC", - "REGISTER", - "REINTERPRETCAST", - "RETURN", - "SHORT", - "SIGNED", - "SIZEOF", - "STATIC", - "STATICCAST", - "STRUCT", - "SWITCH", - "TEMPLATE", - "THIS", - "THROW", - "TRY", - "TYPEDEF", - "TYPEID", - "TYPENAME", - "UNION", - "UNSIGNED", - "USING", - "VIRTUAL", - "VOID", - "VOLATILE", - "WCHART", - "WHILE", - "PP_DEFINE", - "PP_IF", - "PP_IFDEF", - "PP_IFNDEF", - "PP_ELSE", - "PP_ELIF", - "PP_ENDIF", - "PP_ERROR", - "PP_LINE", - "PP_PRAGMA", - "PP_UNDEF", - "PP_WARNING", - "IDENTIFIER", - "OCTALINT", - "DECIMALINT", - "HEXAINT", - "INTLIT", - "FLOATLIT", - "CCOMMENT", - "CPPCOMMENT", - "CHARLIT", - "STRINGLIT", - "CONTLINE", - "SPACE", - "SPACE2", - "NEWLINE", - "POUND_POUND", - "POUND", - "ANY", - "PP_INCLUDE", - "PP_QHEADER", - "PP_HHEADER", - "EOF", - "EOI", - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - "PP_" BOOST_WAVE_PP_REGION, - "PP_" BOOST_WAVE_PP_ENDREGION, - "PP_" BOOST_WAVE_PP_IMPORT, -#else - "", - "", - "", -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - - // MS extensions - "MSEXT_INT8", - "MSEXT_INT16", - "MSEXT_INT32", - "MSEXT_INT64", - "MSEXT_BASED", - "MSEXT_DECLSPEC", - "MSEXT_CDECL", - "MSEXT_FASTCALL", - "MSEXT_STDCALL", - "MSEXT_TRY", - "MSEXT_EXCEPT", - "MSEXT_FINALLY", - "MSEXT_LEAVE", - "MSEXT_INLINE", - "MSEXT_ASM", + /* 256 */ "AND", + /* 257 */ "ANDAND", + /* 258 */ "ASSIGN", + /* 259 */ "ANDASSIGN", + /* 260 */ "OR", + /* 261 */ "ORASSIGN", + /* 262 */ "XOR", + /* 263 */ "XORASSIGN", + /* 264 */ "COMMA", + /* 265 */ "COLON", + /* 266 */ "DIVIDE", + /* 267 */ "DIVIDEASSIGN", + /* 268 */ "DOT", + /* 269 */ "DOTSTAR", + /* 270 */ "ELLIPSIS", + /* 271 */ "EQUAL", + /* 272 */ "GREATER", + /* 273 */ "GREATEREQUAL", + /* 274 */ "LEFTBRACE", + /* 275 */ "LESS", + /* 276 */ "LESSEQUAL", + /* 277 */ "LEFTPAREN", + /* 278 */ "LEFTBRACKET", + /* 279 */ "MINUS", + /* 280 */ "MINUSASSIGN", + /* 281 */ "MINUSMINUS", + /* 282 */ "PERCENT", + /* 283 */ "PERCENTASSIGN", + /* 284 */ "NOT", + /* 285 */ "NOTEQUAL", + /* 286 */ "OROR", + /* 287 */ "PLUS", + /* 288 */ "PLUSASSIGN", + /* 289 */ "PLUSPLUS", + /* 290 */ "ARROW", + /* 291 */ "ARROWSTAR", + /* 292 */ "QUESTION_MARK", + /* 293 */ "RIGHTBRACE", + /* 294 */ "RIGHTPAREN", + /* 295 */ "RIGHTBRACKET", + /* 296 */ "COLON_COLON", + /* 297 */ "SEMICOLON", + /* 298 */ "SHIFTLEFT", + /* 299 */ "SHIFTLEFTASSIGN", + /* 300 */ "SHIFTRIGHT", + /* 301 */ "SHIFTRIGHTASSIGN", + /* 302 */ "STAR", + /* 303 */ "COMPL", + /* 304 */ "STARASSIGN", + /* 305 */ "ASM", + /* 306 */ "AUTO", + /* 307 */ "BOOL", + /* 308 */ "FALSE", + /* 309 */ "TRUE", + /* 310 */ "BREAK", + /* 311 */ "CASE", + /* 312 */ "CATCH", + /* 313 */ "CHAR", + /* 314 */ "CLASS", + /* 315 */ "CONST", + /* 316 */ "CONSTCAST", + /* 317 */ "CONTINUE", + /* 318 */ "DEFAULT", + /* 319 */ "DEFINED", + /* 320 */ "DELETE", + /* 321 */ "DO", + /* 322 */ "DOUBLE", + /* 323 */ "DYNAMICCAST", + /* 324 */ "ELSE", + /* 325 */ "ENUM", + /* 326 */ "EXPLICIT", + /* 327 */ "EXPORT", + /* 328 */ "EXTERN", + /* 329 */ "FLOAT", + /* 330 */ "FOR", + /* 331 */ "FRIEND", + /* 332 */ "GOTO", + /* 333 */ "IF", + /* 334 */ "INLINE", + /* 335 */ "INT", + /* 336 */ "LONG", + /* 337 */ "MUTABLE", + /* 338 */ "NAMESPACE", + /* 339 */ "NEW", + /* 340 */ "OPERATOR", + /* 341 */ "PRIVATE", + /* 342 */ "PROTECTED", + /* 343 */ "PUBLIC", + /* 344 */ "REGISTER", + /* 345 */ "REINTERPRETCAST", + /* 346 */ "RETURN", + /* 347 */ "SHORT", + /* 348 */ "SIGNED", + /* 349 */ "SIZEOF", + /* 350 */ "STATIC", + /* 351 */ "STATICCAST", + /* 352 */ "STRUCT", + /* 353 */ "SWITCH", + /* 354 */ "TEMPLATE", + /* 355 */ "THIS", + /* 356 */ "THROW", + /* 357 */ "TRY", + /* 358 */ "TYPEDEF", + /* 359 */ "TYPEID", + /* 360 */ "TYPENAME", + /* 361 */ "UNION", + /* 362 */ "UNSIGNED", + /* 363 */ "USING", + /* 364 */ "VIRTUAL", + /* 365 */ "VOID", + /* 366 */ "VOLATILE", + /* 367 */ "WCHART", + /* 368 */ "WHILE", + /* 369 */ "PP_DEFINE", + /* 370 */ "PP_IF", + /* 371 */ "PP_IFDEF", + /* 372 */ "PP_IFNDEF", + /* 373 */ "PP_ELSE", + /* 374 */ "PP_ELIF", + /* 375 */ "PP_ENDIF", + /* 376 */ "PP_ERROR", + /* 377 */ "PP_LINE", + /* 378 */ "PP_PRAGMA", + /* 379 */ "PP_UNDEF", + /* 380 */ "PP_WARNING", + /* 381 */ "IDENTIFIER", + /* 382 */ "OCTALINT", + /* 383 */ "DECIMALINT", + /* 384 */ "HEXAINT", + /* 385 */ "INTLIT", + /* 386 */ "FLOATLIT", + /* 387 */ "CCOMMENT", + /* 388 */ "CPPCOMMENT", + /* 389 */ "CHARLIT", + /* 390 */ "STRINGLIT", + /* 391 */ "CONTLINE", + /* 392 */ "SPACE", + /* 393 */ "SPACE2", + /* 394 */ "NEWLINE", + /* 395 */ "POUND_POUND", + /* 396 */ "POUND", + /* 397 */ "ANY", + /* 398 */ "PP_INCLUDE", + /* 399 */ "PP_QHEADER", + /* 400 */ "PP_HHEADER", + /* 401 */ "EOF", + /* 402 */ "EOI", + + // MS extensions + /* 403 */ "MSEXT_INT8", + /* 404 */ "MSEXT_INT16", + /* 405 */ "MSEXT_INT32", + /* 406 */ "MSEXT_INT64", + /* 407 */ "MSEXT_BASED", + /* 408 */ "MSEXT_DECLSPEC", + /* 409 */ "MSEXT_CDECL", + /* 410 */ "MSEXT_FASTCALL", + /* 411 */ "MSEXT_STDCALL", + /* 412 */ "MSEXT_TRY", + /* 413 */ "MSEXT_EXCEPT", + /* 414 */ "MSEXT_FINALLY", + /* 415 */ "MSEXT_LEAVE", + /* 416 */ "MSEXT_INLINE", + /* 417 */ "MSEXT_ASM", }; unsigned int id = BASEID_FROM_TOKEN(tokid)-T_FIRST_TOKEN; @@ -506,180 +484,170 @@ get_token_value(token_id tokid) // Please note that the sequence of token names must match the sequence of // token id's defined in then enum token_id above. static char const *tok_names[] = { - "&", - "&&", - "=", - "&=", - "|", - "|=", - "^", - "^=", - ",", - ":", - "/", - "/=", - ".", - ".*", - "...", - "==", - ">", - ">=", - "{", - "<", - "<=", - "(", - "[", - "-", - "-=", - "--", - "%", - "%=", - "!", - "!=", - "||", - "+", - "+=", - "++", - "->", - "->*", - "?", - "}", - ")", - "]", - "::", - ";", - "<<", - "<<=", - ">>", - ">>=", - "*", - "~", - "*=", - "asm", - "auto", - "bool", - "false", - "true", - "break", - "case", - "catch", - "char", - "class", - "const", - "const_cast", - "continue", - "default", - "defined", - "delete", - "do", - "double", - "dynamic_cast", - "else", - "enum", - "explicit", - "export", - "extern", - "float", - "for", - "friend", - "goto", - "if", - "inline", - "int", - "long", - "mutable", - "namespace", - "new", - "operator", - "private", - "protected", - "public", - "register", - "reinterpret_cast", - "return", - "short", - "signed", - "sizeof", - "static", - "static_cast", - "struct", - "switch", - "template", - "this", - "throw", - "try", - "typedef", - "typeid", - "typename", - "union", - "unsigned", - "using", - "virtual", - "void", - "volatile", - "wchar_t", - "while", - "#define", - "#if", - "#ifdef", - "#ifndef", - "#else", - "#elif", - "#endif", - "#error", - "#line", - "#pragma ", - "#undef ", - "#warning", - "", // identifier - "", // octalint - "", // decimalint - "", // hexlit - "", // intlit - "", // floatlit - "", // ccomment - "", // cppcomment - "", // charlit - "", // stringlit - "", // contline - "", // space - "", // space2 - "\n", - "##", - "#", - "", // any - "#include", - "#include", - "#include", - "", // eof - "", // eoi - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - "#" BOOST_WAVE_PP_REGION, - "#" BOOST_WAVE_PP_ENDREGION, - "#" BOOST_WAVE_PP_IMPORT, -#else - "", - "", - "", -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - - // MS extensions - "__int8", - "__int16", - "__int32", - "__int64", - "__based", - "__declspec", - "__cdecl", - "__fastcall", - "__stdcall", - "__try", - "__except", - "__finally", - "__leave", - "__inline", - "__asm", + /* 256 */ "&", + /* 257 */ "&&", + /* 258 */ "=", + /* 259 */ "&=", + /* 260 */ "|", + /* 261 */ "|=", + /* 262 */ "^", + /* 263 */ "^=", + /* 264 */ ",", + /* 265 */ ":", + /* 266 */ "/", + /* 267 */ "/=", + /* 268 */ ".", + /* 269 */ ".*", + /* 270 */ "...", + /* 271 */ "==", + /* 272 */ ">", + /* 273 */ ">=", + /* 274 */ "{", + /* 275 */ "<", + /* 276 */ "<=", + /* 277 */ "(", + /* 278 */ "[", + /* 279 */ "-", + /* 280 */ "-=", + /* 281 */ "--", + /* 282 */ "%", + /* 283 */ "%=", + /* 284 */ "!", + /* 285 */ "!=", + /* 286 */ "||", + /* 287 */ "+", + /* 288 */ "+=", + /* 289 */ "++", + /* 290 */ "->", + /* 291 */ "->*", + /* 292 */ "?", + /* 293 */ "}", + /* 294 */ ")", + /* 295 */ "]", + /* 296 */ "::", + /* 297 */ ";", + /* 298 */ "<<", + /* 299 */ "<<=", + /* 300 */ ">>", + /* 301 */ ">>=", + /* 302 */ "*", + /* 303 */ "~", + /* 304 */ "*=", + /* 305 */ "asm", + /* 306 */ "auto", + /* 307 */ "bool", + /* 308 */ "false", + /* 309 */ "true", + /* 310 */ "break", + /* 311 */ "case", + /* 312 */ "catch", + /* 313 */ "char", + /* 314 */ "class", + /* 315 */ "const", + /* 316 */ "const_cast", + /* 317 */ "continue", + /* 318 */ "default", + /* 319 */ "defined", + /* 320 */ "delete", + /* 321 */ "do", + /* 322 */ "double", + /* 323 */ "dynamic_cast", + /* 324 */ "else", + /* 325 */ "enum", + /* 326 */ "explicit", + /* 327 */ "export", + /* 328 */ "extern", + /* 329 */ "float", + /* 330 */ "for", + /* 331 */ "friend", + /* 332 */ "goto", + /* 333 */ "if", + /* 334 */ "inline", + /* 335 */ "int", + /* 336 */ "long", + /* 337 */ "mutable", + /* 338 */ "namespace", + /* 339 */ "new", + /* 340 */ "operator", + /* 341 */ "private", + /* 342 */ "protected", + /* 343 */ "public", + /* 344 */ "register", + /* 345 */ "reinterpret_cast", + /* 346 */ "return", + /* 347 */ "short", + /* 348 */ "signed", + /* 349 */ "sizeof", + /* 350 */ "static", + /* 351 */ "static_cast", + /* 352 */ "struct", + /* 353 */ "switch", + /* 354 */ "template", + /* 355 */ "this", + /* 356 */ "throw", + /* 357 */ "try", + /* 358 */ "typedef", + /* 359 */ "typeid", + /* 360 */ "typename", + /* 361 */ "union", + /* 362 */ "unsigned", + /* 363 */ "using", + /* 364 */ "virtual", + /* 365 */ "void", + /* 366 */ "volatile", + /* 367 */ "wchar_t", + /* 368 */ "while", + /* 369 */ "#define", + /* 370 */ "#if", + /* 371 */ "#ifdef", + /* 372 */ "#ifndef", + /* 373 */ "#else", + /* 374 */ "#elif", + /* 375 */ "#endif", + /* 376 */ "#error", + /* 377 */ "#line", + /* 378 */ "#pragma ", + /* 379 */ "#undef ", + /* 380 */ "#warning", + /* 381 */ "", // identifier + /* 382 */ "", // octalint + /* 383 */ "", // decimalint + /* 384 */ "", // hexlit + /* 385 */ "", // intlit + /* 386 */ "", // floatlit + /* 387 */ "", // ccomment + /* 388 */ "", // cppcomment + /* 389 */ "", // charlit + /* 390 */ "", // stringlit + /* 391 */ "", // contline + /* 392 */ "", // space + /* 393 */ "", // space2 + /* 394 */ "\n", + /* 395 */ "##", + /* 396 */ "#", + /* 397 */ "", // any + /* 398 */ "#include", + /* 399 */ "#include", + /* 400 */ "#include", + /* 401 */ "", // eof + /* 402 */ "", // eoi + + // MS extensions + /* 403 */ "__int8", + /* 404 */ "__int16", + /* 405 */ "__int32", + /* 406 */ "__int64", + /* 407 */ "__based", + /* 408 */ "__declspec", + /* 409 */ "__cdecl", + /* 410 */ "__fastcall", + /* 411 */ "__stdcall", + /* 412 */ "__try", + /* 413 */ "__except", + /* 414 */ "__finally", + /* 415 */ "__leave", + /* 416 */ "__inline", + /* 417 */ "__asm", }; unsigned int id = BASEID_FROM_TOKEN(tokid)-T_FIRST_TOKEN; diff --git a/include/boost/wave/trace_policies.hpp b/include/boost/wave/trace_policies.hpp index 4a89691..1fcfe2a 100644 --- a/include/boost/wave/trace_policies.hpp +++ b/include/boost/wave/trace_policies.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(TRACE_POLICIES_HPP_338DE478_A13C_4B63_9BA9_041C917793B8_INCLUDED) diff --git a/include/boost/wave/util/cpp_ifblock.hpp b/include/boost/wave/util/cpp_ifblock.hpp index 2ff6d78..dfbc15a 100644 --- a/include/boost/wave/util/cpp_ifblock.hpp +++ b/include/boost/wave/util/cpp_ifblock.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_IFBLOCK_HPP_D4676B36_00C5_41F4_BC9F_9CBBAE3B8006_INCLUDED) diff --git a/include/boost/wave/util/cpp_include_pathes.hpp b/include/boost/wave/util/cpp_include_pathes.hpp index 2d6e050..27bd93d 100644 --- a/include/boost/wave/util/cpp_include_pathes.hpp +++ b/include/boost/wave/util/cpp_include_pathes.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_INCLUDE_PATHES_HPP_AF620DA4_B3D2_4221_AD91_8A1ABFFB6944_INCLUDED) diff --git a/include/boost/wave/util/cpp_iterator.hpp b/include/boost/wave/util/cpp_iterator.hpp index a4e3886..58ccf3e 100644 --- a/include/boost/wave/util/cpp_iterator.hpp +++ b/include/boost/wave/util/cpp_iterator.hpp @@ -3,12 +3,11 @@ Definition of the preprocessor iterator - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_ITERATOR_HPP_175CA88F_7273_43FA_9039_BCF7459E1F29_INCLUDED) @@ -61,7 +60,7 @@ retrieve_macroname(ParseNodeT const &node, boost::spirit::parser_id id, { ParseNodeT const *name_node = 0; - typedef boost::wave::grammars::cpp_grammar_gen cpp_grammar_t; + typedef boost::wave::grammars::cpp_grammar_gen cpp_grammar_type; using boost::spirit::find_node; if (!find_node(node, id, &name_node)) { @@ -134,11 +133,11 @@ template bool add_macro_definition(ContextT &ctx, std::string macrostring, bool is_predefined, boost::wave::language_support language) { - typedef typename ContextT::token_t token_t; - typedef typename ContextT::lex_t lex_t; - typedef typename token_t::position_t position_t; - typedef boost::wave::grammars::predefined_macros_grammar_gen - predef_macros_t; + typedef typename ContextT::token_type token_type; + typedef typename ContextT::lexer_type lexer_type; + typedef typename token_type::position_type position_type; + typedef boost::wave::grammars::predefined_macros_grammar_gen + predef_macros_type; using namespace boost::wave; using namespace std; // isspace is in std namespace for some systems @@ -151,10 +150,10 @@ std::string::iterator end = macrostring.end(); ++begin; // parse the macr definition -position_t act_pos("command line", 0); -boost::spirit::tree_parse_info hit = - predef_macros_t::parse_predefined_macro( - lex_t(begin, end, position_t(), language), lex_t()); +position_type act_pos("command line", 0); +boost::spirit::tree_parse_info hit = + predef_macros_type::parse_predefined_macro( + lexer_type(begin, end, position_type(), language), lexer_type()); if (!hit.match || (!hit.full && T_EOF != token_id(*hit.stop))) { BOOST_WAVE_THROW(preprocess_exception, bad_macro_definition, macrostring, @@ -162,26 +161,26 @@ boost::spirit::tree_parse_info hit = } // retrieve the macro definition from the parse tree -token_t macroname; -std::vector macroparameters; -typename ContextT::token_sequence_t macrodefinition; +token_type macroname; +std::vector macroparameters; +typename ContextT::token_sequence_type macrodefinition; bool has_parameters = false; boost::wave::util::retrieve_macroname(*hit.trees.begin(), - predef_macros_t::rule_ids.plain_define_id, macroname, act_pos); + predef_macros_type::rule_ids.plain_define_id, macroname, act_pos); has_parameters = boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(), - predef_macros_t::rule_ids.macro_parameters_id, macroparameters, - token_t()); + predef_macros_type::rule_ids.macro_parameters_id, macroparameters, + token_type()); boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(), - predef_macros_t::rule_ids.macro_definition_id, macrodefinition, - token_t()); + predef_macros_type::rule_ids.macro_definition_id, macrodefinition, + token_type()); // If no macrodefinition is given, and the macro string does not end with a // '=', then the macro should be defined with the value '1' if (0 == macrodefinition.size() && '=' != macrostring[macrostring.size()-1]) { - macrodefinition.push_back(token_t(T_INTLIT, "1", act_pos)); + macrodefinition.push_back(token_type(T_INTLIT, "1", act_pos)); } // add the new macro to the macromap @@ -209,21 +208,22 @@ class pp_iterator_functor { public: // interface to the boost::spirit::multi_pass_policies::functor_input policy - typedef typename ContextT::token_t result_type; + typedef typename ContextT::token_type result_type; // eof token static result_type const eof; private: - typedef typename ContextT::lex_t lex_t; - typedef typename result_type::string_t string_t; - typedef boost::wave::grammars::cpp_grammar_gen cpp_grammar_t; + typedef typename ContextT::lexer_type lexer_type; + typedef typename result_type::string_type string_type; + typedef boost::wave::grammars::cpp_grammar_gen + cpp_grammar_type; // iteration context related types (an iteration context represents a current // position in an included file) - typedef base_iteration_context base_iteration_context_t; + typedef base_iteration_context base_iteration_context_type; typedef - iteration_context + iteration_context iteration_context_t; // parse tree related types @@ -231,23 +231,23 @@ private: boost::spirit::node_val_data_factory node_factory_t; typedef - boost::spirit::tree_match + boost::spirit::tree_match parse_tree_match_t; - typedef typename parse_tree_match_t::node_t parse_node_t; // tree_node > - typedef typename parse_tree_match_t::parse_node_t parse_node_value_t; // node_val_data<> - typedef typename parse_tree_match_t::container_t parse_tree_t; // parse_node_t::children_t + typedef typename parse_tree_match_t::node_t parse_node_type; // tree_node > + typedef typename parse_tree_match_t::parse_node_t parse_node_value_type; // node_val_data<> + typedef typename parse_tree_match_t::container_t parse_tree_type; // parse_node_type::children_t // type of a token sequence - typedef typename ContextT::token_sequence_t token_sequence_t; + typedef typename ContextT::token_sequence_type token_sequence_type; public: template pp_iterator_functor(ContextT &ctx_, IteratorT const &first_, - IteratorT const &last_, typename ContextT::position_t const &pos_, + IteratorT const &last_, typename ContextT::position_type const &pos_, boost::wave::language_support language) : ctx(ctx_), - iter_ctx(new base_iteration_context_t( - lex_t(first_, last_, pos_, language), lex_t(), + iter_ctx(new base_iteration_context_type( + lexer_type(first_, last_, pos_, language), lexer_type(), pos_.get_file().c_str() )), seen_newline(true), must_emit_line_directive(false), @@ -274,64 +274,56 @@ protected: result_type const &pp_token(bool consider_emitting_line_directive = false); bool pp_directive(); - bool dispatch_directive(boost::spirit::tree_parse_info const &hit); + bool dispatch_directive(boost::spirit::tree_parse_info const &hit); - void on_include(string_t const &s, bool is_system, bool include_next); - void on_include(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end, bool include_next); + void on_include(string_type const &s, bool is_system, bool include_next); + void on_include(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end, bool include_next); - void on_define(parse_node_t const &node); + void on_define(parse_node_type const &node); void on_undefine(result_type const &t); - void on_ifdef(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); - void on_ifndef(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); + void on_ifdef(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); + void on_ifndef(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); void on_else(); void on_endif(); - void on_illformed(typename result_type::string_t const &s); + void on_illformed(typename result_type::string_type const &s); - void on_line(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); - void on_if(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); - void on_elif(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); - void on_error(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); + void on_line(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); + void on_if(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); + void on_elif(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); + void on_error(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); #if BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE != 0 - void on_warning(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); -#endif - bool on_pragma(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - void on_region(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); - void on_endregion(); - void on_import(typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end); + void on_warning(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); #endif + bool on_pragma(typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end); result_type const &emit_line_directive(); bool returned_from_include(); - bool interpret_pragma(token_sequence_t const &pragma_body, - token_sequence_t &result); + bool interpret_pragma(token_sequence_type const &pragma_body, + token_sequence_type &result); private: ContextT &ctx; // context, this iterator is associated with - boost::shared_ptr iter_ctx; + boost::shared_ptr iter_ctx; bool seen_newline; // needed for recognizing begin of line bool must_emit_line_directive; // must emit a line directive result_type act_token; // current token - typename result_type::position_t &act_pos; // current fileposition (references the macromap) + typename result_type::position_type &act_pos; // current fileposition (references the macromap) int last_line; // line number of the previous token - token_sequence_t unput_queue; // tokens to be preprocessed again - token_sequence_t pending_queue; // tokens already preprocessed + token_sequence_type unput_queue; // tokens to be preprocessed again + token_sequence_type pending_queue; // tokens already preprocessed // detect whether to insert additional whitespace in between two adjacent // tokens, which otherwise would form a different token type, if @@ -444,26 +436,6 @@ token_id id = token_id(act_token); seen_newline = true; break; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - // The special pp-tokens __comma__, __lparen__ and __rparen__ are to be - // converted to their respective 'normal' tokens just before returning - // them to the caller. - case T_COMMA_ALT: - act_token.set_token_id(T_COMMA); - act_token.set_value(","); - break; - - case T_LEFTPAREN_ALT: - act_token.set_token_id(T_LEFTPAREN); - act_token.set_value("("); - break; - - case T_RIGHTPAREN_ALT: - act_token.set_token_id(T_RIGHTPAREN); - act_token.set_value(")"); - break; -#endif - default: break; } @@ -474,7 +446,7 @@ token_id id = token_id(act_token); whitespace.shift_tokens(T_SPACE); pending_queue.push_front(act_token); // push this token back return act_token = result_type(T_SPACE, - typename result_type::string_t(" "), + typename result_type::string_type(" "), act_token.get_position()); } whitespace.shift_tokens(id); @@ -573,8 +545,8 @@ bool returned_from_include_file = returned_from_include(); whitespace.shift_tokens(T_NEWLINE); // whitespace controller return act_token = result_type(T_NEWLINE, - typename result_type::string_t("\n"), - cpp_grammar_t::pos_of_newline); + typename result_type::string_type("\n"), + cpp_grammar_type::pos_of_newline); } // overall eof reached @@ -598,7 +570,7 @@ pp_iterator_functor::emit_line_directive() { using namespace boost::wave; -typename ContextT::position_t pos = act_token.get_position(); +typename ContextT::position_type pos = act_token.get_position(); if (must_emit_line_directive || iter_ctx->emitted_lines != act_pos.get_line()) @@ -676,11 +648,8 @@ token_id id = token_id(*iter_ctx->first); pending_queue.pop_front(); } else if (!unput_queue.empty() - || T_IDENTIFIER == id || IS_CATEGORY(id, KeywordTokenType) -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - || (T_COLON_COLON == id && boost::wave::need_cpp0x(ctx.get_language())) -#endif - ) + || T_IDENTIFIER == id + || IS_CATEGORY(id, KeywordTokenType)) { // call the lexer, preprocess the required number of tokens, put them // into the unput queue @@ -767,7 +736,7 @@ pp_iterator_functor::pp_directive() using namespace cpplexer; // test, if the next non-whitespace token is a pp directive -lex_t it = iter_ctx->first; +lexer_type it = iter_ctx->first; if (!next_token_is_pp_directive(it, iter_ctx->last)) { // eventually skip null pp directive (no need to do it via the parser) @@ -799,8 +768,8 @@ lex_t it = iter_ctx->first; // found a pp directive, so try to identify it, start with the pp_token bool found_eof = false; -boost::spirit::tree_parse_info hit = - cpp_grammar_t::parse_cpp_grammar(it, iter_ctx->last, found_eof, act_pos); +boost::spirit::tree_parse_info hit = + cpp_grammar_type::parse_cpp_grammar(it, iter_ctx->last, found_eof, act_pos); if (hit.match) { // position the iterator past the matched sequence to allow @@ -831,25 +800,25 @@ boost::spirit::tree_parse_info hit = template inline bool pp_iterator_functor::dispatch_directive( - boost::spirit::tree_parse_info const &hit) + boost::spirit::tree_parse_info const &hit) { using namespace cpplexer; using namespace boost::spirit; - typedef typename parse_tree_t::const_iterator const_child_iterator_t; + typedef typename parse_tree_type::const_iterator const_child_iterator_t; // this iterator points to the root node of the parse tree const_child_iterator_t begin = hit.trees.begin(); // decide, which preprocessor directive was found -parse_tree_t const &root = (*begin).children; -parse_node_value_t const &nodeval = get_first_leaf(*root.begin()).value; +parse_tree_type const &root = (*begin).children; +parse_node_value_type const &nodeval = get_first_leaf(*root.begin()).value; //long node_id = nodeval.id().to_long(); const_child_iterator_t begin_child_it = (*root.begin()).children.begin(); const_child_iterator_t end_child_it = (*root.begin()).children.end(); -token_id id = cpp_grammar_t::found_directive; +token_id id = cpp_grammar_type::found_directive; switch (id) { case T_PP_QHEADER: // #include "..." @@ -924,44 +893,6 @@ token_id id = cpp_grammar_t::found_directive; case T_PP_PRAGMA: // #pragma return on_pragma(begin_child_it, end_child_it); -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - case T_PP_REGION: // #region - if (boost::wave::need_cpp0x(ctx.get_language())) { - // C++0x mode is enabled - const_child_iterator_t begin_it = (*begin_child_it).children.begin(); - const_child_iterator_t end_it = (*begin_child_it).children.end(); - - on_region(begin_it, end_it); - } - else { - on_illformed("#" BOOST_WAVE_PP_REGION); - } - break; - - case T_PP_ENDREGION: // #endregion - if (boost::wave::need_cpp0x(ctx.get_language())) { - // C++0x mode is enabled - on_endregion(); - } - else { - on_illformed("#" BOOST_WAVE_PP_ENDREGION); - } - break; - - case T_PP_IMPORT: // #import - if (boost::wave::need_cpp0x(ctx.get_language())) { - // C++0x mode is enabled - const_child_iterator_t begin_it = (*begin_child_it).children.begin(); - const_child_iterator_t end_it = (*begin_child_it).children.end(); - - on_import(begin_it, end_it); - } - else { - on_illformed("#" BOOST_WAVE_PP_IMPORT); - } - break; -#endif - default: // #something else on_illformed((*nodeval.begin()).get_value()); break; @@ -976,22 +907,22 @@ token_id id = cpp_grammar_t::found_directive; /////////////////////////////////////////////////////////////////////////////// template inline void -pp_iterator_functor::on_include (string_t const &s, bool is_system, +pp_iterator_functor::on_include (string_type const &s, bool is_system, bool include_next) { BOOST_ASSERT(ctx.get_if_block_status()); // strip quotes first, extract filename -typename string_t::size_type pos_end = s.find_last_of(is_system ? '>' : '\"'); +typename string_type::size_type pos_end = s.find_last_of(is_system ? '>' : '\"'); - if (string_t::npos == pos_end) { + if (string_type::npos == pos_end) { BOOST_WAVE_THROW(preprocess_exception, bad_include_statement, s, act_pos); } -typename string_t::size_type pos_begin = +typename string_type::size_type pos_begin = s.find_last_of(is_system ? '<' : '\"', pos_end-1); - if (string_t::npos == pos_begin) { + if (string_type::npos == pos_begin) { BOOST_WAVE_THROW(preprocess_exception, bad_include_statement, s, act_pos); } @@ -1035,7 +966,7 @@ fs::path native_path(file_path, fs::native); ctx.set_current_directory(file_path.c_str()); // preprocess the opened file - boost::shared_ptr new_iter_ctx ( + boost::shared_ptr new_iter_ctx ( new iteration_context_t(native_path.native_file_string().c_str(), act_pos, ctx.get_language())); @@ -1073,26 +1004,26 @@ fs::path native_path(file_path, fs::native); template inline void pp_iterator_functor::on_include( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end, bool include_next) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end, bool include_next) { BOOST_ASSERT(ctx.get_if_block_status()); // preprocess the given token sequence (the body of the #include directive) -get_token_value get_value; -token_sequence_t expanded; -token_sequence_t toexpand; +get_token_value get_value; +token_sequence_type expanded; +token_sequence_type toexpand; std::copy(make_ref_transform_iterator(begin, get_value), make_ref_transform_iterator(end, get_value), std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded, false); // now, include the file -string_t s (trim_whitespace(boost::wave::util::impl::as_string(expanded))); +string_type s (trim_whitespace(boost::wave::util::impl::as_string(expanded))); bool is_system = '<' == s[0] && '>' == s[s.size()-1]; if (!is_system && !('\"' == s[0] && '\"' == s[s.size()-1])) { @@ -1111,23 +1042,23 @@ bool is_system = '<' == s[0] && '>' == s[s.size()-1]; template inline void -pp_iterator_functor::on_define (parse_node_t const &node) +pp_iterator_functor::on_define (parse_node_type const &node) { BOOST_ASSERT(ctx.get_if_block_status()); // retrieve the macro definition from the parse tree result_type macroname; std::vector macroparameters; -token_sequence_t macrodefinition; +token_sequence_type macrodefinition; bool has_parameters = false; boost::wave::util::retrieve_macroname(node, - cpp_grammar_t::rule_ids.plain_define_id, macroname, + cpp_grammar_type::rule_ids.plain_define_id, macroname, act_token.get_position()); has_parameters = boost::wave::util::retrieve_macrodefinition(node, - cpp_grammar_t::rule_ids.macro_parameters_id, macroparameters, act_token); + cpp_grammar_type::rule_ids.macro_parameters_id, macroparameters, act_token); boost::wave::util::retrieve_macrodefinition(node, - cpp_grammar_t::rule_ids.macro_definition_id, macrodefinition, act_token); + cpp_grammar_type::rule_ids.macro_definition_id, macrodefinition, act_token); if (has_parameters) { #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 @@ -1155,7 +1086,7 @@ bool has_parameters = false; // if there wasn't an ellipsis, then there shouldn't be a __VA_ARGS__ // placeholder in the definition too [C99 Standard 6.10.3.5] if (!seen_ellipses) { - typedef typename token_sequence_t::iterator definition_iterator_t; + typedef typename token_sequence_type::iterator definition_iterator_t; bool seen_va_args = false; definition_iterator_t end = macrodefinition.end(); @@ -1224,10 +1155,10 @@ pp_iterator_functor::on_undefine (result_type const &token) template inline void pp_iterator_functor::on_ifdef( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { -get_token_value get_value; +get_token_value get_value; bool is_defined = ctx.is_defined_macro( make_ref_transform_iterator((*begin).children.begin(), get_value), make_ref_transform_iterator((*begin).children.end(), get_value)); @@ -1243,10 +1174,10 @@ bool is_defined = ctx.is_defined_macro( template inline void pp_iterator_functor::on_ifndef( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { -get_token_value get_value; +get_token_value get_value; bool is_defined = ctx.is_defined_macro( make_ref_transform_iterator((*begin).children.begin(), get_value), make_ref_transform_iterator((*begin).children.end(), get_value)); @@ -1294,24 +1225,24 @@ pp_iterator_functor::on_endif() template inline void pp_iterator_functor::on_if( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { // preprocess the given sequence into the provided list -get_token_value get_value; -token_sequence_t expanded; -token_sequence_t toexpand; +get_token_value get_value; +token_sequence_type expanded; +token_sequence_type toexpand; std::copy(make_ref_transform_iterator(begin, get_value), make_ref_transform_iterator(end, get_value), std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded); // replace all remaining (== undefined) identifiers with a integer lliteral '0' - typename token_sequence_t::iterator exp_end = expanded.end(); - for (typename token_sequence_t::iterator exp_it = expanded.begin(); + typename token_sequence_type::iterator exp_end = expanded.end(); + for (typename token_sequence_type::iterator exp_it = expanded.begin(); exp_it != exp_end; ++exp_it) { using namespace boost::wave; @@ -1327,15 +1258,15 @@ token_sequence_t toexpand; #if BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS != 0 { - string_t outstr(boost::wave::util::impl::as_string(toexpand)); + string_type outstr(boost::wave::util::impl::as_string(toexpand)); outstr += "(" + boost::wave::util::impl::as_string(expanded) + ")"; WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT << "#if " << outstr << std::endl; } #endif // parse the expression and enter the #if block - typedef typename ContextT::token_t token_t; - ctx.enter_if_block(grammars::expression_grammar_gen:: + typedef typename ContextT::token_type token_type; + ctx.enter_if_block(grammars::expression_grammar_gen:: evaluate(expanded.begin(), expanded.end(), act_pos, ctx.get_if_block_status())); } @@ -1348,8 +1279,8 @@ token_sequence_t toexpand; template inline void pp_iterator_functor::on_elif( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { if (ctx.get_if_block_status()) { if (!ctx.enter_elif_block(false)) { @@ -1361,20 +1292,20 @@ pp_iterator_functor::on_elif( } // preprocess the given sequence into the provided list -get_token_value get_value; -token_sequence_t expanded; -token_sequence_t toexpand; +get_token_value get_value; +token_sequence_type expanded; +token_sequence_type toexpand; std::copy(make_ref_transform_iterator(begin, get_value), make_ref_transform_iterator(end, get_value), std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded); // replace all remaining (== undefined) identifiers with a integer lliteral '0' - typename token_sequence_t::iterator exp_end = expanded.end(); - for (typename token_sequence_t::iterator exp_it = expanded.begin(); + typename token_sequence_type::iterator exp_end = expanded.end(); + for (typename token_sequence_type::iterator exp_it = expanded.begin(); exp_it != exp_end; ++exp_it) { using namespace boost::wave; @@ -1390,15 +1321,15 @@ token_sequence_t toexpand; #if BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS != 0 { - string_t outstr(boost::wave::util::impl::as_string(toexpand)); + string_type outstr(boost::wave::util::impl::as_string(toexpand)); outstr += "(" + boost::wave::util::impl::as_string(expanded) + ")"; BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT << "#elif " << outstr << std::endl; } #endif // parse the expression and enter the #elif block - typedef typename ContextT::token_t token_t; - ctx.enter_elif_block(grammars::expression_grammar_gen:: + typedef typename ContextT::token_type token_type; + ctx.enter_elif_block(grammars::expression_grammar_gen:: evaluate(expanded.begin(), expanded.end(), act_pos, ctx.get_if_block_status())); } @@ -1411,7 +1342,7 @@ token_sequence_t toexpand; template inline void pp_iterator_functor::on_illformed( - typename result_type::string_t const &s) + typename result_type::string_type const &s) { BOOST_ASSERT(ctx.get_if_block_status()); BOOST_WAVE_THROW(preprocess_exception, ill_formed_directive, s, act_pos); @@ -1459,20 +1390,20 @@ namespace { template inline void pp_iterator_functor::on_line( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { BOOST_ASSERT(ctx.get_if_block_status()); // Try to extract the line number and file name from the given token list // directly. If that fails, preprocess the whole token sequence and try again // to extract this information. -token_sequence_t expanded; -get_token_value get_value; +token_sequence_type expanded; +get_token_value get_value; typedef typename ref_transform_iterator_generator< - get_token_value, - typename parse_tree_t::const_iterator + get_token_value, + typename parse_tree_type::const_iterator >::type const_tree_iterator_t; const_tree_iterator_t first = make_ref_transform_iterator(begin, get_value); @@ -1481,16 +1412,16 @@ const_tree_iterator_t last = make_ref_transform_iterator(end, get_value); // try to interpret the #line body as a number followed by an optional // string literal int line = 0; -string_t file_name; +string_type file_name; if (!retrieve_line_info(first, last, line, file_name)) { // preprocess the body of this #line message - token_sequence_t toexpand; + token_sequence_type toexpand; std::copy(first, make_ref_transform_iterator(end, get_value), std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded, false); @@ -1539,28 +1470,28 @@ namespace { template inline void pp_iterator_functor::on_error( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { BOOST_ASSERT(ctx.get_if_block_status()); // preprocess the given sequence into the provided list -token_sequence_t expanded; -get_token_value get_value; +token_sequence_type expanded; +get_token_value get_value; typename ref_transform_iterator_generator< - get_token_value, - typename parse_tree_t::const_iterator + get_token_value, + typename parse_tree_type::const_iterator >::type first = make_ref_transform_iterator(begin, get_value); #if BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY != 0 // preprocess the body of this #error message -token_sequence_t toexpand; +token_sequence_type toexpand; std::copy(first, make_ref_transform_iterator(end, get_value), std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded, false); #else @@ -1584,28 +1515,28 @@ token_sequence_t toexpand; template inline void pp_iterator_functor::on_warning( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { BOOST_ASSERT(ctx.get_if_block_status()); // preprocess the given sequence into the provided list -token_sequence_t expanded; -get_token_value get_value; +token_sequence_type expanded; +get_token_value get_value; typename ref_transform_iterator_generator< - get_token_value, - typename parse_tree_t::const_iterator + get_token_value, + typename parse_tree_type::const_iterator >::type first = make_ref_transform_iterator(begin, get_value); #if BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY != 0 // preprocess the body of this #warning message -token_sequence_t toexpand; +token_sequence_type toexpand; std::copy(first, make_ref_transform_iterator(end, get_value), std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded, false); #else @@ -1629,8 +1560,8 @@ token_sequence_t toexpand; template inline bool pp_iterator_functor::on_pragma( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) + typename parse_tree_type::const_iterator const &begin, + typename parse_tree_type::const_iterator const &end) { using namespace boost::wave; @@ -1639,12 +1570,12 @@ pp_iterator_functor::on_pragma( // Look at the pragma token sequence and decide, if the first token is STDC // (see C99 standard [6.10.6.2]), if it is, the sequence must _not_ be // preprocessed. -token_sequence_t expanded; -get_token_value get_value; +token_sequence_type expanded; +get_token_value get_value; typedef typename ref_transform_iterator_generator< - get_token_value, - typename parse_tree_t::const_iterator + get_token_value, + typename parse_tree_type::const_iterator >::type const_tree_iterator_t; const_tree_iterator_t first = make_ref_transform_iterator(begin, get_value); @@ -1667,11 +1598,11 @@ const_tree_iterator_t last = make_ref_transform_iterator(end, get_value); else { #if BOOST_WAVE_PREPROCESS_PRAGMA_BODY != 0 // preprocess the given tokensequence - token_sequence_t toexpand; + token_sequence_type toexpand; std::copy(first, last, std::inserter(toexpand, toexpand.end())); - typename token_sequence_t::iterator begin2 = toexpand.begin(); + typename token_sequence_type::iterator begin2 = toexpand.begin(); ctx.expand_whole_tokensequence(begin2, toexpand.end(), expanded, false); #else @@ -1687,7 +1618,7 @@ const_tree_iterator_t last = make_ref_transform_iterator(end, get_value); BOOST_ASSERT(pending_queue.empty()); // try to interpret the expanded #pragma body - token_sequence_t pending; + token_sequence_type pending; if (interpret_pragma(expanded, pending)) { // if there is some replacement text, insert it into the pending queue if (pending.size() > 0) @@ -1708,12 +1639,12 @@ const_tree_iterator_t last = make_ref_transform_iterator(end, get_value); template inline bool pp_iterator_functor::interpret_pragma( - token_sequence_t const &pragma_body, token_sequence_t &result) + token_sequence_type const &pragma_body, token_sequence_type &result) { using namespace cpplexer; - typename token_sequence_t::const_iterator end = pragma_body.end(); - typename token_sequence_t::const_iterator it = pragma_body.begin(); + typename token_sequence_type::const_iterator end = pragma_body.end(); + typename token_sequence_type::const_iterator it = pragma_body.begin(); for (++it; it != end && IS_CATEGORY(*it, WhiteSpaceTokenType); ++it) /**/; // skip whitespace @@ -1724,73 +1655,6 @@ pp_iterator_functor::interpret_pragma( ctx.get_language()); } -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -/////////////////////////////////////////////////////////////////////////////// -// -// on_region(): handle #region directives -// -/////////////////////////////////////////////////////////////////////////////// -template -inline void -pp_iterator_functor::on_region( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) -{ - BOOST_ASSERT(ctx.get_if_block_status()); - -// if there is a name given, start a named region - if (begin != end) { - // (re-)open named region - get_token_value get_value; - - ctx.begin_scope( - make_ref_transform_iterator((*begin).children.begin(), get_value), - make_ref_transform_iterator((*begin).children.end(), get_value)); - } - else { - // (re-)open unnamed region - ctx.begin_unnamed_scope(); - } -} - -/////////////////////////////////////////////////////////////////////////////// -// -// on_endregion(): handle #endregion directives -// -/////////////////////////////////////////////////////////////////////////////// -template -inline void -pp_iterator_functor::on_endregion() -{ - BOOST_ASSERT(ctx.get_if_block_status()); - ctx.end_scope(); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// on_import(): handle #import directives -// -/////////////////////////////////////////////////////////////////////////////// -template -inline void -pp_iterator_functor::on_import( - typename parse_tree_t::const_iterator const &begin, - typename parse_tree_t::const_iterator const &end) -{ - BOOST_ASSERT(ctx.get_if_block_status()); - -// import all given macro names/scope names - get_token_value get_value; - for (typename parse_tree_t::const_iterator it = begin; it != end; ++it) { - // import every single of the listed names - ctx.import_name( - make_ref_transform_iterator((*it).children.begin(), get_value), - make_ref_transform_iterator((*it).children.end(), get_value)); - } -} - -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - /////////////////////////////////////////////////////////////////////////////// } // namespace impl @@ -1811,13 +1675,13 @@ class pp_iterator > { public: - typedef boost::wave::impl::pp_iterator_functor input_policy_t; + typedef boost::wave::impl::pp_iterator_functor input_policy_type; private: typedef - boost::spirit::multi_pass + boost::spirit::multi_pass base_t; - typedef pp_iterator self_t; + typedef pp_iterator self_type; typedef boost::wave::util::functor_input functor_input_t; public: @@ -1826,9 +1690,9 @@ public: template pp_iterator(ContextT &ctx, IteratorT const &first, IteratorT const &last, - typename ContextT::position_t const &pos, + typename ContextT::position_type const &pos, boost::wave::language_support language) - : base_t(input_policy_t(ctx, first, last, pos, language)) + : base_t(input_policy_type(ctx, first, last, pos, language)) {} void force_include(char const *path_, bool is_last) @@ -1836,7 +1700,7 @@ public: get_functor().on_include_helper(path_, false, false); if (is_last) { this->functor_input_t:: - template inner::advance_input(); + template inner::advance_input(); } } }; diff --git a/include/boost/wave/util/cpp_macromap.hpp b/include/boost/wave/util/cpp_macromap.hpp index 9bc7ae3..6cef92e 100644 --- a/include/boost/wave/util/cpp_macromap.hpp +++ b/include/boost/wave/util/cpp_macromap.hpp @@ -3,12 +3,11 @@ Macro expansion engine - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_MACROMAP_HPP_CB8F51B0_A3F0_411C_AEF4_6FF631B8B414_INCLUDED) @@ -27,10 +26,6 @@ #include #include -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -#include -#endif - #include #include @@ -116,21 +111,21 @@ namespace on_exit { template class macromap { - typedef macromap self_t; - typedef typename ContextT::token_t token_t; - typedef typename token_t::string_t string_t; - typedef typename token_t::position_t position_t; + typedef macromap self_type; + typedef typename ContextT::token_type token_type; + typedef typename token_type::string_type string_type; + typedef typename token_type::position_type position_type; // type of a token sequence - typedef typename ContextT::token_sequence_t definition_container_t; + typedef typename ContextT::token_sequence_type definition_container_t; - typedef macro_definition + typedef macro_definition macro_definition_t; - typedef symbol_table defined_macros_t; + typedef symbol_table defined_macros_t; typedef typename defined_macros_t::value_type::second_type macro_ref_t; - typedef std::vector parameter_container_t; + typedef std::vector parameter_container_t; public: macromap(ContextT &ctx_) @@ -141,18 +136,18 @@ public: } ~macromap() {} - bool add_macro(token_t const &name, bool has_parameters, + bool add_macro(token_type const &name, bool has_parameters, parameter_container_t ¶meters, definition_container_t &definition, bool is_predefined = false, defined_macros_t *scope = 0); - bool is_defined(string_t const &name, + bool is_defined(string_type const &name, typename defined_macros_t::iterator &it, defined_macros_t *scope = 0) const; template bool is_defined(IteratorT const &begin, IteratorT const &end); - bool remove_macro(string_t const &name, bool even_predefined = false); + bool remove_macro(string_type const &name, bool even_predefined = false); template - token_t const &expand_tokensequence(IteratorT &first, IteratorT const &last, + token_type const &expand_tokensequence(IteratorT &first, IteratorT const &last, ContainerT &pending, ContainerT &expanded, bool expand_undefined); template @@ -162,58 +157,38 @@ public: void init_predefined_macros(defined_macros_t *scope = 0, bool at_global_scope = true); - void predefine_macro(defined_macros_t *scope, string_t const &name, - token_t const &t); + void predefine_macro(defined_macros_t *scope, string_type const &name, + token_type const &t); void reset_macromap(); - position_t &get_main_pos() { return main_pos; } + position_type &get_main_pos() { return main_pos; } -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -// experimental: macro scoping support - template - void import_name(IteratorT const &begin, IteratorT const &end); - template - void begin_scope(IteratorT const &begin, IteratorT const &end); - void begin_unnamed_scope(); - void end_scope(); -#endif - protected: template - token_t const &expand_tokensequence_worker(ContainerT &pending, - unput_queue_iterator &first, - unput_queue_iterator const &last, + token_type const &expand_tokensequence_worker(ContainerT &pending, + unput_queue_iterator &first, + unput_queue_iterator const &last, bool expand_undefined, bool *seen_qualified_name = 0); template - token_t const &expand_tokensequence_worker_classical(ContainerT &pending, - unput_queue_iterator &first, - unput_queue_iterator const &last, + token_type const &expand_tokensequence_worker_classical(ContainerT &pending, + unput_queue_iterator &first, + unput_queue_iterator const &last, bool expand_undefined); -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - template - token_t const &expand_tokensequence_worker_cpp0x(ContainerT &pending, - unput_queue_iterator &first, - unput_queue_iterator const &last, - bool expand_undefined, bool *seen_qualified_name = 0); - void open_scope(string_t const &name, defined_macros_t *current_scope, - boost::shared_ptr &new_scope); -#endif - template typename std::vector::size_type collect_arguments ( - token_t const curr_token, std::vector &arguments, + token_type const curr_token, std::vector &arguments, IteratorT &next, IteratorT const &end, SizeT const ¶meter_count); template - bool expand_macro(ContainerT &pending, token_t const &name, + bool expand_macro(ContainerT &pending, token_type const &name, typename defined_macros_t::iterator it, IteratorT &first, IteratorT const &last, bool expand_undefined, defined_macros_t *scope = 0, ContainerT *queue_symbol = 0, bool *seen_qualified_name = 0); template - bool expand_predefined_macro(token_t const &curr_token, + bool expand_predefined_macro(token_type const &curr_token, ContainerT &expanded); template @@ -229,12 +204,12 @@ protected: bool expand_undefined, ContainerT &expanded); template - void rescan_replacement_list(token_t const &curr_token, + void rescan_replacement_list(token_type const &curr_token, macro_definition_t ¯odef, ContainerT &replacement_list, ContainerT &expanded, bool expand_undefined, bool *seen_qualified_name); template - token_t const &resolve_defined(IteratorT &first, IteratorT const &last, + token_type const &resolve_defined(IteratorT &first, IteratorT const &last, ContainerT &expanded); template bool resolve_operator_pragma(IteratorT &first, @@ -244,8 +219,8 @@ protected: void concat_tokensequence(ContainerT &expanded); template - bool is_invalid_concat(string_t new_value, - position_t const &pos, ContainerT &rescanned); + bool is_invalid_concat(string_type new_value, + position_type const &pos, ContainerT &rescanned); static bool definition_equals(definition_container_t const &definition, @@ -255,17 +230,14 @@ protected: parameter_container_t const &new_definition); static bool - token_equals(token_t const &left, token_t const &right); + token_equals(token_type const &left, token_type const &right); private: defined_macros_t *current_macros; // current symbol table boost::shared_ptr defined_macros; // global symbol table -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - std::stack > scopes; // opened scopes -#endif - token_t act_token; // current token - position_t main_pos; // last token position in the pp_iterator + token_type act_token; // current token + position_type main_pos; // last token position in the pp_iterator ContextT &ctx; // context object associated with the macromap long macro_uid; }; @@ -294,12 +266,7 @@ namespace { if (str == "cplusplus" || str == "STDC__" || str == "TIME__" || str == "DATE__" || str == "LINE__" || str == "FILE__" || - str == "INCLUDE_LEVEL__" -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - || str == "STDC_FULL_" BOOST_WAVE_PP_REGION_UC "__" - || str == "STDC_CURRENT_" BOOST_WAVE_PP_REGION_UC "__" -#endif - ) + str == "INCLUDE_LEVEL__") { return true; } @@ -310,7 +277,7 @@ namespace { template inline bool -macromap::token_equals(token_t const &left, token_t const &right) +macromap::token_equals(token_type const &left, token_type const &right) { using namespace boost::wave; @@ -403,7 +370,7 @@ typename const_iterator_t first2 = new_parameters.begin(); template inline bool -macromap::add_macro(token_t const &name, bool has_parameters, +macromap::add_macro(token_type const &name, bool has_parameters, parameter_container_t ¶meters, definition_container_t &definition, bool is_predefined, defined_macros_t *scope) { @@ -419,15 +386,9 @@ typename defined_macros_t::iterator it = current_scope->find(name.get_value()); if (it != current_scope->end()) { // redefinition, should not be different -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 if ((*it).second->is_functionlike != has_parameters || !parameters_equal((*it).second->macroparameters, parameters) || !definition_equals((*it).second->macrodefinition, definition)) -#else - if ((*it).data()->is_functionlike != has_parameters || - !parameters_equal((*it).data()->macroparameters, parameters) || - !definition_equals((*it).data()->macrodefinition, definition)) -#endif { BOOST_WAVE_THROW(preprocess_exception, macro_redefinition, name.get_value(), main_pos); @@ -437,11 +398,11 @@ typename defined_macros_t::iterator it = current_scope->find(name.get_value()); // test the validity of the parameter names if (has_parameters) { - std::set names; + std::set names; typedef typename parameter_container_t::iterator parameter_iterator_t; - typedef typename std::set::iterator + typedef typename std::set::iterator name_iterator_t; parameter_iterator_t end = parameters.end(); @@ -458,7 +419,6 @@ typename defined_macros_t::iterator it = current_scope->find(name.get_value()); } // insert a new macro node -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 std::pair p = current_scope->insert( defined_macros_t::value_type( @@ -477,21 +437,6 @@ typename defined_macros_t::iterator it = current_scope->find(name.get_value()); // add the parameters and the definition std::swap((*p.first).second->macroparameters, parameters); std::swap((*p.first).second->macrodefinition, definition); -#else - std::pair p = - current_scope->insert(name.get_value()); - - if (!p.second) { - BOOST_WAVE_THROW(preprocess_exception, macro_insertion_error, - name.get_value(), main_pos); - } - (*p.first).data() = macro_ref_t(new macro_definition_t( - name, has_parameters, is_predefined, ++macro_uid)); - -// add the parameters and the definition - std::swap((*p.first).data()->macroparameters, parameters); - std::swap((*p.first).data()->macrodefinition, definition); -#endif // BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 return true; } @@ -502,7 +447,7 @@ typename defined_macros_t::iterator it = current_scope->find(name.get_value()); /////////////////////////////////////////////////////////////////////////////// template inline bool -macromap::is_defined(typename token_t::string_t const &name, +macromap::is_defined(typename token_type::string_type const &name, typename defined_macros_t::iterator &it, defined_macros_t *scope) const { @@ -526,110 +471,25 @@ macromap::is_defined(IteratorT const &begin, IteratorT const &end) { using namespace cpplexer; - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (boost::wave::need_cpp0x(ctx.get_language())) { - defined_macros_t *current_scope = 0; - bool was_colon_colon = false; - - for (IteratorT it = begin; it != end; /**/) { - if (token_id(*it) == T_COLON_COLON) { - if (was_colon_colon) { - // error: two consecutive '::' - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - if (0 == current_scope) { - // initialize starting scope (global scope) - current_scope = defined_macros.get(); - } - was_colon_colon = true; - ++it; - } - else if (T_IDENTIFIER == token_id(*it) || - IS_CATEGORY(*it, KeywordTokenType)) - { - if (0 == current_scope) { - // initialize starting scope - current_scope = current_macros; // start at current scope - } - else if (!was_colon_colon) { - // error: missing '::' between two parts of the macro name - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - was_colon_colon = false; - - string_t name ((*it).get_value()); - boost::shared_ptr next_scope; - typename defined_macros_t::iterator cit( - current_scope -> find(name)); - - if (cit != current_scope -> end()) { - // defined as a macro name - - // should be the last given name part - if (++it != end) - break; // consider as not defined - return true; // defined as a macro - } - else if (current_scope -> get_scope(name, next_scope)) { - // if this part was the last one, then import the whole scope - if (++it != end) { - // defined as a scope name - current_scope = next_scope.get(); - } - else { - break; // not found - } - } - else { - break; // name is not defined - } - } - else { - if (!IS_CATEGORY(*it, WhiteSpaceTokenType)) { - // invalid token type inside a qualified name - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - ++it; - } - } - } - else -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 { // in normal mode the name under inspection should consist of an identifier // only if (T_IDENTIFIER != token_id(*begin) && !IS_CATEGORY(*begin, KeywordTokenType)) { - if (is_qualified_name(begin, end)) { - BOOST_WAVE_THROW(preprocess_exception, unexpected_qualified_name, - get_full_name(begin, end), main_pos); - } - else { - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } + BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, + get_full_name(begin, end), main_pos); } IteratorT it = begin; - string_t name ((*it).get_value()); + string_type name ((*it).get_value()); typename defined_macros_t::iterator cit( current_macros -> find(name)); if (++it != end) { // there should be only one token as the inspected name - if (is_qualified_name(begin, end)) { - BOOST_WAVE_THROW(preprocess_exception, unexpected_qualified_name, - get_full_name(begin, end), main_pos); - } - else { - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } + BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, + get_full_name(begin, end), main_pos); } return cit != current_macros -> end(); } @@ -643,17 +503,13 @@ macromap::is_defined(IteratorT const &begin, /////////////////////////////////////////////////////////////////////////////// template inline bool -macromap::remove_macro(string_t const &name, +macromap::remove_macro(string_type const &name, bool even_predefined) { typename defined_macros_t::iterator it = current_macros->find(name); if (it != current_macros->end()) { -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 if ((*it).second->is_predefined) { -#else - if ((*it).data()->is_predefined) { -#endif if (!even_predefined || is_special_macroname(name)) { BOOST_WAVE_THROW(preprocess_exception, bad_undefine_statement, name, main_pos); @@ -680,20 +536,20 @@ macromap::remove_macro(string_t const &name, /////////////////////////////////////////////////////////////////////////////// template template -inline typename ContextT::token_t const & +inline typename ContextT::token_type const & macromap::expand_tokensequence(IteratorT &first, IteratorT const &last, ContainerT &pending, ContainerT &expanded, bool expand_undefined) { - typedef impl::gen_unput_queue_iterator gen_t; - typedef typename gen_t::return_t iterator_t; + typedef impl::gen_unput_queue_iterator gen_t; + typedef typename gen_t::return_t iterator_type; ContainerT eof_queue; - iterator_t first_it = gen_t::generate(expanded, first); - iterator_t last_it = gen_t::generate(eof_queue, last); + iterator_type first_it = gen_t::generate(expanded, first); + iterator_type last_it = gen_t::generate(eof_queue, last); bool seen_qualified_name = false; -on_exit::assign on_exit(first, first_it); +on_exit::assign on_exit(first, first_it); return expand_tokensequence_worker(pending, first_it, last_it, expand_undefined, &seen_qualified_name); @@ -799,11 +655,11 @@ namespace impl { template template -inline typename ContextT::token_t const & +inline typename ContextT::token_type const & macromap::expand_tokensequence_worker( ContainerT &pending, - unput_queue_iterator &first, - unput_queue_iterator const &last, + unput_queue_iterator &first, + unput_queue_iterator const &last, bool expand_undefined, bool *seen_qualified_name) { // if there exist pending tokens (tokens, which are already preprocessed), then @@ -813,28 +669,21 @@ macromap::expand_tokensequence_worker( return act_token = pending.front(); } - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (boost::wave::need_cpp0x(ctx.get_language())) - return expand_tokensequence_worker_cpp0x(pending, first, last, - expand_undefined, seen_qualified_name); -#endif - return expand_tokensequence_worker_classical(pending, first, last, expand_undefined); } template template -inline typename ContextT::token_t const & +inline typename ContextT::token_type const & macromap::expand_tokensequence_worker_classical( ContainerT &pending, - unput_queue_iterator &first, - unput_queue_iterator const &last, + unput_queue_iterator &first, + unput_queue_iterator const &last, bool expand_undefined) { using namespace boost::wave; - typedef unput_queue_iterator iterator_t; + typedef unput_queue_iterator iterator_type; // analyze the next element of the given sequence, if it is an // T_IDENTIFIER token, try to replace this as a macro etc. @@ -843,7 +692,7 @@ macromap::expand_tokensequence_worker_classical( // ignore placeholder tokens if (T_PLACEHOLDER == id) { - token_t placeholder = *first; + token_type placeholder = *first; ++first; if (first == last) @@ -861,7 +710,7 @@ macromap::expand_tokensequence_worker_classical( (*first).get_value() == "_Pragma") { // in C99 mode only: resolve the operator _Pragma - token_t curr_token = *first; + token_type curr_token = *first; if (!resolve_operator_pragma(first, last, pending) || pending.size() > 0) @@ -874,11 +723,11 @@ macromap::expand_tokensequence_worker_classical( } // the operator _Pragma() was eaten completely, continue - return act_token = token_t(T_PLACEHOLDER, "_", + return act_token = token_type(T_PLACEHOLDER, "_", curr_token.get_position()); } - token_t name_token (*first); + token_type name_token (*first); typename defined_macros_t::iterator it; if (is_defined(name_token.get_value(), it)) { @@ -908,7 +757,7 @@ macromap::expand_tokensequence_worker_classical( } else { // macro expansion reached the eoi - return act_token = token_t(); + return act_token = token_type(); } // return the next preprocessed token @@ -919,7 +768,7 @@ macromap::expand_tokensequence_worker_classical( // // in preprocessing conditionals undefined identifiers and keywords // // are to be replaced with '0' (see. C++ standard 16.1.4, [cpp.cond]) // return act_token = -// token_t(T_INTLIT, "0", (*first++).get_position()); +// token_type(T_INTLIT, "0", (*first++).get_position()); // } else { act_token = name_token; @@ -933,7 +782,7 @@ macromap::expand_tokensequence_worker_classical( // all remaining identifiers and keywords, except for true and false, // are replaced with the pp-number 0 (C++ standard 16.1.4, [cpp.cond]) - return act_token = token_t(T_INTLIT, T_TRUE != id ? "0" : "1", + return act_token = token_type(T_INTLIT, T_TRUE != id ? "0" : "1", (*first++).get_position()); } else { @@ -942,351 +791,9 @@ macromap::expand_tokensequence_worker_classical( return act_token; } } - return act_token = token_t(); // eoi + return act_token = token_type(); // eoi } -/////////////////////////////////////////////////////////////////////////////// -// version to be used while in C++0x mode -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - -namespace { - - /////////////////////////////////////////////////////////////////////////// - // skip all tokens back, which relate with the current qualified name - // (the iterators are reverse_iterators) - template - inline void - rewind_identifier(IteratorT &first, IteratorT const &last) - { - using namespace cpplexer; - - IteratorT save(first); - - if (T_COLON_COLON == token_id(*save)) { - do { - // skip whitespace - token_id id = impl::skip_whitespace(save, last); - - if (T_IDENTIFIER != id && - !IS_CATEGORY(id, KeywordTokenType)) - { - break; - } - - // save this iterator position as the new starting point - first = save; - - // skip whitespace again - id = impl::skip_whitespace(save, last); - if (T_COLON_COLON != id) - break; - - // save this iterator position as the new starting point - first = save; - - } while (true); - } - else { - do { - // skip whitespace - token_id id = impl::skip_whitespace(save, last); - - if (T_COLON_COLON != id) - break; - - // save this iterator position as the new starting point - first = save; - - // skip whitespace again - id = impl::skip_whitespace(save, last); - if (T_IDENTIFIER != id && - !IS_CATEGORY(id, KeywordTokenType)) - { - break; - } - - // save this iterator position as the new starting point - first = save; - - } while (true); - } - } -} - -template -template -inline typename ContextT::token_t const & -macromap::expand_tokensequence_worker_cpp0x( - ContainerT &pending, - unput_queue_iterator &first, - unput_queue_iterator const &last, - bool expand_undefined, bool *seen_qualified_name) -{ - using namespace boost::wave; - typedef unput_queue_iterator iterator_t; - -// analyze the next element(s) of the given sequence, if it is an -// valid macro name, try to replace this as a macro etc. -defined_macros_t *scope = 0; -ContainerT queue_symbol; // queue up tokens to backup the not found case -bool was_colon_colon = false; -bool found_scope = false; - - while (first != last) { - token_id id = token_id(*first); - - if (T_COLON_COLON == id) { - if (0 == scope) - scope = defined_macros.get(); // start at global scope - - if (seen_qualified_name) - *seen_qualified_name = true; - - // continue with the next non-whitespace token - impl::skip_whitespace(first, last, queue_symbol); - was_colon_colon = true; - continue; - } - - // ignore placeholder tokens - if (T_PLACEHOLDER == id) { - token_t placeholder = *first; - - ++first; - if (first == last) - return act_token = placeholder; - id = token_id(*first); - queue_symbol.push_back(placeholder); - } - - if (T_IDENTIFIER == id || IS_CATEGORY(id, KeywordTokenType)) { - // try to replace this identifier as a macro - if (expand_undefined && (*first).get_value() == "defined") { - // resolve operator defined() - if (0 != scope) { - // misplaced operator defined() - BOOST_WAVE_THROW(preprocess_exception, misplaced_operator, - "defined", main_pos); - } - if (seen_qualified_name) - *seen_qualified_name = false; - return resolve_defined(first, last, pending); - } - else if (boost::wave::need_variadics(ctx.get_language()) && - (*first).get_value() == "_Pragma") - { - if (0 != scope) { - // misplaced operator defined() - BOOST_WAVE_THROW(preprocess_exception, misplaced_operator, - "_Pragma", main_pos); - } - - if (seen_qualified_name) - *seen_qualified_name = false; - - // in C99 mode only: resolve the operator _Pragma - token_t curr_token = *first; - - if (!resolve_operator_pragma(first, last, pending) || - pending.size() > 0) - { - // unknown to us pragma or supplied replacement, return the - // next token - on_exit::pop_front pop_token(pending); - - return act_token = pending.front(); - } - - // the operator _Pragma() was eaten completely, continue - return act_token = token_t(T_PLACEHOLDER, "_", - curr_token.get_position()); - } - - // initialize scope - if (0 == scope) { - scope = current_macros; - } - else if (!was_colon_colon) { - // not resolvable as a macro - on_exit::splice_pop_front - pop_front_queue (pending, queue_symbol); - - return act_token = pending.front(); - } - - // search the identifier first as a scope, and if not found, - // subsequently as a macro - token_t name_token(*first); - boost::shared_ptr next_scope; - - if (scope -> get_scope(name_token.get_value(), next_scope)) { - // continue with the next non-whitespace token - token_id idnext = impl::skip_whitespace(first, last, queue_symbol); - - if (T_COLON_COLON != idnext) { - // the name under inspection may not be a qualified macro name - if (T_EOI != idnext && seen_qualified_name) { - // if eoi is reached, the expanded sequence may be - // continued at the call site of this macro and still may - // form a qualified name - *seen_qualified_name = false; - } - - // return the first token from the pending queue and restart - // with the next token - on_exit::splice_pop_front - pop_front_queue (pending, queue_symbol); - - return act_token = pending.front(); - } - - // this identifier is known here as a subscope - scope = next_scope.get(); - was_colon_colon = false; - found_scope = true; - if (seen_qualified_name) - *seen_qualified_name = true; - - continue; - } - - typename defined_macros_t::iterator it; - - if (is_defined(name_token.get_value(), it, scope)) { - // the current token contains an identifier, which is currently - // defined as a macro - - if (expand_macro(pending, name_token, it, first, last, - expand_undefined, scope, &queue_symbol, seen_qualified_name)) - { - // the tokens returned by expand_macro should be rescanned - // beginning at the last token of the returned replacement list - if (first != last) { - // splice the last token back into the input queue - typename ContainerT::reverse_iterator rit = pending.rbegin(); - - // skip all remaining tokens _back_ if the last token is - // the end of a qualified name - if (seen_qualified_name && *seen_qualified_name && - (T_COLON_COLON == token_id(*rit) || - IS_CATEGORY(*rit, IdentifierTokenType)) - ) - { - rewind_identifier(rit, pending.rend()); - } - first.get_unput_queue().splice( - first.get_unput_queue().begin(), pending, - (++rit).base(), pending.end()); - } - - // fall through ... - } - else if (!pending.empty()) { - // there was some replacement, but no rescanning is required - // (predefined macros, not-expandable macros etc.) - - // return the first token from the pending queue - on_exit::splice_pop_front - pop_front_queue (pending, queue_symbol); - - return act_token = pending.front(); - } - else { - // macro expansion reached the eoi - return act_token = token_t(); - } - - // return the next preprocessed token - return expand_tokensequence_worker(pending, first, last, - expand_undefined, seen_qualified_name); - } -// else if (expand_undefined) { -// // in preprocessing conditionals undefined identifiers and keywords -// // are to be replaced with '0' (see. C++ standard 16.1.4, [cpp.cond]) -// return act_token = -// token_t(T_INTLIT, "0", (*first++).get_position()); -// } - else { - // the token sequence is not known as a (qualified) macro name, so - // make this sequence pending and return the first token - if (seen_qualified_name) - *seen_qualified_name = false; - - if (found_scope) { - // If a qualified name does not find a nested name, it is - // not a qualified name to the preprocessor. - BOOST_ASSERT(queue_symbol.size() >= 2); - - // i.e. we have to re-evaluate the last (not found nested) - // name in the global context, for this reason the - // preceeding '::' is pushed back into the input stream - typename ContainerT::reverse_iterator rit = queue_symbol.rbegin(); - - if (T_COLON_COLON != token_id(*rit)) - impl::skip_whitespace(rit, queue_symbol.rend()); - first.get_unput_queue().splice( - first.get_unput_queue().begin(), queue_symbol, - (++rit).base(), queue_symbol.end()); - - // leave all up to the last '::'' in the symbol queue, which - // is treated as preprocessed - on_exit::splice_pop_front - pop_front_queue (pending, queue_symbol); - - return act_token = pending.front(); - } - - if (was_colon_colon) { - // the symbol queue may only be not empty if there was a '::' - // followed eventually by some whitespace - BOOST_ASSERT(!queue_symbol.empty()); - - on_exit::splice_pop_front - pop_front_queue (pending, queue_symbol); - - return act_token = pending.front(); - } - - act_token = name_token; - ++first; - return act_token; - } - } - else if (expand_undefined && IS_CATEGORY(*first, BoolLiteralTokenType)) { - // expanding a constant expression inside #if/#elif, special handling - // of 'true' and 'false' - - // all remaining identifiers and keywords, except for true and false, - // are replaced with the pp-number 0 (C++ standard 16.1.4, [cpp.cond]) - return act_token = token_t(T_INTLIT, T_TRUE != id ? "0" : "1", - (*first++).get_position()); - } - else { - // something else (not a T_IDENTIFIER token) - if (seen_qualified_name && !IS_CATEGORY(*first, WhiteSpaceTokenType)) - *seen_qualified_name = false; - - queue_symbol.push_back(*first); - - on_exit::splice_pop_front - pop_front_queue (pending, queue_symbol); - - ++first; - return act_token = pending.front(); - } - } - -// end of input reached - if (!queue_symbol.empty()) { - on_exit::splice_pop_front - pop_queue (pending, queue_symbol); - - return act_token = pending.front(); - } - return act_token = token_t(); // eoi -} -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - /////////////////////////////////////////////////////////////////////////////// // // collect_arguments(): collect the actual arguments of a macro invocation @@ -1353,7 +860,7 @@ namespace { template template inline typename std::vector::size_type -macromap::collect_arguments (token_t const curr_token, +macromap::collect_arguments (token_type const curr_token, std::vector &arguments, IteratorT &next, IteratorT const &end, SizeT const ¶meter_count) { @@ -1366,7 +873,7 @@ typename std::vector::size_type count_arguments = 0; int nested_parenthesis_level = 1; ContainerT *argument = &arguments[0]; bool was_whitespace = false; -token_t startof_argument_list = *next; +token_type startof_argument_list = *next; while (++next != end && nested_parenthesis_level) { token_id id = token_id(*next); @@ -1401,7 +908,7 @@ token_t startof_argument_list = *next; #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 if (boost::wave::need_variadics(ctx.get_language())) { // store a placemarker as the argument - argument->push_back(token_t(T_PLACEMARKER, "§", + argument->push_back(token_type(T_PLACEMARKER, "§", (*next).get_position())); ++count_arguments; } @@ -1426,7 +933,7 @@ token_t startof_argument_list = *next; #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 if (boost::wave::need_variadics(ctx.get_language())) { // store a placemarker as the argument - argument->push_back(token_t(T_PLACEMARKER, "§", + argument->push_back(token_type(T_PLACEMARKER, "§", (*next).get_position())); ++count_arguments; } @@ -1450,7 +957,7 @@ token_t startof_argument_list = *next; case T_CCOMMENT: case T_NEWLINE: if (!was_whitespace) - argument->push_back(token_t(T_SPACE, " ", (*next).get_position())); + argument->push_back(token_type(T_SPACE, " ", (*next).get_position())); was_whitespace = true; break; // skip whitespace @@ -1518,18 +1025,18 @@ macromap::expand_whole_tokensequence(ContainerT &expanded, IteratorT const &first, IteratorT const &last, bool expand_undefined, bool *seen_qualified_name) { - typedef impl::gen_unput_queue_iterator gen_t; - typedef typename gen_t::return_t iterator_t; + typedef impl::gen_unput_queue_iterator gen_t; + typedef typename gen_t::return_t iterator_type; ContainerT unput_queue; - iterator_t first_it = gen_t::generate(unput_queue, first); + iterator_type first_it = gen_t::generate(unput_queue, first); ContainerT eof_queue; - iterator_t last_it = gen_t::generate(eof_queue, last); + iterator_type last_it = gen_t::generate(eof_queue, last); bool was_whitespace = false; ContainerT pending_queue; while (!pending_queue.empty() || first_it != last_it) { - token_t t = expand_tokensequence_worker(pending_queue, first_it, + token_type t = expand_tokensequence_worker(pending_queue, first_it, last_it, expand_undefined, seen_qualified_name); bool is_whitespace = IS_CATEGORY(t, WhiteSpaceTokenType) && T_PLACEHOLDER != token_id(t); @@ -1653,7 +1160,7 @@ bool adjacent_stringize = false; #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 if (is_ellipsis) { - position_t const &pos = (*cit).get_position(); + position_type const &pos = (*cit).get_position(); BOOST_ASSERT(boost::wave::need_variadics(ctx.get_language())); @@ -1686,20 +1193,20 @@ bool adjacent_stringize = false; // stringize the current argument BOOST_ASSERT(!arguments[i].empty()); - position_t const &pos = (*arguments[i].begin()).get_position(); + position_type const &pos = (*arguments[i].begin()).get_position(); #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 if (is_ellipsis && boost::wave::need_variadics(ctx.get_language())) { trim_argument_left(arguments[i]); trim_argument_right(arguments.back()); - expanded.push_back(token_t(T_STRINGLIT, + expanded.push_back(token_type(T_STRINGLIT, impl::as_stringlit(arguments, i, pos), pos)); } else #endif { trim_argument(arguments[i]); - expanded.push_back(token_t(T_STRINGLIT, + expanded.push_back(token_type(T_STRINGLIT, impl::as_stringlit(arguments[i], pos), pos)); } adjacent_stringize = false; @@ -1708,7 +1215,7 @@ bool adjacent_stringize = false; // simply copy the original argument (adjacent '##' or '#') #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 if (is_ellipsis) { - position_t const &pos = (*cit).get_position(); + position_type const &pos = (*cit).get_position(); trim_argument_left(arguments[i]); trim_argument_right(arguments.back()); @@ -1746,7 +1253,7 @@ bool adjacent_stringize = false; template template inline void -macromap::rescan_replacement_list(token_t const &curr_token, +macromap::rescan_replacement_list(token_type const &curr_token, macro_definition_t ¯o_def, ContainerT &replacement_list, ContainerT &expanded, bool expand_undefined, bool *seen_qualified_name) { @@ -1788,7 +1295,7 @@ macromap::rescan_replacement_list(token_t const &curr_token, // the resulting replacement list should contain at least a placeholder // token BOOST_ASSERT(expanded.empty()); - expanded.push_back(token_t(T_PLACEHOLDER, "_", curr_token.get_position())); + expanded.push_back(token_type(T_PLACEHOLDER, "_", curr_token.get_position())); } } @@ -1829,7 +1336,7 @@ template template inline bool macromap::expand_macro(ContainerT &expanded, - token_t const &curr_token, typename defined_macros_t::iterator it, + token_type const &curr_token, typename defined_macros_t::iterator it, IteratorT &first, IteratorT const &last, bool expand_undefined, defined_macros_t *scope, ContainerT *queue_symbol, bool *seen_qualified_name) @@ -1859,11 +1366,7 @@ macromap::expand_macro(ContainerT &expanded, } // ensure the parameters to be replaced with special parameter tokens -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 macro_definition_t ¯o_def = *(*it).second.get(); -#else -macro_definition_t ¯o_def = *(*it).data().get(); -#endif macro_def.replace_parameters(); @@ -1872,12 +1375,12 @@ macro_definition_t ¯o_def = *(*it).data().get(); // this macro is marked as non-replaceable // copy the macro name itself if (0 != queue_symbol) { - queue_symbol->push_back(token_t(T_NONREPLACABLE_IDENTIFIER, + queue_symbol->push_back(token_type(T_NONREPLACABLE_IDENTIFIER, curr_token.get_value(), curr_token.get_position())); expanded.splice(expanded.end(), *queue_symbol); } else { - expanded.push_back(token_t(T_NONREPLACABLE_IDENTIFIER, + expanded.push_back(token_type(T_NONREPLACABLE_IDENTIFIER, curr_token.get_value(), curr_token.get_position())); } ++first; @@ -1951,11 +1454,7 @@ ContainerT replacement_list; } else { // called as an object like macro -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 if ((*it).second->is_functionlike) { -#else - if ((*it).data()->is_functionlike) { -#endif // defined as a function-like macro if (0 != queue_symbol) { queue_symbol->push_back(curr_token); @@ -2004,12 +1503,12 @@ ContainerT expanded_list; template template inline bool -macromap::expand_predefined_macro(token_t const &curr_token, +macromap::expand_predefined_macro(token_type const &curr_token, ContainerT &expanded) { using namespace boost::wave; -string_t const &value = curr_token.get_value(); +string_type const &value = curr_token.get_value(); if (value.size() < 8 || '_' != value[0] || '_' != value[1]) return false; // quick check failed @@ -2020,7 +1519,7 @@ string_t const &value = curr_token.get_value(); using namespace std; // for some systems sprintf is in namespace std sprintf(buffer, "%d", main_pos.get_line()); - expanded.push_back(token_t(T_INTLIT, buffer, curr_token.get_position())); + expanded.push_back(token_type(T_INTLIT, buffer, curr_token.get_position())); return true; } else if (value == "__FILE__") { @@ -2032,7 +1531,7 @@ string_t const &value = curr_token.get_value(); using boost::wave::util::impl::escape_lit; file += escape_lit(filename.native_file_string()) + "\""; - expanded.push_back(token_t(T_STRINGLIT, file.c_str(), + expanded.push_back(token_type(T_STRINGLIT, file.c_str(), curr_token.get_position())); return true; } @@ -2042,7 +1541,7 @@ string_t const &value = curr_token.get_value(); using namespace std; // for some systems sprintf is in namespace std sprintf(buffer, "%d", ctx.get_iteration_depth()); - expanded.push_back(token_t(T_INTLIT, buffer, curr_token.get_position())); + expanded.push_back(token_type(T_INTLIT, buffer, curr_token.get_position())); return true; } return false; // no predefined token @@ -2056,7 +1555,7 @@ string_t const &value = curr_token.get_value(); /////////////////////////////////////////////////////////////////////////////// template template -inline typename ContextT::token_t const & +inline typename ContextT::token_type const & macromap::resolve_defined(IteratorT &first, IteratorT const &last, ContainerT &pending) { @@ -2066,7 +1565,7 @@ macromap::resolve_defined(IteratorT &first, ContainerT result; IteratorT start = first; boost::spirit::parse_info hit = - defined_grammar_gen:: + defined_grammar_gen:: parse_operator_defined(start, last, result); if (!hit.hit) { @@ -2076,7 +1575,7 @@ boost::spirit::parse_info hit = impl::assign_iterator::do_(first, hit.stop); // insert a token, which reflects the outcome - pending.push_back(token_t(T_INTLIT, + pending.push_back(token_type(T_INTLIT, is_defined(result.begin(), result.end()) ? "1" : "0", main_pos)); @@ -2103,7 +1602,7 @@ macromap::resolve_operator_pragma(IteratorT &first, IteratorT const &last, ContainerT &pending) { // isolate the parameter of the operator _Pragma - token_t pragma_token = *first; + token_type pragma_token = *first; skip_to_token(first, last, T_LEFTPAREN); std::vector arguments; @@ -2132,9 +1631,9 @@ macromap::resolve_operator_pragma(IteratorT &first, arguments[0].end(), false, &seen_qualified_name); // unescape the parameter of the operator _Pragma - typedef typename token_t::string_t string_t; + typedef typename token_type::string_type string_type; - string_t pragma_cmd; + string_type pragma_cmd; typename ContainerT::const_iterator end_exp = expanded.end(); for (typename ContainerT::const_iterator it_exp = expanded.begin(); it_exp != end_exp; ++it_exp) @@ -2159,19 +1658,19 @@ macromap::resolve_operator_pragma(IteratorT &first, } // remove the '\"' and concat all given string literal-values - string_t token_str = (*it_exp).get_value(); + string_type token_str = (*it_exp).get_value(); pragma_cmd += token_str.substr(1, token_str.size() - 2); } pragma_cmd = impl::unescape_lit(pragma_cmd); // tokenize the pragma body - typedef typename ContextT::lex_t lex_t; + typedef typename ContextT::lexer_type lexer_type; ContainerT pragma; std::string pragma_cmd_str(pragma_cmd.c_str()); - lex_t it = lex_t(pragma_cmd_str.begin(), pragma_cmd_str.end(), + lexer_type it = lexer_type(pragma_cmd_str.begin(), pragma_cmd_str.end(), pragma_token.get_position(), ctx.get_language()); - lex_t end = lex_t(); + lexer_type end = lexer_type(); for (/**/; it != end; ++it) pragma.push_back(*it); @@ -2184,11 +1683,11 @@ macromap::resolve_operator_pragma(IteratorT &first, } // unknown pragma token sequence, push it back and return to the caller - pending.push_front(token_t(T_SPACE, " ", pragma_token.get_position())); - pending.push_front(token_t(T_RIGHTPAREN, ")", pragma_token.get_position())); - pending.push_front(token_t(T_STRINGLIT, string_t("\"") + pragma_cmd + "\"", + pending.push_front(token_type(T_SPACE, " ", pragma_token.get_position())); + pending.push_front(token_type(T_RIGHTPAREN, ")", pragma_token.get_position())); + pending.push_front(token_type(T_STRINGLIT, string_type("\"") + pragma_cmd + "\"", pragma_token.get_position())); - pending.push_front(token_t(T_LEFTPAREN, "(", pragma_token.get_position())); + pending.push_front(token_type(T_LEFTPAREN, "(", pragma_token.get_position())); pending.push_front(pragma_token); return false; } @@ -2197,24 +1696,19 @@ macromap::resolve_operator_pragma(IteratorT &first, template template inline bool -macromap::is_invalid_concat(string_t new_value, - position_t const &pos, ContainerT &rescanned) +macromap::is_invalid_concat(string_type new_value, + position_type const &pos, ContainerT &rescanned) { // retokenize the newly generated string - typedef typename ContextT::lex_t lex_t; + typedef typename ContextT::lexer_type lexer_type; std::string value_to_test(new_value.c_str()); - lex_t it = lex_t(value_to_test.begin(), value_to_test.end(), pos, + lexer_type it = lexer_type(value_to_test.begin(), value_to_test.end(), pos, ctx.get_language()); - lex_t end = lex_t(); + lexer_type end = lexer_type(); for (/**/; it != end; ++it) rescanned.push_back(*it); -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (boost::wave::need_cpp0x(ctx.get_language())) - return false; // in C++0x mode token pasting is well defined -#endif - // test if the newly generated token sequence contains more than 1 token // the second one is the T_EOF token BOOST_ASSERT(T_EOF == token_id(rescanned.back())); @@ -2227,14 +1721,14 @@ inline void macromap::concat_tokensequence(ContainerT &expanded) { using namespace boost::wave; - typedef typename ContainerT::iterator iterator_t; + typedef typename ContainerT::iterator iterator_type; - iterator_t end = expanded.end(); - iterator_t prev = end; - for (iterator_t it = expanded.begin(); it != end; /**/) + iterator_type end = expanded.end(); + iterator_type prev = end; + for (iterator_type it = expanded.begin(); it != end; /**/) { if (T_POUND_POUND == BASE_TOKEN(token_id(*it))) { - iterator_t next = it; + iterator_type next = it; ++next; if (prev == end || next == end) { @@ -2258,7 +1752,7 @@ macromap::concat_tokensequence(ContainerT &expanded) if (boost::wave::need_variadics(ctx.get_language())) { if (T_PLACEMARKER == token_id(*next)) { // remove the '##' and the next tokens from the sequence - iterator_t first_to_delete = prev; + iterator_type first_to_delete = prev; expanded.erase(++first_to_delete, ++next); it = next; @@ -2266,7 +1760,7 @@ macromap::concat_tokensequence(ContainerT &expanded) } else if (T_PLACEMARKER == token_id(*prev)) { // remove the '##' and the next tokens from the sequence - iterator_t first_to_delete = prev; + iterator_type first_to_delete = prev; *prev = *next; expanded.erase(++first_to_delete, ++next); @@ -2278,7 +1772,7 @@ macromap::concat_tokensequence(ContainerT &expanded) // test if the concat operator has to concatenate two unrelated // tokens i.e. the result yields more then one token - string_t concat_result; + string_type concat_result; ContainerT rescanned; concat_result = ((*prev).get_value() + (*next).get_value()); @@ -2289,12 +1783,12 @@ macromap::concat_tokensequence(ContainerT &expanded) // eventually to combine the current token with the next tokens // if these are of type T_IDENTIFIER or T_INTLIT following without any // interventing whitespace. - iterator_t save = next; + iterator_type save = next; if (IS_CATEGORY(*prev, IdentifierTokenType) && T_INTLIT == token_id(*save)) { - token_id id = impl::next_token::peek(next, end, false); + token_id id = impl::next_token::peek(next, end, false); if (IS_CATEGORY(id, IdentifierTokenType) || IS_CATEGORY(id, KeywordTokenType)) @@ -2309,7 +1803,7 @@ macromap::concat_tokensequence(ContainerT &expanded) !IS_CATEGORY(*prev, WhiteSpaceTokenType) && !IS_CATEGORY(*next, WhiteSpaceTokenType)) { - string_t error_string("\""); + string_type error_string("\""); error_string += (*prev).get_value(); error_string += "\" and \""; @@ -2319,25 +1813,6 @@ macromap::concat_tokensequence(ContainerT &expanded) error_string, main_pos); } -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (boost::wave::need_cpp0x(ctx.get_language())) { - // remove the prev, '##' and the next tokens from the sequence - expanded.erase(prev, ++next); // remove not needed tokens - - // replace the old token (pointed to by *prev) with the retokenized - // sequence - typename ContainerT::reverse_iterator rit = rescanned.rbegin(); - - BOOST_ASSERT(rit != rescanned.rend()); - rescanned.erase((++rit).base()); - expanded.splice(next, rescanned); - - // the last token of the inserted sequence is the new previous - prev = next; - --prev; - } - else -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 { // we leave the token_id unchanged, but unmark the token as // disabled, if appropriate @@ -2346,7 +1821,7 @@ macromap::concat_tokensequence(ContainerT &expanded) (*prev).set_token_id(T_IDENTIFIER); // remove the '##' and the next tokens from the sequence - iterator_t first_to_delete = prev; + iterator_type first_to_delete = prev; expanded.erase(++first_to_delete, ++next); } @@ -2362,12 +1837,6 @@ macromap::concat_tokensequence(ContainerT &expanded) } } -/////////////////////////////////////////////////////////////////////////////// -// -// experimental: macro scoping support -// -/////////////////////////////////////////////////////////////////////////////// - namespace { /////////////////////////////////////////////////////////////////////////// @@ -2379,355 +1848,15 @@ namespace { inline std::string get_full_name(IteratorT const &begin, IteratorT const &end) { - std::string full_name; - + std::string full_name; for (IteratorT err_it = begin; err_it != end; ++err_it) full_name += (*err_it).get_value().c_str(); return full_name; } - template - inline bool - is_qualified_name(IteratorT const &begin, IteratorT const &end) - { -//#if !defined(WAVE_USE_RE2C_IDL_LEXER) - bool was_colon_colon = false; - - for (IteratorT it = begin; it != end; ++it) { - if (token_id(*it) == T_COLON_COLON) { - if (was_colon_colon) { - // error: two consecutive '::' - return false; - } - was_colon_colon = true; - } - else if (T_IDENTIFIER == token_id(*it) || - IS_CATEGORY(*it, KeywordTokenType)) - { - if (!was_colon_colon) { - // error: missing '::' between two parts of the macro name - return false; - } - was_colon_colon = false; - } - else if (!IS_CATEGORY(*it, WhiteSpaceTokenType)) { - // invalid token type inside a qualified name - return false; - } - } -//#else -// return false; // always false for IDL mode -//#endif // !defined(WAVE_USE_RE2C_IDL_LEXER) - return true; - } } // namespace impl -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - -/////////////////////////////////////////////////////////////////////////////// -// -// #region directive -// -// - syntax -// -// #region [] -// -// Where is a possibly qualified name defining the -// name of the region to open. This name is optional. If the name is -// omitted a nameless region is opened. Macros defined inside a nameless -// region may not be accessed from outside this region. -// -// - The #region directive is opaque for all macro definitions made outside -// this region. A #region may be re-opened (i.e. a #region directive with -// the same name is found at the same scope), and macros from the first -// occurrence of this region will be visible. -// -// - Region names and macro names of the same scope are stored into the same -// symbol table. I.e. at one scope there shall not be defined a region and -// a macro with the same name. -// -// - #region's may be nested. -// -// - The arguments of the #region directive are _not_ subject to macro -// expansion. -// -/////////////////////////////////////////////////////////////////////////////// -template -inline void -macromap::open_scope(string_t const &name, - defined_macros_t *current_scope, - boost::shared_ptr &new_scope) -{ - bool is_new_scope = false; - boost::shared_ptr next_scope; - if (!current_scope -> get_scope(name, next_scope)) - is_new_scope = true; - - new_scope = current_scope -> begin_scope(name, ++macro_uid); - if (is_new_scope) { - // make predefined macros available - init_predefined_macros(new_scope.get(), false); - - // predefine the __CURRENT_SCOPE__ and __FULL_SCOPE__ names - position_t pos; - predefine_macro(new_scope.get(), - "__STDC_CURRENT_" BOOST_WAVE_PP_REGION_UC "__", - token_t(T_STRINGLIT, name, pos)); - predefine_macro(new_scope.get(), - "__STDC_FULL_" BOOST_WAVE_PP_REGION_UC "__", - token_t(T_STRINGLIT, new_scope->get_full_name(), pos)); - } -} - -template -inline void -macromap::begin_unnamed_scope() -{ -// create/open a new unnamed sub-region -boost::shared_ptr new_scope; - - open_scope("", current_macros, new_scope); - scopes.push(new_scope); - current_macros = new_scope.get(); -} - -template -template -inline void -macromap::begin_scope(IteratorT const &begin, - IteratorT const &end) -{ - using namespace cpplexer; - -defined_macros_t *current_scope = 0; -bool was_colon_colon = false; -bool found_qualified_name = false; - - for (IteratorT it = begin; it != end; /**/) { - if (token_id(*it) == T_COLON_COLON) { - if (was_colon_colon) { - // error: two consecutive '::' - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - if (0 == current_scope) { - // initialize starting scope (global scope) - if (current_macros -> get_contains_unnamed_part()) { - BOOST_WAVE_THROW(preprocess_exception, illegal_global_region, - get_full_name(begin, end), main_pos); - } - if (++it == end) { - scopes.push(defined_macros); // store opened region - current_macros = defined_macros.get(); - found_qualified_name = true; - break; - } - else { - current_scope = defined_macros.get(); - } - } - else { - ++it; - } - was_colon_colon = true; - } - else { - if (0 == current_scope) { - // initialize starting scope - current_scope = current_macros; // start at current scope - } - else if (!was_colon_colon) { - // error: missing '::' between two parts of the macro name - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - was_colon_colon = false; - - // open the given sub-region (create it if necessary) - string_t name ((*it).get_value()); - boost::shared_ptr next_scope; - - open_scope(name, current_scope, next_scope); - if (++it == end) { - scopes.push(next_scope); // store opened region - current_macros = next_scope.get(); - found_qualified_name = true; - break; - } - else { - // analyze the next part of the qualified name - current_scope = next_scope.get(); - } - } - } - - if (!found_qualified_name) { - // missing last part of the name (scope end with '::') - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } -} - -/////////////////////////////////////////////////////////////////////////////// -// -// #endregion -// -// - syntax -// -// #endregion -// -// - The #endregion ends the last opened macro region. It is directive -// opaque for all macros defined inside the closed region. Macros from -// this region may be accessed outside this region only if imported -// (see #import) or if used as qualified names specifying the region and -// the macro name. -// -/////////////////////////////////////////////////////////////////////////////// -template -inline void -macromap::end_scope() -{ - if (0 == scopes.size()) { - // should not be used at global scope - BOOST_WAVE_THROW(preprocess_exception, unexpected_endregion, "", main_pos); - } - -// inform the symbol table - current_macros->end_scope(); - -// restore the previous scope - scopes.pop(); - if (scopes.size() > 0) - current_macros = scopes.top().get(); - else - current_macros = defined_macros.get(); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// #import directive -// -// - syntax -// -// #import [, ] -// -// Where is a macro name or region name consisting out -// of a possibly empty sequence of region names interspersed with '::' -// optionally tokens followed by a macro name defined inside the -// specified region. -// -// If refers to a macro, then the referenced macro -// definition is _copied_ into the current region, just if it were defined -// here initially. -// -// If refers to a region, then -// - all macro definitions of the referenced region are _copied_ into the -// current region, just if these were defined here initially. -// - all sub-regions of the referenced region are made available from the -// current region, just if these were defined as direct sub-regions of -// the current region. -// -// Imported macros may be undefined with #undef as usual. This removes -// the referenced macro from the current region, but leaves it unchanged -// in the original region. -// -// - The arguments of the #import directive are _not_ subject to macro -// expansion. -// -/////////////////////////////////////////////////////////////////////////////// - -template -template -inline void -macromap::import_name(IteratorT const &begin, - IteratorT const &end) -{ - using namespace cpplexer; - defined_macros_t *current_scope = 0; - bool was_colon_colon = false; - - for (IteratorT it = begin; it != end; /**/) { - if (token_id(*it) == T_COLON_COLON) { - if (was_colon_colon) { - // error: two consecutive '::' - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - if (0 == current_scope) { - // initialize starting scope (global scope) - if (++it == end) { - // '#import ::' specified - current_macros -> import_scope(defined_macros.get(), - main_pos); - return; // imported scope - } - current_scope = defined_macros.get(); - } - else { - ++it; - } - was_colon_colon = true; - } - else { - if (0 == current_scope) { - // initialize starting scope - current_scope = current_macros; // start at current scope - } - else if (!was_colon_colon) { - // error: missing '::' between two parts of the macro name - BOOST_WAVE_THROW(preprocess_exception, invalid_macroname, - get_full_name(begin, end), main_pos); - } - was_colon_colon = false; - - string_t name ((*it).get_value()); - boost::shared_ptr next_scope; - typename defined_macros_t::iterator cit( - current_scope -> find(name)); - - if (cit != current_scope -> end()) { - // defined as a macro name - - // should be the last given name part - if (++it != end) { - BOOST_WAVE_THROW(preprocess_exception, undefined_macroname, - get_full_name(begin, end), main_pos); - } - - // import this macro name -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 - if (!current_macros -> import_macroname(name, (*cit).second)) { -#else - if (!current_macros -> import_macroname(name, (*cit).data())) { -#endif - // this macro name is already used as a scope name here - BOOST_WAVE_THROW(preprocess_exception, alreadydefined_name, - name, main_pos); - } - return; // imported macro - } - else if (current_scope -> get_scope(name, next_scope)) { - // if this part was the last one, then import the whole scope - if (++it == end) { - current_macros -> import_scope(next_scope.get(), main_pos); - return; // imported scope - } - else { - // defined as a scope name - current_scope = next_scope.get(); - } - } - else { - // name is not defined - BOOST_WAVE_THROW(preprocess_exception, undefined_macroname, - get_full_name(begin, end), main_pos); - } - } - } -} -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - /////////////////////////////////////////////////////////////////////////////// // // init_predefined_macros(): init the predefined macros @@ -2771,23 +1900,7 @@ namespace predefined_macros { BOOST_ASSERT(i < sizeof(data)/sizeof(data[0])); return data[i]; } - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -// C++0x mode - inline static_macros const & - static_data_cpp0x(std::size_t i) - { - static static_macros data[] = { - { "__STDC__", T_INTLIT, "1" }, - { "__cplusplus", T_INTLIT, "200304L" }, - { "__WAVE_HAS_VARIADICS__", T_INTLIT, "1" }, - { 0, T_EOF, 0 } - }; - BOOST_ASSERT(i < sizeof(data)/sizeof(data[0])); - return data[i]; - } -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -#endif // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 +#endif // list of dynamic predefined macros typedef char const * (* get_dynamic_value)(bool); @@ -2964,13 +2077,13 @@ namespace predefined_macros { template inline void macromap::predefine_macro(defined_macros_t *scope, - string_t const &name, token_t const &t) + string_type const &name, token_type const &t) { definition_container_t macrodefinition; -std::vector param; +std::vector param; macrodefinition.push_back(t); - add_macro(token_t(T_IDENTIFIER, name, t.get_position()), + add_macro(token_type(T_IDENTIFIER, name, t.get_position()), false, param, macrodefinition, true, scope); } @@ -2985,49 +2098,24 @@ macromap::init_predefined_macros(defined_macros_t *scope, defined_macros_t *current_scope = scope ? scope : current_macros; // first, add the static macros -position_t pos; +position_type pos; #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 if (boost::wave::need_c99(ctx.get_language())) { // define C99 specifics for (int i = 0; 0 != static_data_c99(i).name; ++i) { predefine_macro(current_scope, static_data_c99(i).name, - token_t(static_data_c99(i).token_id, + token_type(static_data_c99(i).token_id, static_data_c99(i).value, pos)); } } else -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (boost::wave::need_cpp0x(ctx.get_language())) { - // define C++0x specifics - for (int i = 0; 0 != static_data_cpp0x(i).name; ++i) { - predefine_macro(current_scope, static_data_cpp0x(i).name, - token_t(static_data_cpp0x(i).token_id, - static_data_cpp0x(i).value, pos)); - } - - // add the global scope definitions - if (at_global_scope) { - position_t pos; - - predefine_macro(current_scope, "__STDC_GLOBAL__", - token_t(T_INTLIT, "1", pos)); - predefine_macro(current_scope, - "__STDC_CURRENT_" BOOST_WAVE_PP_REGION_UC "__", - token_t(T_STRINGLIT, "", pos)); - predefine_macro(current_scope, - "__STDC_FULL_" BOOST_WAVE_PP_REGION_UC "__", - token_t(T_STRINGLIT, "::", pos)); - } - } - else -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -#endif // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 +#endif { // define C++ specifics for (int i = 0; 0 != static_data_cpp(i).name; ++i) { predefine_macro(current_scope, static_data_cpp(i).name, - token_t(static_data_cpp(i).token_id, + token_type(static_data_cpp(i).token_id, static_data_cpp(i).value, pos)); } @@ -3035,7 +2123,7 @@ position_t pos; // define __WAVE_HAS_VARIADICS__, if appropriate if (boost::wave::need_variadics(ctx.get_language())) { predefine_macro(current_scope, "__WAVE_HAS_VARIADICS__", - token_t(T_INTLIT, "1", pos)); + token_type(T_INTLIT, "1", pos)); } #endif } @@ -3043,7 +2131,7 @@ position_t pos; // now add the dynamic macros for (int j = 0; 0 != dynamic_data(j).name; ++j) { predefine_macro(current_scope, dynamic_data(j).name, - token_t(dynamic_data(j).token_id, + token_type(dynamic_data(j).token_id, dynamic_data(j).generator(false), pos)); } } @@ -3055,7 +2143,7 @@ macromap::reset_macromap() current_macros->clear(); predefined_macros::get_time(true); predefined_macros::get_date(true); - act_token = token_t(); + act_token = token_type(); } /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/wave/util/eat_whitespace.hpp b/include/boost/wave/util/eat_whitespace.hpp index 91f5aa2..412d7a2 100644 --- a/include/boost/wave/util/eat_whitespace.hpp +++ b/include/boost/wave/util/eat_whitespace.hpp @@ -1,15 +1,13 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Whitespace eater - Copyright (c) 2003 Paul Mensonides - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2003 Paul Mensonides + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(EAT_WHITESPACE_HPP_4CE9AD17_F82D_4AB2_A117_555DF0DCC801_INCLUDED) @@ -65,7 +63,7 @@ eat_whitespace::general(TokenT &token, bool &skipped_newline) state = &eat_whitespace::whitespace; if (T_CCOMMENT == id) { - if (TokenT::string_t::npos != + if (TokenT::string_type::npos != token.get_value().find_first_of("\n")) { skipped_newline = true; @@ -98,7 +96,7 @@ eat_whitespace::newline(TokenT &token, bool &skipped_newline) } if (T_CCOMMENT == id) { - if (TokenT::string_t::npos != + if (TokenT::string_type::npos != token.get_value().find_first_of("\n")) { skipped_newline = true; @@ -117,7 +115,7 @@ eat_whitespace::newline_2nd(TokenT &token, bool &skipped_newline) if (T_SPACE == id || T_SPACE2 == id) return true; if (T_CCOMMENT == id) { - if (TokenT::string_t::npos != + if (TokenT::string_type::npos != token.get_value().find_first_of("\n")) { skipped_newline = true; @@ -142,7 +140,7 @@ eat_whitespace::whitespace(TokenT &token, bool &skipped_newline) return general(token, skipped_newline); if (T_CCOMMENT == id) { - if (TokenT::string_t::npos != + if (TokenT::string_type::npos != token.get_value().find_first_of("\n")) { skipped_newline = true; diff --git a/include/boost/wave/util/file_position.hpp b/include/boost/wave/util/file_position.hpp index 98dfbd1..d98656c 100644 --- a/include/boost/wave/util/file_position.hpp +++ b/include/boost/wave/util/file_position.hpp @@ -3,12 +3,11 @@ Definition of the position_iterator and file_position templates - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(FILE_POSITION_H_52BDEDF7_DAD3_4F24_802F_E66BB8098F68_INCLUDED) @@ -35,31 +34,31 @@ namespace util { // /////////////////////////////////////////////////////////////////////////////// -template +template struct file_position { public: - typedef StringT string_t; + typedef StringT string_type; file_position() : file(), line(1), column(1) {} - explicit file_position(string_t const& file_, int line_ = 1, + explicit file_position(string_type const& file_, int line_ = 1, int column_ = 1) : file(file_), line(line_), column(column_) {} // accessors - string_t const &get_file() const { return file; } + string_type const &get_file() const { return file; } int get_line() const { return line; } int get_column() const { return column; } - void set_file(string_t const &file_) { file = file_; } + void set_file(string_type const &file_) { file = file_; } void set_line(int line_) { line = line_; } void set_column(int column_) { column = column_; } private: - string_t file; + string_type file; int line; int column; }; @@ -80,7 +79,7 @@ operator<< (std::ostream &o, file_position const &pos) return o; } -typedef file_position file_position_t; +typedef file_position file_position_type; /////////////////////////////////////////////////////////////////////////////// // @@ -128,14 +127,14 @@ namespace spirit { /////////////////////////////////////////////////////////////////////////////// template <> - class position_policy { + class position_policy { public: position_policy() : m_CharsPerTab(4) {} - void next_line(boost::wave::util::file_position_t &pos) + void next_line(boost::wave::util::file_position_type &pos) { pos.set_line(pos.get_line() + 1); pos.set_column(1); @@ -146,12 +145,12 @@ namespace spirit { m_CharsPerTab = chars; } - void next_char(boost::wave::util::file_position_t &pos) + void next_char(boost::wave::util::file_position_type &pos) { pos.set_column(pos.get_column() + 1); } - void tabulation(boost::wave::util::file_position_t &pos) + void tabulation(boost::wave::util::file_position_type &pos) { pos.set_column(pos.get_column() + m_CharsPerTab - (pos.get_column() - 1) % m_CharsPerTab); diff --git a/include/boost/wave/util/functor_input.hpp b/include/boost/wave/util/functor_input.hpp index a80ba77..9ea671f 100644 --- a/include/boost/wave/util/functor_input.hpp +++ b/include/boost/wave/util/functor_input.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(FUNCTOR_INPUT_HPP_ED3A4C21_8F8A_453F_B438_08214FAC106A_INCLUDED) diff --git a/include/boost/wave/util/insert_whitespace_detection.hpp b/include/boost/wave/util/insert_whitespace_detection.hpp index b5b14e7..00e0082 100644 --- a/include/boost/wave/util/insert_whitespace_detection.hpp +++ b/include/boost/wave/util/insert_whitespace_detection.hpp @@ -3,12 +3,11 @@ Detect the need to insert a whitespace token into the output stream - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(INSERT_WHITESPACE_DETECTION_HPP_765EF77B_0513_4967_BDD6_6A38148C4C96_INCLUDED) #define INSERT_WHITESPACE_DETECTION_HPP_765EF77B_0513_4967_BDD6_6A38148C4C96_INCLUDED diff --git a/include/boost/wave/util/interpret_pragma.hpp b/include/boost/wave/util/interpret_pragma.hpp index 7b2ac09..cc9cab3 100644 --- a/include/boost/wave/util/interpret_pragma.hpp +++ b/include/boost/wave/util/interpret_pragma.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(INTERPRET_PRAGMA_HPP_B1F2315E_C5CE_4ED1_A343_0EF548B7942A_INCLUDED) @@ -60,15 +59,15 @@ namespace impl { template inline bool interpret_pragma_trace(ContextT &ctx, ContainerT const &values, - typename ContextT::token_t const &act_token) + typename ContextT::token_type const &act_token) { - typedef typename ContextT::token_t token_t; - typedef typename token_t::string_t string_t; + typedef typename ContextT::token_type token_type; + typedef typename token_type::string_type string_type; bool valid_option = false; if (1 == values.size()) { - token_t const &value = values.front(); + token_type const &value = values.front(); using namespace boost::wave::trace_policies; if (value.get_value() == "enable" || @@ -90,7 +89,7 @@ bool valid_option = false; } if (!valid_option) { // unknown option value - string_t option_str ("trace"); + string_type option_str ("trace"); if (values.size() > 0) { option_str += "("; @@ -106,26 +105,26 @@ bool valid_option = false; template inline bool interpret_pragma_system(ContextT &/*ctx*/, ContainerT &pending, - ContainerT const &values, typename ContextT::token_t const &act_token, + ContainerT const &values, typename ContextT::token_type const &act_token, boost::wave::language_support language) { - typedef typename ContextT::token_t token_t; - typedef typename token_t::string_t string_t; + typedef typename ContextT::token_type token_type; + typedef typename token_type::string_type string_type; if (0 == values.size()) { BOOST_WAVE_THROW(preprocess_exception, ill_formed_pragma_option, "system", act_token.get_position()); } -string_t stdout_file(std::tmpnam(0)); -string_t stderr_file(std::tmpnam(0)); -string_t system_str(impl::as_string(values)); -string_t native_cmd(system_str); +string_type stdout_file(std::tmpnam(0)); +string_type stderr_file(std::tmpnam(0)); +string_type system_str(impl::as_string(values)); +string_type native_cmd(system_str); system_str += " >" + stdout_file + " 2>" + stderr_file; if (0 != std::system(system_str.c_str())) { // unable to spawn the command - string_t error_str("unable to spawn command: "); + string_type error_str("unable to spawn command: "); error_str += native_cmd; BOOST_WAVE_THROW(preprocess_exception, ill_formed_pragma_option, @@ -134,9 +133,9 @@ string_t native_cmd(system_str); // rescan the content of the stdout_file and insert it as the // _Pragma replacement - typedef typename ContextT::lex_t lex_t; - typedef typename ContextT::input_policy_t input_policy_t; - typedef boost::wave::iteration_context iteration_context_t; + typedef typename ContextT::lexer_type lexer_type; + typedef typename ContextT::input_policy_type input_policy_type; + typedef boost::wave::iteration_context iteration_context_t; iteration_context_t iter_ctx(stdout_file.c_str(), act_token.get_position(), language); @@ -166,12 +165,12 @@ ContainerT pragma; /////////////////////////////////////////////////////////////////////////////// template inline bool -interpret_pragma(ContextT &ctx, typename ContextT::token_t const &act_token, +interpret_pragma(ContextT &ctx, typename ContextT::token_type const &act_token, IteratorT it, IteratorT const &end, ContainerT &pending, boost::wave::language_support language) { - typedef typename ContextT::token_t token_t; - typedef typename token_t::string_t string_t; + typedef typename ContextT::token_type token_type; + typedef typename token_type::string_type string_type; using namespace cpplexer; if (T_IDENTIFIER == token_id(*it) && "wave" == (*it).get_value()) { @@ -186,7 +185,7 @@ interpret_pragma(ContextT &ctx, typename ContextT::token_t const &act_token, // wave system(command) using namespace boost::spirit; - token_t option; + token_type option; ContainerT values; if (!parse (++it, end, @@ -239,7 +238,7 @@ interpret_pragma(ContextT &ctx, typename ContextT::token_t const &act_token, pending, option, values, act_token, language)) { // unknown #pragma option - string_t option_str (option.get_value()); + string_type option_str (option.get_value()); if (values.size() > 0) { option_str += "("; diff --git a/include/boost/wave/util/iteration_context.hpp b/include/boost/wave/util/iteration_context.hpp index 178e35d..6bb7bea 100644 --- a/include/boost/wave/util/iteration_context.hpp +++ b/include/boost/wave/util/iteration_context.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(ITERATION_CONTEXT_HPP_9556CD16_F11E_4ADC_AC8B_FB9A174BE664_INCLUDED) diff --git a/include/boost/wave/util/macro_definition.hpp b/include/boost/wave/util/macro_definition.hpp index b9a80c7..dece793 100644 --- a/include/boost/wave/util/macro_definition.hpp +++ b/include/boost/wave/util/macro_definition.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(MACRO_DEFINITION_HPP_D68A639E_2DA5_4E9C_8ACD_CFE6B903831E_INCLUDED) diff --git a/include/boost/wave/util/macro_helpers.hpp b/include/boost/wave/util/macro_helpers.hpp index a59781b..bee05c6 100644 --- a/include/boost/wave/util/macro_helpers.hpp +++ b/include/boost/wave/util/macro_helpers.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(MACRO_HELPERS_HPP_931BBC99_EBFA_4692_8FBE_B555998C2C39_INCLUDED) @@ -58,13 +57,13 @@ namespace impl { // return the string representation of a token sequence template - inline typename ContainerT::value_type::string_t + inline typename ContainerT::value_type::string_type as_stringlit (ContainerT const &token_sequence, PositionT const &pos) { using namespace boost::wave; - typedef typename ContainerT::value_type::string_t string_t; + typedef typename ContainerT::value_type::string_type string_type; - string_t result("\""); + string_type result("\""); bool was_whitespace = false; typename ContainerT::const_iterator end = token_sequence.end(); for (typename ContainerT::const_iterator it = token_sequence.begin(); @@ -109,16 +108,16 @@ namespace impl { #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 // return the string representation of a token sequence template - inline typename ContainerT::value_type::string_t + inline typename ContainerT::value_type::string_type as_stringlit (std::vector const &arguments, typename std::vector::size_type i, PositionT const &pos) { using namespace boost::wave; - typedef typename ContainerT::value_type::string_t string_t; + typedef typename ContainerT::value_type::string_type string_type; BOOST_SPIRIT_ASSERT(0 <= i && i < arguments.size()); - string_t result("\""); + string_type result("\""); bool was_whitespace = false; for (/**/; i < arguments.size(); ++i) { @@ -182,11 +181,11 @@ namespace impl { // return the string representation of a token sequence template - inline typename ContainerT::value_type::string_t + inline typename ContainerT::value_type::string_type as_string (ContainerT const &token_sequence) { - typedef typename ContainerT::value_type::string_t string_t; - return as_string(token_sequence.begin(), token_sequence.end()); + typedef typename ContainerT::value_type::string_type string_type; + return as_string(token_sequence.begin(), token_sequence.end()); } #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 @@ -201,9 +200,9 @@ namespace impl { ContainerT &expanded, PositionT const &pos) { using namespace cpplexer; - typedef typename ContainerT::value_type token_t; + typedef typename ContainerT::value_type token_type; - token_t comma(T_COMMA, ",", pos); + token_type comma(T_COMMA, ",", pos); for (/**/; index < arguments.size(); ++index) { ContainerT const &arg = arguments[index]; diff --git a/include/boost/wave/util/pattern_parser.hpp b/include/boost/wave/util/pattern_parser.hpp index 457825e..f785536 100644 --- a/include/boost/wave/util/pattern_parser.hpp +++ b/include/boost/wave/util/pattern_parser.hpp @@ -3,12 +3,11 @@ Global application configuration - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(BOOST_SPIRIT_PATTERN_PARSER_HPP) diff --git a/include/boost/wave/util/symbol_table.hpp b/include/boost/wave/util/symbol_table.hpp index c9d243d..cb0a3fb 100644 --- a/include/boost/wave/util/symbol_table.hpp +++ b/include/boost/wave/util/symbol_table.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(SYMBOL_TABLE_HPP_32B0F7C6_3DD6_4113_95A5_E16516C6F45A_INCLUDED) @@ -18,8 +17,6 @@ #include #include -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS == 0 - /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -44,332 +41,4 @@ struct symbol_table } // namespace wave } // namespace boost -#else // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS == 0 - -#include -#include - -#include - -//#define BOOST_WAVE_USE_TST_SYMBOLTABLE - -#if defined(BOOST_WAVE_USE_TST_SYMBOLTABLE) -#include -#endif // defined(WAVE_USE_TST_SYMBOLTABLE) - -/////////////////////////////////////////////////////////////////////////////// -namespace boost { -namespace wave { -namespace util { - -namespace { - - template - inline StringT - make_name(StringT const &name) - { - return !name.empty() ? name : ""; - } -} - -/////////////////////////////////////////////////////////////////////////////// -// -// The symbol_table class is used for structured storage of defined macros. It -// supports macro scoping. -// -/////////////////////////////////////////////////////////////////////////////// - -template -class symbol_table { - - typedef symbol_table self_t; - typedef boost::shared_ptr self_ref_t; - typedef boost::shared_ptr macro_ref_t; - typedef std::map enclosed_scopes_t; - -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 - typedef std::map defined_macros_t; -#else - typedef boost::spirit::tst defined_macros_t; -#endif - -public: - typedef typename defined_macros_t::value_type value_type; - typedef typename defined_macros_t::iterator iterator; - typedef typename defined_macros_t::const_iterator const_iterator; - - typedef typename enclosed_scopes_t::value_type scope_type; - typedef typename enclosed_scopes_t::iterator scope_iterator; - typedef typename enclosed_scopes_t::const_iterator const_scope_iterator; - -public: -// constructs global scope symbol table - symbol_table(long uid_) - : contains_unnamed_part(false), uid(uid_) - {} - -// constructs any non-global scope symbol table - symbol_table(StringT const &scope_name_, StringT const &full_outer_name_, - bool contains_unnamed_part_, long uid_) - : scope_name(scope_name_), - full_scope_name(full_outer_name_ + "::" + make_name(scope_name_)), - contains_unnamed_part(contains_unnamed_part_), - uid(uid_) - {} - // generated copy constructor - // generated destructor - // generated assignment operator - -// symbol table operations - iterator find(StringT const ¯o_name) - { return macro_names.find(macro_name); } - const_iterator find(StringT const ¯o_name) const - { return macro_names.find(macro_name); } - - iterator begin() { return macro_names.begin(); } - const_iterator begin() const { return macro_names.begin(); } - iterator end() { return macro_names.end(); } - const_iterator end() const { return macro_names.end(); } - -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 - std::pair insert(value_type const &value) - { return macro_names.insert(value); } - void erase(iterator where) { macro_names.erase(where); } -#else - std::pair insert(StringT const &value) - { return macro_names.insert(value); } - void erase(iterator where) - { macro_names.erase((*where).data()->macroname.get_value()); } -#endif - - void clear() { macro_names.clear(); } - -// scope manipulation - self_ref_t begin_scope(StringT const &name, long uid); - self_t *end_scope() const; - bool get_scope(StringT const &name, self_ref_t &scope) const; - - bool get_contains_unnamed_part() const { return contains_unnamed_part; } - - scope_iterator scope_begin() { return scopes.begin(); } - const_scope_iterator scope_begin() const { return scopes.begin(); } - scope_iterator scope_end() { return scopes.end(); } - const_scope_iterator scope_end() const { return scopes.end(); } - -// import a given macro name into this scope - bool import_macroname (StringT const &name, macro_ref_t const &value); - -// import a given scope into this scope - template - void import_scope (self_t *value, PositionT const &act_pos); - - StringT const &get_full_name() const { return full_scope_name; } - -private: - defined_macros_t macro_names; // macros defined inside this scope - StringT scope_name; // name of this scope (empty for global) - StringT full_scope_name; // full name of this scope ('::' for global) - enclosed_scopes_t scopes; // scopes defined inside this scope - bool contains_unnamed_part; // name contains unnamed part(s) - long uid; -}; - -/////////////////////////////////////////////////////////////////////////////// -// -// begin_scope -// -// This function opens a new scope with the given name inside the current -// scope. If this scope already exists, the function does nothing. -// The newly created or existing scopes are returned. -// -/////////////////////////////////////////////////////////////////////////////// -template -inline boost::shared_ptr > -symbol_table::begin_scope(StringT const &name, long uid) -{ -// if this scope does not exist, create it, otherwise reuse the existing -scope_iterator it = scopes.find(name); - - if (it == scopes.end()) { - // create the new scope - self_ref_t new_symbol_table(new self_t(name, full_scope_name, - contains_unnamed_part || name.empty(), uid)); - std::pair p = scopes.insert( - scope_type(name, new_symbol_table)); - - BOOST_SPIRIT_ASSERT(p.second); - it = p.first; - } - -// return a pointer to the new scope - return (*it).second; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// end_scope -// -// This function closes (ends) the currently active scope -// The next outer scope is returned -// -/////////////////////////////////////////////////////////////////////////////// -template -inline symbol_table * -symbol_table::end_scope() const -{ - return 0; // not used anymore -} - -/////////////////////////////////////////////////////////////////////////////// -// -// get_scope -// -// This function returns a scope with a given name, if this scope exists. -// The return value of this function indicates whether a scope with the -// given name was found or not. -// -/////////////////////////////////////////////////////////////////////////////// -template -inline bool -symbol_table::get_scope(StringT const &name, - boost::shared_ptr > &scope) const -{ -const_scope_iterator cit = scopes.find(name); - - if (cit == scopes.end()) - return false; - - scope = (*cit).second; - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// import_macroname -// -// Import a given macro name into this scope -// -// The name parameter should be an unqualified macro name. -// -/////////////////////////////////////////////////////////////////////////////// -template -inline bool -symbol_table::import_macroname (StringT const &name, - macro_ref_t const &value) -{ -// the new name shouldn't exist in this scope -iterator it = find(name); - - if (it != end()) { - // name already defined in this scope as a macro, may only be imported - // if it is the same macro -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 - return ((*it).second->uid == value->uid); -#else - return ((*it).data()->uid == value->uid); -#endif - } - -const_scope_iterator its = scopes.find(name); - - if (its != scopes.end()) { - // name already defined in this scope as a scope, may not be imported - return false; - } - -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 -std::pair p = insert(value_type(name, value)); - - BOOST_SPIRIT_ASSERT(p.second); - boost::ignore_unused_variable_warning(p); -#else -std::pair p = insert(name); - - BOOST_SPIRIT_ASSERT(p.second); - (*p.first).data() = value; -#endif - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// -// import_scope -// -// Import a given scope into this scope. This effectively makes available -// the whole scope hierarchy based at the scope to import into this scope. -// -// The name parameter should be an unqualified scope name. -// -/////////////////////////////////////////////////////////////////////////////// -template -template -inline void -symbol_table::import_scope (self_t *value, - PositionT const &act_pos) -{ -// import all macro names from the given scope - iterator end = value -> end(); - for (iterator it = value -> begin(); it != end; ++it) { -#if BOOST_WAVE_USE_TST_SYMBOLTABLE == 0 - if ((*it).second->is_predefined) - continue; // do not import predefined macros - - if (!import_macroname((*it).first, (*it).second)) { - BOOST_WAVE_THROW(preprocess_exception, alreadydefined_name, - (*it).first, act_pos); - } -#else - if ((*it).data()->is_predefined) - continue; // do not import predefined macros - - if (!import_macroname((*it).key(), (*it).data())) { - BOOST_WAVE_THROW(preprocess_exception, alreadydefined_name, - (*it).key(), act_pos); - } -#endif - } - -// import all child scopes of the given one into this scope - const_scope_iterator scope_end = value -> scope_end(); - for (const_scope_iterator scope_it = value -> scope_begin(); - scope_it != scope_end; ++scope_it) - { - StringT name ((*scope_it).first); - - // the new name shouldn't exist in this scope - iterator itm = find(name); - - if (itm != this->end()) { - // name already defined in this scope as a macro, may not be imported - BOOST_WAVE_THROW(preprocess_exception, alreadydefined_name, - name, act_pos); - } - - scope_iterator its = scopes.find(name); - - if (its != scopes.end()) { - if ((*its).second->uid != (*scope_it).second->uid) { - // name already defined in this scope as a scope, may not be imported - BOOST_WAVE_THROW(preprocess_exception, alreadydefined_name, - name, act_pos); - } - continue; // this scope was imported already - } - - // if this scope does not exist, import it - std::pair p = scopes.insert( - scope_type(name, (*scope_it).second)); - - BOOST_SPIRIT_ASSERT(p.second); - boost::ignore_unused_variable_warning(p); - } -} - -/////////////////////////////////////////////////////////////////////////////// -} // namespace util -} // namespace wave -} // namespace boost - -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS == 0 - #endif // !defined(SYMBOL_TABLE_HPP_32B0F7C6_3DD6_4113_95A5_E16516C6F45A_INCLUDED) diff --git a/include/boost/wave/util/time_conversion_helper.hpp b/include/boost/wave/util/time_conversion_helper.hpp index f4b40bd..e8ae9e3 100644 --- a/include/boost/wave/util/time_conversion_helper.hpp +++ b/include/boost/wave/util/time_conversion_helper.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(TIME_CONVERSION_HELPER_HPP_DA97E389_1797_43BA_82AE_B071064B3EF4_INCLUDED) diff --git a/include/boost/wave/util/transform_iterator.hpp b/include/boost/wave/util/transform_iterator.hpp index 906ab3a..b77c3c5 100644 --- a/include/boost/wave/util/transform_iterator.hpp +++ b/include/boost/wave/util/transform_iterator.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED) @@ -120,8 +119,8 @@ namespace impl { { typedef typename ref_transform_iterator_generator< AdaptableUnaryFunctionT, IteratorT>::type - iterator_t; - return iterator_t(base, f.transform); + iterator_type; + return iterator_type(base, f.transform); } // Retrieve the token value given a parse node diff --git a/include/boost/wave/util/unput_queue_iterator.hpp b/include/boost/wave/util/unput_queue_iterator.hpp index 1320e11..94e8b34 100644 --- a/include/boost/wave/util/unput_queue_iterator.hpp +++ b/include/boost/wave/util/unput_queue_iterator.hpp @@ -3,12 +3,11 @@ Definition of the unput queue iterator - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(UNPUT_QUEUE_ITERATOR_HPP_76DA23D0_4893_4AD5_ABCC_6CED7CFB89BC_INCLUDED) #define UNPUT_QUEUE_ITERATOR_HPP_76DA23D0_4893_4AD5_ABCC_6CED7CFB89BC_INCLUDED @@ -114,7 +113,7 @@ class unput_queue_iterator public: typedef ContainerT container_t; - typedef IteratorT iterator_t; + typedef IteratorT iterator_type; unput_queue_iterator(IteratorT const &it, ContainerT &queue) : base_t(it, policies_t(queue)) @@ -150,7 +149,7 @@ class unput_queue_iterator public: typedef ContainerT container_t; - typedef IteratorT iterator_t; + typedef IteratorT iterator_type; unput_queue_iterator(IteratorT const &it, ContainerT &queue) : base_t(it), unput_queue(queue) @@ -259,10 +258,10 @@ namespace impl { struct assign_iterator< unput_queue_iterator > { - typedef unput_queue_iterator iterator_t; + typedef unput_queue_iterator iterator_type; static void - do_ (iterator_t &dest, iterator_t const &src) + do_ (iterator_type &dest, iterator_type const &src) { dest.base() = src.base(); dest.policies() = src.policies(); @@ -305,19 +304,19 @@ namespace impl { struct next_token< unput_queue_iterator > { - typedef unput_queue_iterator iterator_t; + typedef unput_queue_iterator iterator_type; static boost::wave::token_id - peek(iterator_t it, iterator_t end, bool skip_whitespace = true) + peek(iterator_type it, iterator_type end, bool skip_whitespace = true) { using namespace boost::wave; - typename iterator_t::container_t &queue = it.get_unput_queue(); + typename iterator_type::container_t &queue = it.get_unput_queue(); // first try to find it in the unput_queue if (0 != queue.size()) { - typename iterator_t::container_t::iterator cit = queue.begin(); - typename iterator_t::container_t::iterator cend = queue.end(); + typename iterator_type::container_t::iterator cit = queue.begin(); + typename iterator_type::container_t::iterator cend = queue.end(); if (skip_whitespace) { for (++cit; cit != cend; ++cit) { @@ -336,8 +335,8 @@ namespace impl { } // second try to move on into the base iterator stream - typename iterator_t::iterator_t base_it = it.get_base_iterator(); - typename iterator_t::iterator_t base_end = end.get_base_iterator(); + typename iterator_type::iterator_type base_it = it.get_base_iterator(); + typename iterator_type::iterator_type base_end = end.get_base_iterator(); if (0 == queue.size()) ++base_it; // advance, if the unput queue is empty diff --git a/include/boost/wave/wave_config.hpp b/include/boost/wave/wave_config.hpp index d58fa74..17a6c21 100644 --- a/include/boost/wave/wave_config.hpp +++ b/include/boost/wave/wave_config.hpp @@ -3,12 +3,11 @@ Global application configuration - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED) @@ -18,37 +17,6 @@ #include #include -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement macro scopes (#scope/#endscope), variadics, -// placemarkers and well defined token pasting in C++ mode -// -// To implement these features, uncomment the following -// -#if !defined(BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS) -#define BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS 1 -#endif - -/////////////////////////////////////////////////////////////////////////////// -// Define the macro scoping keywords to be used for the experimental macro -// scoping support. -// -// If the following macros aren't defined, the corresponding default value is -// used. -// -// Note, if you change this, you will have to change the corresponding entries -// inside the wave/cpplexer/re2c/cpp.re file too. -// -#if !defined(BOOST_WAVE_PP_REGION) -#define BOOST_WAVE_PP_REGION "region" -#define BOOST_WAVE_PP_REGION_UC "REGION" // uppercase of BOOST_WAVE_PP_REGION -#endif -#if !defined(BOOST_WAVE_PP_ENDREGION) -#define BOOST_WAVE_PP_ENDREGION "endregion" -#endif -#if !defined(BOOST_WAVE_PP_IMPORT) -#define BOOST_WAVE_PP_IMPORT "import" -#endif - /////////////////////////////////////////////////////////////////////////////// // Define the maximal include nesting depth allowed. If this value isn't // defined it defaults to 1024 @@ -184,6 +152,11 @@ #define BOOST_NO_MT #include +//#define BOOST_WAVE_STRINGTYPE boost::const_string +// +//#include +//#include + #endif /////////////////////////////////////////////////////////////////////////////// @@ -265,13 +238,6 @@ #define BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION 1 #endif -/////////////////////////////////////////////////////////////////////////////// -// The experimental C++0x mode implies the variadics and placemarkers -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 && \ - !defined(BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS) -#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1 -#endif - /////////////////////////////////////////////////////////////////////////////// // configure Boost.Pool thread support (for now: no thread support at all) #if !defined(BOOST_NO_MT) diff --git a/include/boost/wave/wave_version.hpp b/include/boost/wave/wave_version.hpp index 4994ed0..dcb6139 100644 --- a/include/boost/wave/wave_version.hpp +++ b/include/boost/wave/wave_version.hpp @@ -3,12 +3,11 @@ This is the current version of the Wave library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED) @@ -17,11 +16,11 @@ // BOOST_WAVE_VERSION & 0x0000FF is the sub-minor version // BOOST_WAVE_VERSION & 0x00FF00 is the minor version // BOOST_WAVE_VERSION & 0xFF0000 is the major version -#define BOOST_WAVE_VERSION 0x010105 +#define BOOST_WAVE_VERSION 0x010107 // The following defines contain the same information as above #define BOOST_WAVE_VERSION_MAJOR 1 #define BOOST_WAVE_VERSION_MINOR 1 -#define BOOST_WAVE_VERSION_SUBMINOR 5 +#define BOOST_WAVE_VERSION_SUBMINOR 7 #endif // !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED) diff --git a/index.html b/index.html index cfef629..d4d6fb5 100644 --- a/index.html +++ b/index.html @@ -1,16 +1,16 @@ -Wave V1.1 +Wave V1.2 - - + +
+ V1.2

Wave - V1.1
@@ -73,9 +73,6 @@ Compile Time Configuration - - Preliminary C++0x support - Samples @@ -100,10 +97,11 @@
-Last updated: - Saturday, January 24, 2004 19:25 - +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)

+ + + +Saturday, August 21, 2004 19:47 \ No newline at end of file diff --git a/samples/cpp_tokens/build/Jamfile b/samples/cpp_tokens/build/Jamfile index ab6d172..d1c5c5d 100644 --- a/samples/cpp_tokens/build/Jamfile +++ b/samples/cpp_tokens/build/Jamfile @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (cpp_tokens) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) subproject libs/wave/samples/cpp_tokens/build ; diff --git a/samples/cpp_tokens/build/Jamfile.v2 b/samples/cpp_tokens/build/Jamfile.v2 index f68b6f2..95c47e6 100644 --- a/samples/cpp_tokens/build/Jamfile.v2 +++ b/samples/cpp_tokens/build/Jamfile.v2 @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (cpp_tokens) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) exe cpp_tokens : ../cpp_tokens.cpp diff --git a/samples/cpp_tokens/cpp_tokens.cpp b/samples/cpp_tokens/cpp_tokens.cpp index b57bbc1..d281a8f 100644 --- a/samples/cpp_tokens/cpp_tokens.cpp +++ b/samples/cpp_tokens/cpp_tokens.cpp @@ -6,12 +6,11 @@ This sample shows, how it is possible to use a custom lexer type and a custom token type with the Wave library. - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp_tokens.hpp" // global configuration @@ -74,22 +73,22 @@ main(int argc, char *argv[]) // 'slex_token<>'. Our custom token type differs from the original one povided // by the Wave library only by defining an addition operator<<, which is used // to dump the token information carried by a given token (see loop below). - typedef boost::wave::cpp_token_sample::slex_token<> token_t; - typedef boost::wave::cpp_token_sample::slex_iterator + typedef boost::wave::cpp_token_sample::slex_token<> token_type; + typedef boost::wave::cpp_token_sample::slex_iterator lex_iterator_t; typedef boost::wave::context - context_t; + context_type; // The C++ preprocessor iterator shouldn't be constructed directly. It is to be // generated through a boost::wave::context<> object. This object is // additionally to be used to initialize and define different parameters of // the actual preprocessing. // The preprocessing of the input stream is done on the fly behind the scenes -// during iteration over the context_t::iterator_t stream. - context_t ctx (teststr.begin(), teststr.end(), argv[1]); - context_t::iterator_t first = ctx.begin(); - context_t::iterator_t last = ctx.end(); - context_t::token_t current_token; +// during iteration over the context_type::iterator_type stream. + context_type ctx (teststr.begin(), teststr.end(), argv[1]); + context_type::iterator_type first = ctx.begin(); + context_type::iterator_type last = ctx.end(); + context_type::token_type current_token; try { // Traverse over the tokens generated from the input and dump the token diff --git a/samples/cpp_tokens/cpp_tokens.hpp b/samples/cpp_tokens/cpp_tokens.hpp index 5a417a0..a05096e 100644 --- a/samples/cpp_tokens/cpp_tokens.hpp +++ b/samples/cpp_tokens/cpp_tokens.hpp @@ -6,12 +6,11 @@ This sample shows, how it is possible to use a custom lexer object and a custom token type with the Wave library. - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_TOKENS_HPP_D6A31137_CE14_4869_9779_6357E2C43187_INCLUDED) diff --git a/samples/cpp_tokens/cpp_tokens_config.hpp b/samples/cpp_tokens/cpp_tokens_config.hpp index e24fef8..29b65bf 100644 --- a/samples/cpp_tokens/cpp_tokens_config.hpp +++ b/samples/cpp_tokens/cpp_tokens_config.hpp @@ -4,37 +4,16 @@ Sample: Print out the preprocessed tokens returned by the Wave iterator Configuration data - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_TOKENS_HPP_7C0F1F14_6ACA_4439_A073_32C61C0DB6C5_INCLUDED) #define CPP_TOKENS_HPP_7C0F1F14_6ACA_4439_A073_32C61C0DB6C5_INCLUDED -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement macro scopes (#scope/#endscope), variadics, -// placemarkers and well defined token pasting in C++ mode -// -// To implement these features, uncomment the following -// -#define BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS 0 - -/////////////////////////////////////////////////////////////////////////////// -// Define the macro scoping keywords to be used for the experimental macro -// scoping support. -// -// If the following macros aren't defined, the corresponding default value is -// used. -// -//#define BOOST_WAVE_PP_REGION "region" -//#define BOOST_WAVE_PP_REGION_UC "REGION" // uppercase of BOOST_WAVE_PP_REGION -//#define BOOST_WAVE_PP_ENDREGION "endregion" -//#define BOOST_WAVE_PP_IMPORT "import" - /////////////////////////////////////////////////////////////////////////////// // Define the maximal include nesting depth allowed. If this value isn't // defined it defaults to 1024 diff --git a/samples/cpp_tokens/instantiate_cpp_exprgrammar.cpp b/samples/cpp_tokens/instantiate_cpp_exprgrammar.cpp index 4365e94..d453660 100644 --- a/samples/cpp_tokens/instantiate_cpp_exprgrammar.cpp +++ b/samples/cpp_tokens/instantiate_cpp_exprgrammar.cpp @@ -5,14 +5,11 @@ Explicit instantiation of the cpp_expression_grammar parsing function - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) - - See Copyright.txt for full acknowledgements. + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp_tokens.hpp" // config data @@ -37,9 +34,9 @@ // /////////////////////////////////////////////////////////////////////////////// -typedef boost::wave::cpp_token_sample::slex_token<> token_t; +typedef boost::wave::cpp_token_sample::slex_token<> token_type; -template struct boost::wave::grammars::expression_grammar_gen; +template struct boost::wave::grammars::expression_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/cpp_tokens/instantiate_cpp_grammar.cpp b/samples/cpp_tokens/instantiate_cpp_grammar.cpp index 5400582..ea10017 100644 --- a/samples/cpp_tokens/instantiate_cpp_grammar.cpp +++ b/samples/cpp_tokens/instantiate_cpp_grammar.cpp @@ -4,14 +4,11 @@ Sample: prints out the preprocessed tokens returned by the pp iterator Explicit instantiation of the cpp_grammar parsing function - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) - - See Copyright.txt for full acknowledgements. + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp_tokens.hpp" // config data @@ -38,8 +35,8 @@ typedef boost::wave::cpp_token_sample::slex_iterator< boost::wave::cpp_token_sample::slex_token<> > - lex_t; -template struct boost::wave::grammars::cpp_grammar_gen; + lexer_type; +template struct boost::wave::grammars::cpp_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/cpp_tokens/instantiate_cpp_literalgrammars.cpp b/samples/cpp_tokens/instantiate_cpp_literalgrammars.cpp index 892c486..383f89e 100644 --- a/samples/cpp_tokens/instantiate_cpp_literalgrammars.cpp +++ b/samples/cpp_tokens/instantiate_cpp_literalgrammars.cpp @@ -3,14 +3,11 @@ Sample: prints out the preprocessed tokens returned by the pp iterator - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) - - See Copyright.txt for full acknowledgements. + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp_tokens.hpp" // config data @@ -37,10 +34,10 @@ // /////////////////////////////////////////////////////////////////////////////// -typedef boost::wave::cpp_token_sample::slex_token<> token_t; +typedef boost::wave::cpp_token_sample::slex_token<> token_type; -template struct boost::wave::grammars::intlit_grammar_gen; -template struct boost::wave::grammars::chlit_grammar_gen; +template struct boost::wave::grammars::intlit_grammar_gen; +template struct boost::wave::grammars::chlit_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/cpp_tokens/instantiate_defined_grammar.cpp b/samples/cpp_tokens/instantiate_defined_grammar.cpp index a56807e..ce738e9 100644 --- a/samples/cpp_tokens/instantiate_defined_grammar.cpp +++ b/samples/cpp_tokens/instantiate_defined_grammar.cpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp_tokens.hpp" // config data @@ -33,8 +32,8 @@ typedef boost::wave::cpp_token_sample::slex_iterator< boost::wave::cpp_token_sample::slex_token<> > - lex_t; -template struct boost::wave::grammars::defined_grammar_gen; + lexer_type; +template struct boost::wave::grammars::defined_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/cpp_tokens/instantiate_slex_lexer.cpp b/samples/cpp_tokens/instantiate_slex_lexer.cpp index 6354cd4..ec864fc 100644 --- a/samples/cpp_tokens/instantiate_slex_lexer.cpp +++ b/samples/cpp_tokens/instantiate_slex_lexer.cpp @@ -4,12 +4,11 @@ Sample: Print out the preprocessed tokens returned by the Wave iterator Explicit instantiation of the lex_functor generation function - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp_tokens.hpp" // config data diff --git a/samples/cpp_tokens/slex/cpp_slex_lexer.hpp b/samples/cpp_tokens/slex/cpp_slex_lexer.hpp index 6ae231a..91ec889 100644 --- a/samples/cpp_tokens/slex/cpp_slex_lexer.hpp +++ b/samples/cpp_tokens/slex/cpp_slex_lexer.hpp @@ -3,12 +3,11 @@ SLex (Spirit Lex) based C++ lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(SLEX_LEXER_HPP_5E8E1DF0_BB41_4938_B7E5_A4BB68222FF6_INCLUDED) @@ -55,11 +54,11 @@ class lexer public: typedef boost::wave::util::position_iterator - iterator_t; + iterator_type; typedef typename std::iterator_traits::value_type char_t; - typedef boost::spirit::lexer base_t; + typedef boost::spirit::lexer base_t; - typedef boost::wave::cpp_token_sample::slex_token token_t; + typedef boost::wave::cpp_token_sample::slex_token token_type; lexer(); void init_dfa(boost::wave::language_support language); @@ -79,9 +78,6 @@ private: static lexer_data const init_data[]; // common patterns static lexer_data const init_data_cpp[]; // C++ only patterns -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - static lexer_data const init_data_cpp0x[]; // C++0x only patterns -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 // helper for calculation of the time of last compilation static boost::wave::util::time_conversion_helper compilation_time; @@ -336,11 +332,6 @@ lexer::init_data[] = TOKEN_DATA(MSEXT_INLINE, "_?" "_inline"), TOKEN_DATA(MSEXT_ASM, "_?" "_asm"), #endif // BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0 -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - TOKEN_DATA(PP_REGION, POUNDDEF PPSPACE BOOST_WAVE_PP_REGION), - TOKEN_DATA(PP_ENDREGION, POUNDDEF PPSPACE BOOST_WAVE_PP_ENDREGION), - TOKEN_DATA(PP_IMPORT, POUNDDEF PPSPACE BOOST_WAVE_PP_IMPORT), -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 { token_id(0) } // this should be the last entry }; @@ -367,20 +358,6 @@ lexer::init_data_cpp[] = { token_id(0) } // this should be the last entry }; -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -/////////////////////////////////////////////////////////////////////////////// -// C++0x only token definitions -template -typename lexer::lexer_data const -lexer::init_data_cpp0x[] = -{ - TOKEN_DATA(COMMA_ALT, "__comma__"), - TOKEN_DATA(LEFTPAREN_ALT, "__lparen__"), - TOKEN_DATA(RIGHTPAREN_ALT, "__rparen__"), - { token_id(0) } // this should be the last entry -}; -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - /////////////////////////////////////////////////////////////////////////////// // undefine macros, required for regular expression definitions #undef INCLUDEDEF @@ -420,11 +397,6 @@ template inline void lexer::init_dfa(boost::wave::language_support lang) { -// the modes are mutually exclusive -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - BOOST_ASSERT(!boost::wave::need_c99(lang) || !boost::wave::need_cpp0x(lang)); -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (has_compiled_dfa()) return; @@ -441,17 +413,6 @@ lexer::init_dfa(boost::wave::language_support lang) init_data_cpp[j].lexerstate); } } - -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 -// C++0x mode has it's own new keywords - if (boost::wave::need_cpp0x(lang)) { - for (int k = 0; 0 != init_data_cpp0x[k].tokenid; ++k) { - this->register_regex(init_data_cpp0x[k].tokenregex, - init_data_cpp0x[k].tokenid, init_data_cpp0x[k].tokencb, - init_data_cpp0x[k].lexerstate); - } - } -#endif // BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 } /////////////////////////////////////////////////////////////////////////////// @@ -506,17 +467,17 @@ ifstream dfa_in("wave_slex_lexer.dfa", ios::in|ios::binary); // /////////////////////////////////////////////////////////////////////////////// -template +template class slex_functor -: public slex_input_interface::token_t> +: public slex_input_interface::token_type> { public: typedef boost::wave::util::position_iterator - iterator_t; + iterator_type; typedef typename std::iterator_traits::value_type char_t; - typedef BOOST_WAVE_STRINGTYPE string_t; - typedef typename lexer::token_t token_t; + typedef BOOST_WAVE_STRINGTYPE string_type; + typedef typename lexer::token_type token_type; slex_functor(IteratorT const &first_, IteratorT const &last_, PositionT const &pos_, boost::wave::language_support language) @@ -528,9 +489,9 @@ public: virtual ~slex_functor() {} // get the next token from the input stream - token_t get() + token_type get() { - token_t token; + token_type token; if (!at_eof) { do { @@ -542,7 +503,7 @@ public: if ((token_id)(-1) == id) id = T_EOF; // end of input reached - string_t token_val(value.c_str()); + string_type token_val(value.c_str()); if (T_CONTLINE != id) { switch (id) { @@ -568,7 +529,7 @@ public: case T_PP_QHEADER: case T_PP_INCLUDE: // convert to the corresponding ..._next token, if appropriate - if (string_t::npos != value.find("include_")) + if (string_type::npos != value.find("include_")) id = token_id(id | AltTokenType); break; #endif // BOOST_WAVE_SUPPORT_INCLUDE_NEXT != 0 @@ -579,7 +540,7 @@ public: at_eof = true; break; } - return token_t(id, token_val, pos); + return token_type(id, token_val, pos); } // skip the T_CONTLINE token @@ -591,8 +552,8 @@ public: { first.set_position(pos); } private: - iterator_t first; - iterator_t last; + iterator_type first; + iterator_type last; static lexer lexer; // needed only once bool at_eof; diff --git a/samples/cpp_tokens/slex/lexer.hpp b/samples/cpp_tokens/slex/lexer.hpp index cff9a34..ff98cce 100644 --- a/samples/cpp_tokens/slex/lexer.hpp +++ b/samples/cpp_tokens/slex/lexer.hpp @@ -3,14 +3,12 @@ Spirit based lexer - Copyright (c) 2001, Daniel C. Nuffer - Copyright (c) 2002-2004, Hartmut Kaiser - http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001, Daniel C. Nuffer. + Copyright (c) 2001-2004 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) TODO List: X callback objects (called when a match is made.) @@ -982,7 +980,7 @@ ccl_node::dump(std::ostream& out) const template class make_concat { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: @@ -990,7 +988,7 @@ public: : m_stack(the_stack) {} - void operator()(iterator_t const &, iterator_t const &) const + void operator()(iterator_type const &, iterator_type const &) const { node* right = m_stack.top(); m_stack.pop(); @@ -1063,11 +1061,11 @@ get_byte(CharT c, unsigned int byte) template class make_star { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; make_star(std::stack& the_stack) @@ -1088,7 +1086,7 @@ public: template class make_or { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: @@ -1096,7 +1094,7 @@ public: : m_stack(the_stack) {} - void operator()(iterator_t const&, iterator_t const&) const + void operator()(iterator_type const&, iterator_type const&) const { node* right = m_stack.top(); m_stack.pop(); @@ -1112,11 +1110,11 @@ public: template class make_plus { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; make_plus(std::stack& the_stack) @@ -1141,11 +1139,11 @@ public: template class make_optional { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; make_optional(std::stack& the_stack) @@ -1170,8 +1168,8 @@ template inline utility::impl::range const& full_range() { - static utility::impl::range full(std::numeric_limits::min(), - std::numeric_limits::max()); + static utility::impl::range full((std::numeric_limits::min)(), + (std::numeric_limits::max)()); return full; } @@ -1487,23 +1485,23 @@ end_outer_for: template class make_char { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; make_char(std::stack& the_stack) : m_stack(the_stack) {} - void operator()(iterator_t const& first, iterator_t const& last) const + void operator()(iterator_type const& first, iterator_type const& last) const { const escape_char_parser lex_escape_ch = escape_char_parser(); char_t the_char; - iterator_t first_ = first; + iterator_type first_ = first; ScannerT scan(first_, last); lex_escape_ch[assign(the_char)].parse(scan); node* newnode = ccl_utils::create_mb_node_seq(the_char); @@ -1517,19 +1515,19 @@ public: template class make_ccl { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; make_ccl(std::stack& the_stack) : m_stack(the_stack) {} - static bool is_equal_to_string(iterator_t first, - iterator_t const & last, const char* str) + static bool is_equal_to_string(iterator_type first, + iterator_type const & last, const char* str) { while (first != last &&*str &&*first ==*str) { @@ -1549,11 +1547,11 @@ public: } } - void operator()(iterator_t const& first_, iterator_t const& last) const + void operator()(iterator_type const& first_, iterator_type const& last) const { BOOST_SPIRIT_ASSERT(*first_ == '['); - iterator_t first = first_; + iterator_type first = first_; ++first; // skip over '[' bool negated_ccl = false; if (*first == '^') @@ -1662,11 +1660,11 @@ public: template class make_any_char { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; std::stack& m_stack; @@ -1695,11 +1693,11 @@ public: template class make_string { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; std::stack& m_stack; @@ -1708,11 +1706,11 @@ public: : m_stack(the_stack) {} - void operator()(iterator_t const& first, iterator_t const& last) const + void operator()(iterator_type const& first, iterator_type const& last) const { BOOST_SPIRIT_ASSERT(*first == '"'); - iterator_t first_ = first; + iterator_type first_ = first; ScannerT scan(first_, last); ++scan.first; // skip over '"' @@ -1759,11 +1757,11 @@ node* optional_node(node* n) template class make_rep1 { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; std::stack& m_stack; @@ -1772,11 +1770,11 @@ public: : m_stack(the_stack) {} - void operator()(iterator_t const& first, iterator_t const& last) const + void operator()(iterator_type const& first, iterator_type const& last) const { BOOST_SPIRIT_ASSERT(*first == '{'); - iterator_t first_ = first; + iterator_type first_ = first; ScannerT scan(first_, last); ++scan.first; // skip over '{' @@ -1795,11 +1793,11 @@ public: template class make_rep2 { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; std::stack& m_stack; @@ -1808,11 +1806,11 @@ public: : m_stack(the_stack) {} - void operator()(iterator_t const& first, iterator_t const& last) const + void operator()(iterator_type const& first, iterator_type const& last) const { BOOST_SPIRIT_ASSERT(*first == '{'); - iterator_t first_ = first; + iterator_type first_ = first; ScannerT scan (first_, last); ++scan.first; // skip over '{' @@ -1833,11 +1831,11 @@ public: template class make_rep3 { - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; public: typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; std::stack& m_stack; @@ -1846,11 +1844,11 @@ public: : m_stack(the_stack) {} - void operator()(iterator_t const& first, iterator_t const& last) const + void operator()(iterator_type const& first, iterator_type const& last) const { BOOST_SPIRIT_ASSERT(*first == '{'); - iterator_t first_ = first; + iterator_type first_ = first; ScannerT scan(first_, last); ++scan.first; // skip over '{' @@ -1894,9 +1892,9 @@ public: struct definition { typedef rule rule_t; - typedef typename ScannerT::iterator_t iterator_t; + typedef typename ScannerT::iterator_t iterator_type; typedef - typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type + typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; rule_t regex, re, series, singleton, singleton2, fullccl, ccl, string, @@ -2108,7 +2106,7 @@ struct regex_match_helper // single byte char { typedef std::basic_string< typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type - > string_t; + > string_type; node_id_t s = 0; node_id_t last_accepting_index = invalid_node; @@ -2119,7 +2117,7 @@ struct regex_match_helper // single byte char s = dfa.transition_table[s][(uchar)*p]; if (s == invalid_node) break; - if (token) token->append((string_t::size_type)1, *p); + if (token) token->append((string_type::size_type)1, *p); ++p; if (dfa.acceptance_index[s] != invalid_node) { @@ -2157,7 +2155,7 @@ struct regex_match_helper // wide char typedef typename BOOST_SPIRIT_IT_NS::iterator_traits::value_type char_t; - typedef std::basic_string string_t; + typedef std::basic_string string_type; node_id_t s = 0; node_id_t last_accepting_index = invalid_node; @@ -2174,7 +2172,7 @@ struct regex_match_helper // wide char goto break_while; } } - if (token) token->append((string_t::size_type)1, *wp); + if (token) token->append((string_type::size_type)1, *wp); ++wp; if (dfa.acceptance_index[s] != invalid_node) { diff --git a/samples/cpp_tokens/slex_interface.hpp b/samples/cpp_tokens/slex_interface.hpp index 073962c..8991dfe 100644 --- a/samples/cpp_tokens/slex_interface.hpp +++ b/samples/cpp_tokens/slex_interface.hpp @@ -3,12 +3,11 @@ Definition of the abstract lexer interface - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(SLEX_INTERFACE_HPP_E83F52A4_90AC_4FBE_A9A7_B65F7F94C497_INCLUDED) @@ -31,7 +30,7 @@ template struct slex_input_interface; template < typename IteratorT, - typename PositionT = boost::wave::util::file_position_t + typename PositionT = boost::wave::util::file_position_type > struct new_lexer_gen { @@ -54,10 +53,10 @@ struct new_lexer_gen template struct slex_input_interface { - typedef typename TokenT::position_t position_t; + typedef typename TokenT::position_type position_type; virtual TokenT get() = 0; - virtual void set_position(position_t const &pos) = 0; + virtual void set_position(position_type const &pos) = 0; virtual ~slex_input_interface() {} @@ -67,9 +66,9 @@ struct slex_input_interface template static slex_input_interface * new_lexer(IteratorT const &first, IteratorT const &last, - position_t const &pos, boost::wave::language_support language) + position_type const &pos, boost::wave::language_support language) { - return new_lexer_gen::new_lexer (first, last, + return new_lexer_gen::new_lexer (first, last, pos, language); } }; diff --git a/samples/cpp_tokens/slex_iterator.hpp b/samples/cpp_tokens/slex_iterator.hpp index c4bbe35..a3df1bb 100644 --- a/samples/cpp_tokens/slex_iterator.hpp +++ b/samples/cpp_tokens/slex_iterator.hpp @@ -3,12 +3,11 @@ Definition of the lexer iterator - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(SLEX_ITERATOR_HPP_AF0C37E3_CBD8_4F33_A225_51CF576FA61F_INCLUDED) @@ -45,7 +44,7 @@ class slex_iterator_functor_shim public: template slex_iterator_functor_shim(IteratorT const &first, IteratorT const &last, - typename TokenT::position_t const &pos, + typename TokenT::position_type const &pos, boost::wave::language_support language) : functor_ptr(slex_input_interface ::new_lexer(first, last, pos, language)) @@ -61,7 +60,7 @@ public: BOOST_ASSERT(0 != functor_ptr.get()); return functor_ptr->get(); } - void set_position(typename TokenT::position_t const &pos) + void set_position(typename TokenT::position_type const &pos) { BOOST_ASSERT(0 != functor_ptr.get()); functor_ptr->set_position(pos); @@ -91,7 +90,7 @@ private: // // - the lexer type should have a function implemented, which returnes // the next lexed token from the input stream: -// typename LexT::token_t get(); +// typename LexT::token_type get(); // - at the end of the input stream this function should return the // eof token equivalent // - the lexer should implement a constructor taking two iterators @@ -107,24 +106,24 @@ class slex_iterator boost::wave::util::functor_input > { - typedef impl::slex_iterator_functor_shim input_policy_t; + typedef impl::slex_iterator_functor_shim input_policy_type; typedef - boost::spirit::multi_pass base_t; - typedef slex_iterator self_t; + typedef slex_iterator self_type; public: - typedef TokenT token_t; + typedef TokenT token_type; slex_iterator() {} template slex_iterator(IteratorT const &first, IteratorT const &last, - typename TokenT::position_t const &pos, + typename TokenT::position_type const &pos, boost::wave::language_support language) - : base_t(input_policy_t(first, last, pos, language)) + : base_t(input_policy_type(first, last, pos, language)) {} }; diff --git a/samples/cpp_tokens/slex_token.hpp b/samples/cpp_tokens/slex_token.hpp index 54e829f..ade03b5 100644 --- a/samples/cpp_tokens/slex_token.hpp +++ b/samples/cpp_tokens/slex_token.hpp @@ -3,12 +3,11 @@ A generic C++ lexer token definition - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(SLEX_TOKEN_HPP_53A13BD2_FBAA_444B_9B8B_FCB225C2BBA8_INCLUDED) @@ -28,7 +27,7 @@ namespace cpp_token_sample { /////////////////////////////////////////////////////////////////////////////// // forward declaration of the token type -template +template class slex_token; /////////////////////////////////////////////////////////////////////////////// @@ -41,31 +40,31 @@ template class slex_token { public: - typedef BOOST_WAVE_STRINGTYPE string_t; - typedef PositionT position_t; + typedef BOOST_WAVE_STRINGTYPE string_type; + typedef PositionT position_type; slex_token() : id(T_EOI) {} - slex_token(token_id id_, string_t const &value_, PositionT const &pos_) + slex_token(token_id id_, string_type const &value_, PositionT const &pos_) : id(id_), value(value_), pos(pos_) {} // accessors operator token_id() const { return id; } - string_t const &get_value() const { return value; } - position_t const &get_position() const { return pos; } + string_type const &get_value() const { return value; } + position_type const &get_position() const { return pos; } void set_token_id (token_id id_) { id = id_; } - void set_value (string_t const &newval) { value = newval; } - void set_position (position_t const &pos_) { pos = pos_; } + void set_value (string_type const &newval) { value = newval; } + void set_position (position_type const &pos_) { pos = pos_; } // debug support #if BOOST_WAVE_DUMP_PARSE_TREE != 0 // access functions for the tree_to_xml functionality static int get_token_id(lex_token const &t) { return ID_FROM_TOKEN(token_id(t)); } - static string_t get_token_value(lex_token const &t) + static string_type get_token_value(lex_token const &t) { return t.get_value(); } #endif @@ -96,7 +95,7 @@ public: private: boost::wave::token_id id; // the token id - string_t value; // the text, which was parsed into this token + string_type value; // the text, which was parsed into this token PositionT pos; // the original file position }; diff --git a/samples/list_includes/build/Jamfile b/samples/list_includes/build/Jamfile index 8545326..2d5263d 100644 --- a/samples/list_includes/build/Jamfile +++ b/samples/list_includes/build/Jamfile @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (list_includes) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) subproject libs/wave/samples/list_includes/build ; diff --git a/samples/list_includes/build/Jamfile.v2 b/samples/list_includes/build/Jamfile.v2 index 04e01ac..e68d0dc 100644 --- a/samples/list_includes/build/Jamfile.v2 +++ b/samples/list_includes/build/Jamfile.v2 @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (list_includes) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) exe list_includes : ../list_includes.cpp diff --git a/samples/list_includes/list_includes.cpp b/samples/list_includes/list_includes.cpp index c8a5e2d..da97af4 100644 --- a/samples/list_includes/list_includes.cpp +++ b/samples/list_includes/list_includes.cpp @@ -9,12 +9,11 @@ To get a hint which commandline options are supported, call it with the --help option. - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "list_includes.hpp" // config data @@ -137,7 +136,7 @@ int do_actual_work(vector const &arguments, po::variables_map const &vm) { // current file position is saved for exception handling -boost::wave::util::file_position_t current_position; +boost::wave::util::file_position_type current_position; try { // list the included files for all arguments given @@ -165,7 +164,7 @@ boost::wave::util::file_position_t current_position; std::string::iterator, lex_iterator_t, boost::wave::iteration_context_policies::load_file_to_string, trace_include_files - > context_t; + > context_type; set files; trace_include_files trace(files); @@ -175,8 +174,8 @@ boost::wave::util::file_position_t current_position; // object is additionally to be used to initialize and define different // parameters of the actual preprocessing. // The preprocessing of the input stream is done on the fly behind the - // scenes during iteration over the context_t::iterator_t stream. - context_t ctx (instring.begin(), instring.end(), (*file_it).c_str(), trace); + // scenes during iteration over the context_type::iterator_type stream. + context_type ctx (instring.begin(), instring.end(), (*file_it).c_str(), trace); // add include directories to the include path if (vm.count("include")) { @@ -203,8 +202,8 @@ boost::wave::util::file_position_t current_position; } // analyze the actual file - context_t::iterator_t first = ctx.begin(); - context_t::iterator_t last = ctx.end(); + context_type::iterator_type first = ctx.begin(); + context_type::iterator_type last = ctx.end(); cout << "Printing dependency information for: " << *file_it << endl; diff --git a/samples/list_includes/list_includes.hpp b/samples/list_includes/list_includes.hpp index 2315011..e93f634 100644 --- a/samples/list_includes/list_includes.hpp +++ b/samples/list_includes/list_includes.hpp @@ -4,12 +4,11 @@ Sample: List include dependencies of a given source file Configuration data - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(LIST_INCLUDES_HPP_843DB412_3AA8_4BCF_8081_AA4A5FDE0BE7_INCLUDED) diff --git a/samples/list_includes/list_includes_config.hpp b/samples/list_includes/list_includes_config.hpp index 6b7d0db..ac1df0e 100644 --- a/samples/list_includes/list_includes_config.hpp +++ b/samples/list_includes/list_includes_config.hpp @@ -3,40 +3,16 @@ Global application configuration of the list_includes sample - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(LIST_INCLUDES_CONFIG_HPP_0DE80E47_8D50_4DFA_9C1C_0EECAA8A934A_INCLUDED) #define LIST_INCLUDES_CONFIG_HPP_0DE80E47_8D50_4DFA_9C1C_0EECAA8A934A_INCLUDED -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement macro scopes (#scope/#endscope), variadics, -// placemarkers and well defined token pasting in C++ mode -// -// To implement these features, uncomment the following -// -#define BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS 0 - -/////////////////////////////////////////////////////////////////////////////// -// Define the macro scoping keywords to be used for the experimental macro -// scoping support. -// -// If the following macros aren't defined, the corresponding default value is -// used. -// -// Note, if you change this, you will have to change the corresponding entries -// inside the wave/cpplexer/re2c/cpp.re file too. -// -//#define BOOST_WAVE_PP_REGION "region" -//#define BOOST_WAVE_PP_REGION_UC "REGION" // uppercase of BOOST_WAVE_PP_REGION -//#define BOOST_WAVE_PP_ENDREGION "endregion" -//#define BOOST_WAVE_PP_IMPORT "import" - /////////////////////////////////////////////////////////////////////////////// // Define the maximal include nesting depth allowed. If this value isn't // defined it defaults to 1024 diff --git a/samples/list_includes/list_includes_version.hpp b/samples/list_includes/list_includes_version.hpp index 9e8f0f4..a7830ea 100644 --- a/samples/list_includes/list_includes_version.hpp +++ b/samples/list_includes/list_includes_version.hpp @@ -3,12 +3,11 @@ Sample: List include dependencies of a given source file version number - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(LIST_INCLUDES_VERSION_HPP_FF662D6C_C3E6_4BEC_A062_5D9BD7415EBF_INCLUDED) diff --git a/samples/quick_start/build/Jamfile b/samples/quick_start/build/Jamfile index 699bfee..02813fc 100644 --- a/samples/quick_start/build/Jamfile +++ b/samples/quick_start/build/Jamfile @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (quick_start) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) subproject libs/wave/samples/quick_start/build ; diff --git a/samples/quick_start/build/Jamfile.v2 b/samples/quick_start/build/Jamfile.v2 index 7e7e1e1..d5a0200 100644 --- a/samples/quick_start/build/Jamfile.v2 +++ b/samples/quick_start/build/Jamfile.v2 @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (quick_start) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) exe quick_start : ../quick_start.cpp diff --git a/samples/quick_start/quick_start.cpp b/samples/quick_start/quick_start.cpp index 6a4b955..8311383 100644 --- a/samples/quick_start/quick_start.cpp +++ b/samples/quick_start/quick_start.cpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -33,7 +32,7 @@ int main(int argc, char *argv[]) } // current file position is saved for exception handling -boost::wave::util::file_position_t current_position; +boost::wave::util::file_position_type current_position; try { // Open and read in the specified input file. @@ -50,17 +49,17 @@ boost::wave::util::file_position_t current_position; // The template boost::wave::cpplexer::lex_token<> is the token type to be // used by the Wave library. - typedef boost::wave::cpplexer::lex_token<> token_t; + typedef boost::wave::cpplexer::lex_token<> token_type; // The template boost::wave::cpplexer::lex_iterator<> is the lexer type to // be used by the Wave library. - typedef boost::wave::cpplexer::lex_iterator lex_iterator_t; + typedef boost::wave::cpplexer::lex_iterator lex_iterator_t; // This is the resulting context type to use. The first template parameter // should match the iterator type to be used during construction of the // corresponding context object (see below). typedef boost::wave::context - context_t; + context_type; // The preprocessor iterator shouldn't be constructed directly. It is // to be generated through a wave::context<> object. This wave:context<> @@ -68,12 +67,12 @@ boost::wave::util::file_position_t current_position; // parameters of the actual preprocessing (not done here). // // The preprocessing of the input stream is done on the fly behind the - // scenes during iteration over the context_t::iterator_t stream. - context_t ctx (instring.begin(), instring.end(), argv[1]); + // scenes during iteration over the context_type::iterator_type stream. + context_type ctx (instring.begin(), instring.end(), argv[1]); // analyze the input file - context_t::iterator_t first = ctx.begin(); - context_t::iterator_t last = ctx.end(); + context_type::iterator_type first = ctx.begin(); + context_type::iterator_type last = ctx.end(); while (first != last) { current_position = (*first).get_position(); diff --git a/samples/waveidl/build/Jamfile b/samples/waveidl/build/Jamfile index eeee4d5..2811fb3 100644 --- a/samples/waveidl/build/Jamfile +++ b/samples/waveidl/build/Jamfile @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (waveidl) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) subproject libs/wave/samples/waveidl/build ; diff --git a/samples/waveidl/build/Jamfile.v2 b/samples/waveidl/build/Jamfile.v2 index ff75424..f4a6a6a 100644 --- a/samples/waveidl/build/Jamfile.v2 +++ b/samples/waveidl/build/Jamfile.v2 @@ -2,12 +2,11 @@ # # Boost Wave Library Sample Build Jamfile (waveidl) # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) exe waveidl : ../idl.cpp diff --git a/samples/waveidl/idl.cpp b/samples/waveidl/idl.cpp index 15b4bd2..1332172 100644 --- a/samples/waveidl/idl.cpp +++ b/samples/waveidl/idl.cpp @@ -3,12 +3,11 @@ Sample: IDL oriented preprocessor - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "idl.hpp" // global configuration @@ -77,9 +76,9 @@ int print_version() boost::wave::cpplexer::lex_token<> > lex_iterator_t; typedef boost::wave::context - context_t; + context_type; - string version (context_t::get_version_string()); + string version (context_type::get_version_string()); cout << version.substr(1, version.size()-2) // strip quotes << " (" << IDL_VERSION_DATE << ")" // add date @@ -91,16 +90,15 @@ int print_version() // print the copyright statement int print_copyright() { -char const *copyright[] = { + char const *copyright[] = { "", "Sample: IDL oriented preprocessor", "Based on: Wave, A Standard conformant C++ preprocessor library", - "Copyright (c) 2001-2004 Hartmut Kaiser", "It is hosted by http://spirit.sourceforge.net/.", "", - "Use, modification and distribution is subject to 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)", + "Copyright (c) 2001-2004 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)", 0 }; @@ -191,9 +189,8 @@ namespace cmd_line_util { } if (options.size() > 0) { - po::options_and_arguments oa = po::parse_command_line(options, desc); - - po::store(oa, vm, desc); + po::store(po::command_line_parser(options).options(desc).run(), vm); + po::notify(vm); } } @@ -214,12 +211,15 @@ namespace cmd_line_util { // switching the semantics of an -I option. // /////////////////////////////////////////////////////////////////////////////// -void -po::validator::operator()( - boost::any &v, std::vector const &s) -{ - cmd_line_util::include_paths::validate(v, s); -} +namespace boost { namespace program_options { + + void validate(boost::any &v, std::vector const &s, + cmd_line_util::include_paths *, int) + { + cmd_line_util::include_paths::validate(v, s); + } + +}} // namespace boost::program_options /////////////////////////////////////////////////////////////////////////////// // do the actual preprocessing @@ -227,7 +227,7 @@ int do_actual_work (std::string file_name, po::variables_map const &vm) { // current file position is saved for exception handling -boost::wave::util::file_position_t current_position; +boost::wave::util::file_position_type current_position; try { // process the given file @@ -256,15 +256,15 @@ boost::wave::util::file_position_t current_position; boost::wave::cpplexer::lex_token<> > lex_iterator_t; typedef boost::wave::context - context_t; + context_type; // The C++ preprocessor iterators shouldn't be constructed directly. They // are to be generated through a boost::wave::context<> object. This // boost::wave::context object is additionally to be used to initialize and // define different parameters of the actual preprocessing. // The preprocessing of the input stream is done on the fly behind the - // scenes during iteration over the context_t::iterator_t stream. - context_t ctx (instring.begin(), instring.end(), file_name.c_str()); + // scenes during iteration over the context_type::iterator_type stream. + context_type ctx (instring.begin(), instring.end(), file_name.c_str()); // add include directories to the system include search paths if (vm.count("sysinclude")) { @@ -360,8 +360,8 @@ boost::wave::util::file_position_t current_position; } // analyze the input file - context_t::iterator_t first = ctx.begin(); - context_t::iterator_t last = ctx.end(); + context_type::iterator_type first = ctx.begin(); + context_type::iterator_type last = ctx.end(); // loop over all generated tokens outputing the generated text while (first != last) { diff --git a/samples/waveidl/idl.hpp b/samples/waveidl/idl.hpp index 3cf7bff..788579d 100644 --- a/samples/waveidl/idl.hpp +++ b/samples/waveidl/idl.hpp @@ -3,12 +3,11 @@ Sample: IDL oriented preprocessor - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(IDL_HPP_FC7EE131_5CE9_43F2_A713_8D9BBC3C8477_INCLUDED) diff --git a/samples/waveidl/idl_config.hpp b/samples/waveidl/idl_config.hpp index c33f238..569ccba 100644 --- a/samples/waveidl/idl_config.hpp +++ b/samples/waveidl/idl_config.hpp @@ -4,25 +4,16 @@ Sample: IDL oriented preprocessor Global application configuration of the Wave driver command - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(IDL_CONFIG_HPP_012D7524_FF3F_482F_9123_91966C72F4EA_INCLUDED) #define IDL_CONFIG_HPP_012D7524_FF3F_482F_9123_91966C72F4EA_INCLUDED -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement macro scopes (#scope/#endscope), variadics, -// placemarkers and well defined token pasting in C++ mode -// -// To implement these features, uncomment the following -// -#define BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS 0 - /////////////////////////////////////////////////////////////////////////////// // Define the maximal include nesting depth allowed. If this value isn't // defined it defaults to 1024 diff --git a/samples/waveidl/idl_version.hpp b/samples/waveidl/idl_version.hpp index 53d1307..41eef6b 100644 --- a/samples/waveidl/idl_version.hpp +++ b/samples/waveidl/idl_version.hpp @@ -3,12 +3,11 @@ Sample: IDL oriented preprocessor - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(IDL_VERSION_HPP_780C1190_3107_440B_B303_B687A449749B_INCLUDED) @@ -19,6 +18,6 @@ #define IDL_VERSION_MAJOR BOOST_WAVE_VERSION_MAJOR #define IDL_VERSION_MINOR BOOST_WAVE_VERSION_MINOR #define IDL_VERSION_SUBMINOR BOOST_WAVE_VERSION_SUBMINOR -#define IDL_VERSION_DATE 20040124L +#define IDL_VERSION_DATE 20040520L #endif // !defined(IDL_VERSION_HPP_780C1190_3107_440B_B303_B687A449749B_INCLUDED) diff --git a/samples/waveidl/idllexer/idl.re b/samples/waveidl/idllexer/idl.re index 8a6a869..abebb06 100644 --- a/samples/waveidl/idllexer/idl.re +++ b/samples/waveidl/idllexer/idl.re @@ -3,12 +3,11 @@ Sample: IDL lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include diff --git a/samples/waveidl/idllexer/idl.re.cpp b/samples/waveidl/idllexer/idl.re.cpp index 7e3939e..134d3d3 100644 --- a/samples/waveidl/idllexer/idl.re.cpp +++ b/samples/waveidl/idllexer/idl.re.cpp @@ -1,16 +1,15 @@ -/* Generated by re2c 0.5 on Wed Apr 21 09:07:49 2004 */ -#line 1 "c:\\Cvs\\spirit\\wave\\boost\\libs\\wave\\samples\\waveidl\\idllexer\\idl.re" +/* Generated by re2c 0.5 on Wed Jul 28 20:33:41 2004 */ +#line 1 "c:\\Cvs\\wave\\libs\\wave\\samples\\waveidl\\idllexer\\idl.re" /*============================================================================= Wave: A Standard compliant C++ preprocessor library Sample: IDL lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -367,7 +366,7 @@ scan(boost::wave::cpplexer::re2clex::Scanner *s) uchar *cursor = s->tok = s->cur; -#line 385 +#line 384 { @@ -518,14 +517,14 @@ yy3: yych = *++YYCURSOR; if(yych == '/') goto yy354; goto yy4; yy4: -#line 409 +#line 408 { RET(T_DIVIDE); } yy5: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych == 'R') goto yy350; goto yy202; yy6: -#line 432 +#line 431 { RET(T_IDENTIFIER); } yy7: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -534,22 +533,22 @@ yy7: yyaccept = 0; yy8: yych = *++YYCURSOR; goto yy9; yy9: -#line 394 +#line 393 { RET(T_LEFTBRACE); } yy10: yych = *++YYCURSOR; goto yy11; yy11: -#line 395 +#line 394 { RET(T_RIGHTBRACE); } yy12: yych = *++YYCURSOR; goto yy13; yy13: -#line 396 +#line 395 { RET(T_LEFTBRACKET); } yy14: yych = *++YYCURSOR; goto yy15; yy15: -#line 397 +#line 396 { RET(T_RIGHTBRACKET); } yy16: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); @@ -593,99 +592,99 @@ yy16: yyaccept = 1; } } yy17: -#line 398 +#line 397 { RET(T_POUND); } yy18: yych = *++YYCURSOR; goto yy19; yy19: -#line 400 +#line 399 { RET(T_LEFTPAREN); } yy20: yych = *++YYCURSOR; goto yy21; yy21: -#line 401 +#line 400 { RET(T_RIGHTPAREN); } yy22: yych = *++YYCURSOR; goto yy23; yy23: -#line 402 +#line 401 { RET(T_SEMICOLON); } yy24: yych = *++YYCURSOR; goto yy25; yy25: -#line 403 +#line 402 { RET(T_COLON); } yy26: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); if(yych == '?') goto yy341; goto yy27; yy27: -#line 404 +#line 403 { RET(T_QUESTION_MARK); } yy28: yych = *++YYCURSOR; if(yych <= '/') goto yy29; if(yych <= '9') goto yy168; goto yy29; yy29: -#line 405 +#line 404 { RET(T_DOT); } yy30: yych = *++YYCURSOR; if(yych == '+') goto yy339; goto yy31; yy31: -#line 406 +#line 405 { RET(T_PLUS); } yy32: yych = *++YYCURSOR; if(yych == '-') goto yy337; goto yy33; yy33: -#line 407 +#line 406 { RET(T_MINUS); } yy34: yych = *++YYCURSOR; goto yy35; yy35: -#line 408 +#line 407 { RET(T_STAR); } yy36: yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); if(yych == ':') goto yy238; goto yy37; yy37: -#line 410 +#line 409 { RET(T_PERCENT); } yy38: yych = *++YYCURSOR; goto yy39; yy39: -#line 411 +#line 410 { RET(T_XOR); } yy40: yych = *++YYCURSOR; if(yych == '&') goto yy236; goto yy41; yy41: -#line 412 +#line 411 { RET(T_AND); } yy42: yych = *++YYCURSOR; if(yych == '|') goto yy234; goto yy43; yy43: -#line 413 +#line 412 { RET(T_OR); } yy44: yych = *++YYCURSOR; goto yy45; yy45: -#line 414 +#line 413 { RET(T_COMPL); } yy46: yych = *++YYCURSOR; if(yych == '=') goto yy232; goto yy47; yy47: -#line 415 +#line 414 { RET(T_NOT); } yy48: yych = *++YYCURSOR; if(yych == '=') goto yy230; goto yy49; yy49: -#line 416 +#line 415 { RET(T_ASSIGN); } yy50: yych = *++YYCURSOR; if(yych <= ';') goto yy51; @@ -693,7 +692,7 @@ yy50: yych = *++YYCURSOR; if(yych <= '=') goto yy226; goto yy51; yy51: -#line 417 +#line 416 { RET(T_LESS); } yy52: yych = *++YYCURSOR; if(yych <= '<') goto yy53; @@ -701,12 +700,12 @@ yy52: yych = *++YYCURSOR; if(yych <= '>') goto yy224; goto yy53; yy53: -#line 418 +#line 417 { RET(T_GREATER); } yy54: yych = *++YYCURSOR; goto yy55; yy55: -#line 429 +#line 428 { RET(T_COMMA); } yy56: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -747,7 +746,7 @@ yy58: yyaccept = 4; if(yych == 'u') goto yy192; goto yy59; yy59: -#line 495 +#line 494 { /* if (0 != s->error_proc) (*s->error_proc)(s, "Unexpected character: '%c'", *s->tok); @@ -801,7 +800,7 @@ yy60: yyaccept = 5; } } yy61: -#line 435 +#line 434 { RET(T_INTLIT); } yy62: yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); @@ -864,12 +863,12 @@ yy64: yyaccept = 4; yy65: yych = *++YYCURSOR; goto yy75; yy66: -#line 474 +#line 473 { RET(T_SPACE); } yy67: yych = *++YYCURSOR; goto yy68; yy68: -#line 477 +#line 476 { s->line++; RET(T_NEWLINE); @@ -880,7 +879,7 @@ yy69: yych = *++YYCURSOR; yy70: yych = *++YYCURSOR; goto yy71; yy71: -#line 483 +#line 482 { if(cursor != s->eof) { @@ -1001,7 +1000,7 @@ yy79: ++YYCURSOR; yy80: yych = *++YYCURSOR; goto yy81; yy81: -#line 447 +#line 446 { RET(T_STRINGLIT); } yy82: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -2018,7 +2017,7 @@ yy129: ++YYCURSOR; yy130: yych = *++YYCURSOR; goto yy131; yy131: -#line 444 +#line 443 { RET(T_CHARLIT); } yy132: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -2730,7 +2729,7 @@ yy163: ++YYCURSOR; yy164: yych = *++YYCURSOR; goto yy165; yy165: -#line 441 +#line 440 { RET(T_FIXEDPOINTLIT); } yy166: yyaccept = 5; YYMARKER = ++YYCURSOR; @@ -2801,7 +2800,7 @@ yy169: if(yych <= 'K'){ } } yy170: -#line 438 +#line 437 { RET(T_FLOATLIT); } yy171: yych = *++YYCURSOR; if(yych <= ','){ @@ -3336,42 +3335,42 @@ yy221: yych = *++YYCURSOR; yy222: yych = *++YYCURSOR; goto yy223; yy223: -#line 424 +#line 423 { RET(T_GREATEREQUAL); } yy224: yych = *++YYCURSOR; goto yy225; yy225: -#line 420 +#line 419 { RET(T_SHIFTRIGHT); } yy226: yych = *++YYCURSOR; goto yy227; yy227: -#line 423 +#line 422 { RET(T_LESSEQUAL); } yy228: yych = *++YYCURSOR; goto yy229; yy229: -#line 419 +#line 418 { RET(T_SHIFTLEFT); } yy230: yych = *++YYCURSOR; goto yy231; yy231: -#line 421 +#line 420 { RET(T_EQUAL); } yy232: yych = *++YYCURSOR; goto yy233; yy233: -#line 422 +#line 421 { RET(T_NOTEQUAL); } yy234: yych = *++YYCURSOR; goto yy235; yy235: -#line 426 +#line 425 { RET(T_OROR); } yy236: yych = *++YYCURSOR; goto yy237; yy237: -#line 425 +#line 424 { RET(T_ANDAND); } yy238: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -3467,7 +3466,7 @@ yy252: yych = *++YYCURSOR; yy253: yych = *++YYCURSOR; goto yy254; yy254: -#line 471 +#line 470 { RET(T_PP_WARNING); } yy255: yych = *++YYCURSOR; if(yych != 'a') goto yy2; @@ -3484,7 +3483,7 @@ yy258: yych = *++YYCURSOR; yy259: yych = *++YYCURSOR; goto yy260; yy260: -#line 469 +#line 468 { RET(T_PP_PRAGMA); } yy261: yych = *++YYCURSOR; if(yych != 'n') goto yy2; @@ -3495,7 +3494,7 @@ yy262: yych = *++YYCURSOR; yy263: yych = *++YYCURSOR; goto yy264; yy264: -#line 467 +#line 466 { RET(T_PP_LINE); } yy265: yych = *++YYCURSOR; if(yych != 'd') goto yy2; @@ -3509,7 +3508,7 @@ yy267: yych = *++YYCURSOR; yy268: yych = *++YYCURSOR; goto yy269; yy269: -#line 466 +#line 465 { RET(T_PP_UNDEF); } yy270: yych = *++YYCURSOR; if(yych != 'f') goto yy2; @@ -3526,7 +3525,7 @@ yy273: yych = *++YYCURSOR; yy274: yych = *++YYCURSOR; goto yy275; yy275: -#line 465 +#line 464 { RET(T_PP_DEFINE); } yy276: yych = *++YYCURSOR; if(yych == 'r') goto yy289; @@ -3547,12 +3546,12 @@ yy280: yych = *++YYCURSOR; yy281: yych = *++YYCURSOR; goto yy282; yy282: -#line 463 +#line 462 { RET(T_PP_ELIF); } yy283: yych = *++YYCURSOR; goto yy284; yy284: -#line 462 +#line 461 { RET(T_PP_ELSE); } yy285: yych = *++YYCURSOR; if(yych != 'i') goto yy2; @@ -3563,7 +3562,7 @@ yy286: yych = *++YYCURSOR; yy287: yych = *++YYCURSOR; goto yy288; yy288: -#line 464 +#line 463 { RET(T_PP_ENDIF); } yy289: yych = *++YYCURSOR; if(yych != 'o') goto yy2; @@ -3574,7 +3573,7 @@ yy290: yych = *++YYCURSOR; yy291: yych = *++YYCURSOR; goto yy292; yy292: -#line 468 +#line 467 { RET(T_PP_ERROR); } yy293: yyaccept = 9; yych = *(YYMARKER = ++YYCURSOR); @@ -3582,7 +3581,7 @@ yy293: yyaccept = 9; if(yych == 'n') goto yy322; goto yy294; yy294: -#line 459 +#line 458 { RET(T_PP_IF); } yy295: yych = *++YYCURSOR; if(yych != 'c') goto yy2; @@ -3623,7 +3622,7 @@ yy301: if(yych <= '!'){ } } yy302: -#line 457 +#line 456 { RET(T_PP_INCLUDE); } yy303: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -3652,7 +3651,7 @@ yy307: if(yych <= '\f'){ yy308: yych = *++YYCURSOR; goto yy309; yy309: -#line 451 +#line 450 { RET(T_PP_HHEADER); } yy310: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -3670,7 +3669,7 @@ yy311: if(yych <= '\f'){ yy312: yych = *++YYCURSOR; goto yy313; yy313: -#line 454 +#line 453 { RET(T_PP_QHEADER); } yy314: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -3743,7 +3742,7 @@ yy324: yych = *++YYCURSOR; yy325: yych = *++YYCURSOR; goto yy326; yy326: -#line 461 +#line 460 { RET(T_PP_IFNDEF); } yy327: yych = *++YYCURSOR; if(yych != 'f') goto yy2; @@ -3751,7 +3750,7 @@ yy327: yych = *++YYCURSOR; yy328: yych = *++YYCURSOR; goto yy329; yy329: -#line 460 +#line 459 { RET(T_PP_IFDEF); } yy330: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -3812,12 +3811,12 @@ yy336: ++YYCURSOR; yy337: yych = *++YYCURSOR; goto yy338; yy338: -#line 428 +#line 427 { RET(T_MINUSMINUS); } yy339: yych = *++YYCURSOR; goto yy340; yy340: -#line 427 +#line 426 { RET(T_PLUSPLUS); } yy341: yych = *++YYCURSOR; if(yych == '/') goto yy342; @@ -3830,7 +3829,7 @@ yy342: yych = *++YYCURSOR; yy343: yych = *++YYCURSOR; goto yy344; yy344: -#line 399 +#line 398 { RET(T_POUND_POUND); } yy345: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -3867,7 +3866,7 @@ yy348: yyaccept = 11; } } yy349: -#line 392 +#line 391 { RET(T_FALSE); } yy350: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -3900,20 +3899,20 @@ yy352: yyaccept = 12; } } yy353: -#line 391 +#line 390 { RET(T_TRUE); } yy354: yych = *++YYCURSOR; goto yy355; yy355: -#line 389 +#line 388 { goto cppcomment; } yy356: yych = *++YYCURSOR; goto yy357; yy357: -#line 388 +#line 387 { goto ccomment; } } -#line 503 +#line 502 ccomment: @@ -3946,12 +3945,12 @@ yy360:yy361: yych = *++YYCURSOR; if(yych == '/') goto yy370; goto yy362; yy362: -#line 516 +#line 515 { goto ccomment; } yy363: yych = *++YYCURSOR; goto yy364; yy364: -#line 509 +#line 508 { /*if(cursor == s->eof) RET(T_EOF);*/ /*s->tok = cursor; */ @@ -3966,7 +3965,7 @@ yy366: yych = *++YYCURSOR; yy367: yych = *++YYCURSOR; goto yy368; yy368: -#line 519 +#line 518 { yyaccept = 0; /* avoid warning about unreferenced variable */ if(cursor == s->eof) @@ -3990,10 +3989,10 @@ yy369: yych = *++YYCURSOR; yy370: yych = *++YYCURSOR; goto yy371; yy371: -#line 507 +#line 506 { RET(T_CCOMMENT); } } -#line 538 +#line 537 cppcomment: @@ -4019,7 +4018,7 @@ yy372: yy374:yy375: yych = *++YYCURSOR; goto yy376; yy376: -#line 543 +#line 542 { /*if(cursor == s->eof) RET(T_EOF); */ /*s->tok = cursor; */ @@ -4032,12 +4031,12 @@ yy377: yych = *++YYCURSOR; yy378: yych = *++YYCURSOR; goto yy379; yy379: -#line 550 +#line 549 { goto cppcomment; } yy380: yych = *++YYCURSOR; goto yy381; yy381: -#line 553 +#line 552 { yyaccept = 0; /* avoid warning about unreferenced variable */ if(cursor != s->eof) @@ -4055,7 +4054,7 @@ yy381: yy382: yych = *++YYCURSOR; goto yy376; } -#line 567 +#line 566 } /* end of scan */ diff --git a/samples/waveidl/idllexer/idl.re.hpp b/samples/waveidl/idllexer/idl.re.hpp index 4192dc6..d436b44 100644 --- a/samples/waveidl/idllexer/idl.re.hpp +++ b/samples/waveidl/idllexer/idl.re.hpp @@ -3,12 +3,11 @@ Sample: Re2C based IDL lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(IDL_RE_HPP_BD62775D_1659_4684_872C_03C02543C9A5_INCLUDED) diff --git a/samples/waveidl/idllexer/idl_lex_interface.hpp b/samples/waveidl/idllexer/idl_lex_interface.hpp index 7caa1e0..9b10bdb 100644 --- a/samples/waveidl/idllexer/idl_lex_interface.hpp +++ b/samples/waveidl/idllexer/idl_lex_interface.hpp @@ -3,12 +3,11 @@ Definition of the abstract lexer interface - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_LEX_INTERFACE_HPP_E83F52A4_90AC_4FBE_A9A7_B65F7F94C497_INCLUDED) @@ -31,7 +30,7 @@ template struct lex_input_interface; template < typename IteratorT, - typename PositionT = boost::wave::util::file_position_t + typename PositionT = boost::wave::util::file_position_type > struct new_lexer_gen { @@ -56,10 +55,10 @@ struct new_lexer_gen template struct lex_input_interface { - typedef typename TokenT::position_t position_t; + typedef typename TokenT::position_type position_type; virtual TokenT get() = 0; - virtual void set_position(position_t const &pos) = 0; + virtual void set_position(position_type const &pos) = 0; virtual ~lex_input_interface() {} @@ -69,9 +68,9 @@ struct lex_input_interface template static lex_input_interface * new_lexer(IteratorT const &first, IteratorT const &last, - position_t const &pos, boost::wave::language_support language) + position_type const &pos, boost::wave::language_support language) { - return new_lexer_gen::new_lexer (first, last, + return new_lexer_gen::new_lexer (first, last, pos, language); } }; diff --git a/samples/waveidl/idllexer/idl_lex_iterator.hpp b/samples/waveidl/idllexer/idl_lex_iterator.hpp index 78478d8..5734aa6 100644 --- a/samples/waveidl/idllexer/idl_lex_iterator.hpp +++ b/samples/waveidl/idllexer/idl_lex_iterator.hpp @@ -4,12 +4,11 @@ Sample: Re2C based IDL lexer Definition of the lexer iterator - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(IDL_LEX_ITERATOR_HPP_7926F865_E02F_4950_9EB5_5F453C9FF953_INCLUDED) @@ -48,7 +47,7 @@ class lex_iterator_functor_shim public: template lex_iterator_functor_shim(IteratorT const &first, IteratorT const &last, - typename TokenT::position_t const &pos, + typename TokenT::position_type const &pos, boost::wave::language_support language) : functor_ptr(lex_input_interface_t::new_lexer(first, last, pos, language)) {} @@ -63,7 +62,7 @@ public: BOOST_ASSERT(0 != functor_ptr.get()); return functor_ptr->get(); } - void set_position(typename TokenT::position_t const &pos) + void set_position(typename TokenT::position_type const &pos) { BOOST_ASSERT(0 != functor_ptr.get()); functor_ptr->set_position(pos); @@ -92,7 +91,7 @@ typename lex_iterator_functor_shim::result_type const // // - the lexer type should have a function implemented, which returnes // the next lexed token from the input stream: -// typename LexT::token_t get(); +// typename LexT::token_type get(); // - at the end of the input stream this function should return the // eof token equivalent // - the lexer should implement a constructor taking two iterators @@ -108,24 +107,24 @@ class lex_iterator boost::wave::util::functor_input > { - typedef impl::lex_iterator_functor_shim input_policy_t; + typedef impl::lex_iterator_functor_shim input_policy_type; typedef - boost::spirit::multi_pass base_t; - typedef lex_iterator self_t; + typedef lex_iterator self_type; public: - typedef TokenT token_t; + typedef TokenT token_type; lex_iterator() {} template lex_iterator(IteratorT const &first, IteratorT const &last, - typename TokenT::position_t const &pos, + typename TokenT::position_type const &pos, boost::wave::language_support language) - : base_t(input_policy_t(first, last, pos, language)) + : base_t(input_policy_type(first, last, pos, language)) {} }; diff --git a/samples/waveidl/idllexer/idl_re2c_lexer.hpp b/samples/waveidl/idllexer/idl_re2c_lexer.hpp index beafe23..338d452 100644 --- a/samples/waveidl/idllexer/idl_re2c_lexer.hpp +++ b/samples/waveidl/idllexer/idl_re2c_lexer.hpp @@ -3,12 +3,11 @@ Re2C based IDL lexer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(IDL_RE2C_LEXER_HPP_B81A2629_D5B1_4944_A97D_60254182B9A8_INCLUDED) @@ -52,7 +51,7 @@ namespace re2clex { template < typename IteratorT, - typename PositionT = boost::wave::util::file_position_t + typename PositionT = boost::wave::util::file_position_type > class lexer { @@ -62,8 +61,8 @@ public: typedef char char_t; typedef boost::wave::cpplexer::re2clex::Scanner base_t; - typedef boost::wave::cpplexer::lex_token token_t; - typedef typename token_t::string_t string_t; + typedef boost::wave::cpplexer::lex_token token_type; + typedef typename token_type::string_type string_type; lexer(IteratorT const &first, IteratorT const &last, PositionT const &pos, boost::wave::language_support language); @@ -84,7 +83,7 @@ private: static char const *tok_names[]; scanner_t scanner; - string_t filename; + string_type filename; bool at_eof; }; @@ -136,7 +135,7 @@ lexer::get() return boost::wave::cpplexer::lex_token(); // return T_EOI token_id id = token_id(scan(&scanner)); - string_t value((char const *)scanner.tok, scanner.cur-scanner.tok); + string_type value((char const *)scanner.tok, scanner.cur-scanner.tok); if (T_IDENTIFIER == id) { // test identifier characters for validity (throws if invalid chars found) @@ -184,14 +183,14 @@ lexer::report_error(scanner_t *s, char *msg, ...) template < typename IteratorT, - typename PositionT = boost::wave::util::file_position_t + typename PositionT = boost::wave::util::file_position_type > class lex_functor -: public lex_input_interface::token_t> +: public lex_input_interface::token_type> { public: - typedef typename lexer::token_t token_t; + typedef typename lexer::token_type token_type; lex_functor(IteratorT const &first, IteratorT const &last, PositionT const &pos, boost::wave::language_support language) @@ -200,7 +199,7 @@ public: virtual ~lex_functor() {} // get the next token from the input stream - token_t get() { return lexer.get(); } + token_type get() { return lexer.get(); } void set_position(PositionT const &pos) { lexer.set_position(pos); } diff --git a/samples/waveidl/instantiate_cpp_grammar.cpp b/samples/waveidl/instantiate_cpp_grammar.cpp index ffefef0..ae21898 100644 --- a/samples/waveidl/instantiate_cpp_grammar.cpp +++ b/samples/waveidl/instantiate_cpp_grammar.cpp @@ -4,12 +4,11 @@ Sample: IDL oriented preprocessor Explicit instantiation of the cpp_grammar template - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "idl.hpp" @@ -36,8 +35,8 @@ typedef boost::wave::idllexer::lex_iterator< boost::wave::cpplexer::lex_token<> > - lex_t; -template struct boost::wave::grammars::cpp_grammar_gen; + lexer_type; +template struct boost::wave::grammars::cpp_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/waveidl/instantiate_defined_grammar.cpp b/samples/waveidl/instantiate_defined_grammar.cpp index 976f905..438bd37 100644 --- a/samples/waveidl/instantiate_defined_grammar.cpp +++ b/samples/waveidl/instantiate_defined_grammar.cpp @@ -4,12 +4,11 @@ Sample: IDL oriented preprocessor Explicit instantiation of the defined_grammar template - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "idl.hpp" @@ -36,8 +35,8 @@ typedef boost::wave::idllexer::lex_iterator< boost::wave::cpplexer::lex_token<> > - lex_t; -template struct boost::wave::grammars::defined_grammar_gen; + lexer_type; +template struct boost::wave::grammars::defined_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/waveidl/instantiate_predef_macros.cpp b/samples/waveidl/instantiate_predef_macros.cpp index 30cb1c9..fac743a 100644 --- a/samples/waveidl/instantiate_predef_macros.cpp +++ b/samples/waveidl/instantiate_predef_macros.cpp @@ -4,12 +4,11 @@ Sample: IDL oriented preprocessor Explicit instantiation of the predefined_macros_grammar template - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "idl.hpp" @@ -36,8 +35,8 @@ typedef boost::wave::idllexer::lex_iterator< boost::wave::cpplexer::lex_token<> > - lex_t; -template struct boost::wave::grammars::predefined_macros_grammar_gen; + lexer_type; +template struct boost::wave::grammars::predefined_macros_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/samples/waveidl/instantiate_re2c_lexer.cpp b/samples/waveidl/instantiate_re2c_lexer.cpp index ca55f06..5f3e53f 100644 --- a/samples/waveidl/instantiate_re2c_lexer.cpp +++ b/samples/waveidl/instantiate_re2c_lexer.cpp @@ -4,12 +4,11 @@ Sample: IDL oriented preprocessor Explicit instantiation of the lex_functor generation function - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "idl.hpp" diff --git a/samples/waveidl/instantiate_re2c_lexer_string.cpp b/samples/waveidl/instantiate_re2c_lexer_string.cpp index bc73247..7610ddf 100644 --- a/samples/waveidl/instantiate_re2c_lexer_string.cpp +++ b/samples/waveidl/instantiate_re2c_lexer_string.cpp @@ -4,12 +4,11 @@ Sample: IDL oriented preprocessor Explicit instantiation of the lex_functor generation function - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "idl.hpp" diff --git a/src/cpplexer/re2clex/aq.cpp b/src/cpplexer/re2clex/aq.cpp index 62f9aa1..de19916 100644 --- a/src/cpplexer/re2clex/aq.cpp +++ b/src/cpplexer/re2clex/aq.cpp @@ -1,13 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001 Daniel C. Nuffer - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001 Daniel C. Nuffer. + Copyright (c) 2001-2004 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) =============================================================================*/ #include diff --git a/src/cpplexer/re2clex/cpp.re b/src/cpplexer/re2clex/cpp.re index 8b16167..3274d6a 100644 --- a/src/cpplexer/re2clex/cpp.re +++ b/src/cpplexer/re2clex/cpp.re @@ -2,12 +2,9 @@ Wave: A Standard compliant C++ preprocessor library Copyright (c) 2001 Daniel C. Nuffer - Copyright (c) 2001-2004 Hartmut Kaiser - http://spirit.sourceforge.net/ - - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) TODO: It also may be necessary to add $ to identifiers, for asm. @@ -448,10 +445,6 @@ Pound = "#" | "??=" | "%:"; "_"? "_inline" { RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); } "_"? "_asm" { RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); } - "__comma__" { RET(s->act_in_cpp0x_mode ? T_COMMA_ALT : T_IDENTIFIER); } - "__lparen__" { RET(s->act_in_cpp0x_mode ? T_LEFTPAREN_ALT : T_IDENTIFIER); } - "__rparen__" { RET(s->act_in_cpp0x_mode ? T_RIGHTPAREN_ALT : T_IDENTIFIER); } - "{" { RET(T_LEFTBRACE); } "??<" { RET(T_LEFTBRACE_TRIGRAPH); } "<%" { RET(T_LEFTBRACE_ALT); } @@ -603,10 +596,6 @@ Pound = "#" | "??=" | "%:"; Pound PPSpace "warning" { RET(T_PP_WARNING); } - Pound PPSpace "region" { RET(T_PP_REGION); } - Pound PPSpace "endregion" { RET(T_PP_ENDREGION); } - Pound PPSpace "import" { RET(T_PP_IMPORT); } - [ \t\v\f]+ { RET(T_SPACE); } diff --git a/src/cpplexer/re2clex/cpp.re.cpp b/src/cpplexer/re2clex/cpp.re.cpp index 9285c14..d26a86d 100644 --- a/src/cpplexer/re2clex/cpp.re.cpp +++ b/src/cpplexer/re2clex/cpp.re.cpp @@ -1,15 +1,12 @@ -/* Generated by re2c 0.5 on Wed Apr 21 09:07:27 2004 */ -#line 1 "c:\\Cvs\\spirit\\wave\\boost\\libs\\wave\\src\\cpplexer\\re2clex\\cpp.re" +/* Generated by re2c 0.5 on Tue Aug 10 22:01:15 2004 */ +#line 1 "c:\\Cvs\\wave\\libs\\wave\\src\\cpplexer\\re2clex\\cpp.re" /*============================================================================= Wave: A Standard compliant C++ preprocessor library Copyright (c) 2001 Daniel C. Nuffer - Copyright (c) 2001-2004 Hartmut Kaiser - http://spirit.sourceforge.net/ - - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) TODO: It also may be necessary to add $ to identifiers, for asm. @@ -348,7 +345,7 @@ boost::wave::token_id scan(Scanner *s) { uchar *cursor = s->tok = s->cur; -#line 365 +#line 362 { @@ -480,403 +477,399 @@ yy0: } yy2: YYCURSOR = YYMARKER; switch(yyaccept){ - case 104: goto yy958; - case 103: goto yy956; - case 100: goto yy942; - case 99: goto yy939; - case 98: goto yy932; - case 97: goto yy930; - case 96: goto yy925; - case 95: goto yy922; - case 93: goto yy912; - case 94: goto yy918; - case 92: goto yy910; - case 90: goto yy894; - case 89: goto yy889; - case 86: goto yy866; - case 88: goto yy883; - case 87: goto yy878; - case 85: goto yy863; - case 84: goto yy860; - case 83: goto yy857; - case 82: goto yy852; - case 81: goto yy847; - case 80: goto yy838; - case 79: goto yy834; - case 78: goto yy830; - case 77: goto yy828; - case 76: goto yy819; - case 73: goto yy807; - case 75: goto yy815; - case 74: goto yy811; - case 72: goto yy805; - case 71: goto yy801; - case 70: goto yy794; - case 69: goto yy786; - case 66: goto yy775; - case 63: goto yy761; - case 62: goto yy756; - case 61: goto yy747; - case 60: goto yy740; - case 59: goto yy734; - case 58: goto yy720; - case 57: goto yy712; - case 56: goto yy708; - case 55: goto yy704; - case 53: goto yy692; - case 54: goto yy698; - case 52: goto yy688; - case 51: goto yy682; - case 50: goto yy673; - case 49: goto yy666; - case 48: goto yy664; - case 47: goto yy659; - case 46: goto yy657; - case 45: goto yy654; - case 44: goto yy651; - case 43: goto yy649; - case 42: goto yy636; - case 41: goto yy633; - case 40: goto yy625; - case 39: goto yy619; - case 38: goto yy613; - case 37: goto yy611; - case 36: goto yy601; - case 35: goto yy595; - case 31: goto yy583; - case 34: goto yy589; - case 33: goto yy587; - case 32: goto yy585; - case 22: goto yy522; - case 20: goto yy512; - case 21: goto yy517; - case 19: goto yy504; - case 17: goto yy490; - case 28: goto yy562; - case 27: goto yy559; - case 29: goto yy569; - case 26: goto yy553; - case 18: goto yy496; - case 23: goto yy525; - case 30: goto yy576; - case 25: goto yy549; - case 24: goto yy540; + case 101: goto yy913; + case 100: goto yy911; + case 97: goto yy897; + case 96: goto yy894; + case 95: goto yy887; + case 94: goto yy885; + case 93: goto yy880; + case 92: goto yy877; + case 90: goto yy867; + case 91: goto yy873; + case 89: goto yy865; + case 87: goto yy849; + case 86: goto yy844; + case 83: goto yy821; + case 85: goto yy838; + case 84: goto yy833; + case 82: goto yy818; + case 81: goto yy815; + case 80: goto yy812; + case 79: goto yy807; + case 78: goto yy802; + case 77: goto yy793; + case 76: goto yy789; + case 75: goto yy785; + case 74: goto yy783; + case 73: goto yy774; + case 70: goto yy762; + case 72: goto yy770; + case 71: goto yy766; + case 69: goto yy760; + case 68: goto yy756; + case 67: goto yy749; + case 66: goto yy741; + case 63: goto yy730; + case 60: goto yy716; + case 59: goto yy711; + case 58: goto yy702; + case 57: goto yy695; + case 56: goto yy689; + case 55: goto yy675; + case 54: goto yy667; + case 53: goto yy663; + case 52: goto yy659; + case 50: goto yy647; + case 51: goto yy653; + case 49: goto yy643; + case 48: goto yy637; + case 47: goto yy628; + case 46: goto yy621; + case 45: goto yy619; + case 44: goto yy614; + case 43: goto yy612; + case 42: goto yy609; + case 41: goto yy606; + case 40: goto yy604; + case 39: goto yy591; + case 38: goto yy588; + case 37: goto yy580; + case 36: goto yy574; + case 35: goto yy568; + case 34: goto yy566; + case 33: goto yy556; + case 32: goto yy550; + case 28: goto yy538; + case 31: goto yy544; + case 30: goto yy542; + case 29: goto yy540; + case 22: goto yy502; + case 20: goto yy492; + case 21: goto yy497; + case 19: goto yy484; + case 17: goto yy470; + case 26: goto yy524; + case 25: goto yy521; + case 27: goto yy531; + case 24: goto yy515; + case 18: goto yy476; + case 23: goto yy505; case 2: goto yy43; - case 14: goto yy424; - case 15: goto yy452; + case 14: goto yy404; + case 15: goto yy432; case 1: goto yy29; case 3: goto yy51; case 10: goto yy263; - case 102: goto yy950; + case 99: goto yy905; case 4: goto yy64; - case 101: goto yy947; - case 16: goto yy456; - case 91: goto yy903; - case 67: goto yy780; + case 98: goto yy902; + case 16: goto yy436; + case 88: goto yy858; + case 64: goto yy735; case 11: goto yy267; - case 106: goto yy964; - case 65: goto yy768; - case 68: goto yy784; - case 105: goto yy960; - case 64: goto yy764; + case 103: goto yy919; + case 62: goto yy723; + case 65: goto yy739; + case 102: goto yy915; + case 61: goto yy719; case 0: goto yy6; case 6: goto yy80; case 9: goto yy188; case 8: goto yy150; case 7: goto yy100; - case 13: goto yy387; - case 12: goto yy366; + case 13: goto yy322; + case 12: goto yy307; case 5: goto yy78; } yy3: yych = *++YYCURSOR; if(yych <= '.'){ - if(yych == '*') goto yy969; + if(yych == '*') goto yy924; goto yy4; } else { - if(yych <= '/') goto yy967; - if(yych == '=') goto yy965; + if(yych <= '/') goto yy922; + if(yych == '=') goto yy920; goto yy4; } yy4: -#line 505 +#line 498 { RET(T_DIVIDE); } yy5: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'r'){ - if(yych == 'n') goto yy951; + if(yych == 'n') goto yy906; goto yy219; } else { - if(yych <= 's') goto yy952; - if(yych == 'u') goto yy953; + if(yych <= 's') goto yy907; + if(yych == 'u') goto yy908; goto yy219; } yy6: -#line 568 +#line 561 { RET(T_IDENTIFIER); } yy7: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'n'){ - if(yych == 'i') goto yy933; + if(yych == 'i') goto yy888; goto yy219; } else { - if(yych <= 'o') goto yy934; - if(yych == 'r') goto yy935; + if(yych <= 'o') goto yy889; + if(yych == 'r') goto yy890; goto yy219; } yy8: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch(yych){ - case 'a': goto yy895; - case 'h': goto yy896; - case 'l': goto yy897; - case 'o': goto yy898; + case 'a': goto yy850; + case 'h': goto yy851; + case 'l': goto yy852; + case 'o': goto yy853; default: goto yy219; } yy9: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'n'){ - if(yych == 'e') goto yy864; + if(yych == 'e') goto yy819; goto yy219; } else { - if(yych <= 'o') goto yy865; - if(yych == 'y') goto yy867; + if(yych <= 'o') goto yy820; + if(yych == 'y') goto yy822; goto yy219; } yy10: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'm'){ - if(yych == 'l') goto yy839; + if(yych == 'l') goto yy794; goto yy219; } else { - if(yych <= 'n') goto yy840; - if(yych == 'x') goto yy841; + if(yych <= 'n') goto yy795; + if(yych == 'x') goto yy796; goto yy219; } yy11: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch(yych){ - case 'a': goto yy820; - case 'l': goto yy821; - case 'o': goto yy822; - case 'r': goto yy823; + case 'a': goto yy775; + case 'l': goto yy776; + case 'o': goto yy777; + case 'r': goto yy778; default: goto yy219; } yy12: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'o') goto yy816; + if(yych == 'o') goto yy771; goto yy219; yy13: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'f') goto yy806; - if(yych == 'n') goto yy808; + if(yych == 'f') goto yy761; + if(yych == 'n') goto yy763; goto yy219; yy14: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'o') goto yy802; + if(yych == 'o') goto yy757; goto yy219; yy15: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'u') goto yy795; + if(yych == 'u') goto yy750; goto yy219; yy16: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'd'){ - if(yych == 'a') goto yy776; + if(yych == 'a') goto yy731; goto yy219; } else { - if(yych <= 'e') goto yy777; - if(yych == 'o') goto yy778; + if(yych <= 'e') goto yy732; + if(yych == 'o') goto yy733; goto yy219; } yy17: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'p') goto yy762; - if(yych == 'r') goto yy763; + if(yych == 'p') goto yy717; + if(yych == 'r') goto yy718; goto yy219; yy18: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'r') goto yy741; - if(yych == 'u') goto yy742; + if(yych == 'r') goto yy696; + if(yych == 'u') goto yy697; goto yy219; yy19: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy713; + if(yych == 'e') goto yy668; goto yy219; yy20: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 's'){ if(yych <= 'g') goto yy219; - if(yych <= 'h') goto yy674; - if(yych <= 'i') goto yy675; + if(yych <= 'h') goto yy629; + if(yych <= 'i') goto yy630; goto yy219; } else { - if(yych <= 't') goto yy676; - if(yych == 'w') goto yy677; + if(yych <= 't') goto yy631; + if(yych == 'w') goto yy632; goto yy219; } yy21: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'h'){ - if(yych == 'e') goto yy637; + if(yych == 'e') goto yy592; if(yych <= 'g') goto yy219; - goto yy638; + goto yy593; } else { if(yych <= 'r'){ if(yych <= 'q') goto yy219; - goto yy639; + goto yy594; } else { - if(yych == 'y') goto yy640; + if(yych == 'y') goto yy595; goto yy219; } } yy22: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'n') goto yy620; - if(yych == 's') goto yy621; + if(yych == 'n') goto yy575; + if(yych == 's') goto yy576; goto yy219; yy23: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy602; - if(yych == 'o') goto yy603; + if(yych == 'i') goto yy557; + if(yych == 'o') goto yy558; goto yy219; yy24: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'c') goto yy590; - if(yych == 'h') goto yy591; + if(yych == 'c') goto yy545; + if(yych == 'h') goto yy546; goto yy219; yy25: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch(yych){ - case '_': goto yy476; - case 'a': goto yy477; - case 'b': goto yy478; - case 'c': goto yy479; - case 'd': goto yy480; - case 'f': goto yy481; - case 'i': goto yy482; - case 's': goto yy483; + case '_': goto yy456; + case 'a': goto yy457; + case 'b': goto yy458; + case 'c': goto yy459; + case 'd': goto yy460; + case 'f': goto yy461; + case 'i': goto yy462; + case 's': goto yy463; default: goto yy219; } yy26: yych = *++YYCURSOR; goto yy27; yy27: -#line 455 +#line 448 { RET(T_LEFTBRACE); } yy28: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '?') goto yy442; + if(yych == '?') goto yy422; goto yy29; yy29: -#line 480 +#line 473 { RET(T_QUESTION_MARK); } yy30: yych = *++YYCURSOR; if(yych <= ':'){ - if(yych == '%') goto yy438; - if(yych >= ':') goto yy436; + if(yych == '%') goto yy418; + if(yych >= ':') goto yy416; goto yy31; } else { if(yych <= ';') goto yy31; - if(yych <= '<') goto yy434; - if(yych <= '=') goto yy432; + if(yych <= '<') goto yy414; + if(yych <= '=') goto yy412; goto yy31; } yy31: -#line 521 +#line 514 { RET(T_LESS); } yy32: yych = *++YYCURSOR; goto yy33; yy33: -#line 458 +#line 451 { RET(T_RIGHTBRACE); } yy34: yych = *++YYCURSOR; if(yych <= '<'){ - if(yych == ':') goto yy423; + if(yych == ':') goto yy403; goto yy35; } else { - if(yych <= '=') goto yy425; - if(yych <= '>') goto yy427; + if(yych <= '=') goto yy405; + if(yych <= '>') goto yy407; goto yy35; } yy35: -#line 506 +#line 499 { RET(T_PERCENT); } yy36: yych = *++YYCURSOR; goto yy37; yy37: -#line 461 +#line 454 { RET(T_LEFTBRACKET); } yy38: yych = *++YYCURSOR; goto yy39; yy39: -#line 464 +#line 457 { RET(T_RIGHTBRACKET); } yy40: yych = *++YYCURSOR; - if(yych == ':') goto yy419; - if(yych == '>') goto yy421; + if(yych == ':') goto yy399; + if(yych == '>') goto yy401; goto yy41; yy41: -#line 478 +#line 471 { RET(T_COLON); } yy42: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'e'){ - if(yych <= '#'){ - if(yych <= '\037'){ - if(yych == '\t') goto yy290; + if(yych <= 'c'){ + if(yych <= '"'){ + if(yych <= '\t'){ + if(yych >= '\t') goto yy290; goto yy43; } else { - if(yych <= ' ') goto yy290; - if(yych >= '#') goto yy301; + if(yych == ' ') goto yy290; goto yy43; } } else { - if(yych <= '>'){ - if(yych == '/') goto yy290; + if(yych <= '/'){ + if(yych <= '#') goto yy300; + if(yych >= '/') goto yy290; goto yy43; } else { - if(yych <= '?') goto yy300; - if(yych >= 'd') goto yy290; + if(yych == '?') goto yy299; goto yy43; } } } else { - if(yych <= 'p'){ - if(yych <= 'k'){ - if(yych == 'i') goto yy290; + if(yych <= 'o'){ + if(yych <= 'i'){ + if(yych <= 'e') goto yy290; + if(yych >= 'i') goto yy290; goto yy43; } else { - if(yych <= 'l') goto yy290; - if(yych >= 'p') goto yy290; + if(yych == 'l') goto yy290; goto yy43; } } else { - if(yych <= 't'){ - if(yych == 'r') goto yy290; + if(yych <= 'u'){ + if(yych <= 'p') goto yy290; + if(yych >= 'u') goto yy290; goto yy43; } else { - if(yych == 'v') goto yy43; - if(yych <= 'w') goto yy290; + if(yych == 'w') goto yy290; goto yy43; } } } yy43: -#line 467 +#line 460 { RET(T_POUND); } yy44: yych = *++YYCURSOR; goto yy45; yy45: -#line 475 +#line 468 { RET(T_LEFTPAREN); } yy46: yych = *++YYCURSOR; goto yy47; yy47: -#line 476 +#line 469 { RET(T_RIGHTPAREN); } yy48: yych = *++YYCURSOR; goto yy49; yy49: -#line 477 +#line 470 { RET(T_SEMICOLON); } yy50: yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); @@ -890,14 +883,14 @@ yy50: yyaccept = 3; goto yy51; } yy51: -#line 491 +#line 484 { RET(T_DOT); } yy52: yych = *++YYCURSOR; if(yych == '+') goto yy280; if(yych == '=') goto yy282; goto yy53; yy53: -#line 502 +#line 495 { RET(T_PLUS); } yy54: yych = *++YYCURSOR; if(yych <= '<'){ @@ -909,19 +902,19 @@ yy54: yych = *++YYCURSOR; goto yy55; } yy55: -#line 503 +#line 496 { RET(T_MINUS); } yy56: yych = *++YYCURSOR; if(yych == '=') goto yy270; goto yy57; yy57: -#line 504 +#line 497 { RET(T_STAR); } yy58: yych = *++YYCURSOR; if(yych == '=') goto yy268; goto yy59; yy59: -#line 507 +#line 500 { RET(T_XOR); } yy60: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -932,7 +925,7 @@ yy61: yych = *++YYCURSOR; if(yych == '=') goto yy259; goto yy62; yy62: -#line 510 +#line 503 { RET(T_AND); } yy63: yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); @@ -945,24 +938,24 @@ yy63: yyaccept = 4; goto yy64; } yy64: -#line 512 +#line 505 { RET(T_OR); } yy65: yych = *++YYCURSOR; goto yy66; yy66: -#line 515 +#line 508 { RET(T_COMPL); } yy67: yych = *++YYCURSOR; if(yych == '=') goto yy247; goto yy68; yy68: -#line 518 +#line 511 { RET(T_NOT); } yy69: yych = *++YYCURSOR; if(yych == '=') goto yy245; goto yy70; yy70: -#line 520 +#line 513 { RET(T_ASSIGN); } yy71: yych = *++YYCURSOR; if(yych <= '<') goto yy72; @@ -970,12 +963,12 @@ yy71: yych = *++YYCURSOR; if(yych <= '>') goto yy241; goto yy72; yy72: -#line 522 +#line 515 { RET(T_GREATER); } yy73: yych = *++YYCURSOR; goto yy74; yy74: -#line 554 +#line 547 { RET(T_COMMA); } yy75: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -1016,7 +1009,7 @@ yy77: yyaccept = 5; if(yych == 'u') goto yy209; goto yy78; yy78: -#line 632 +#line 621 { /* if (0 != s->error_proc) (*s->error_proc)(s, "Unexpected character: '%c'", *s->tok); @@ -1068,7 +1061,7 @@ yy79: yyaccept = 6; } } yy80: -#line 571 +#line 564 { RET(T_INTLIT); } yy81: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); @@ -1121,12 +1114,12 @@ yy83: yyaccept = 5; yy84: yych = *++YYCURSOR; goto yy94; yy85: -#line 611 +#line 600 { RET(T_SPACE); } yy86: yych = *++YYCURSOR; goto yy87; yy87: -#line 614 +#line 603 { s->line++; RET(T_NEWLINE); @@ -1137,7 +1130,7 @@ yy88: yych = *++YYCURSOR; yy89: yych = *++YYCURSOR; goto yy90; yy90: -#line 620 +#line 609 { if(cursor != s->eof) { @@ -1258,7 +1251,7 @@ yy98: ++YYCURSOR; yy99: yych = *++YYCURSOR; goto yy100; yy100: -#line 580 +#line 573 { RET(T_STRINGLIT); } yy101: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -2275,7 +2268,7 @@ yy148: ++YYCURSOR; yy149: yych = *++YYCURSOR; goto yy150; yy150: -#line 577 +#line 570 { RET(T_CHARLIT); } yy151: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); @@ -3051,7 +3044,7 @@ yy187: if(yych <= 'K'){ } } yy188: -#line 574 +#line 567 { RET(T_FLOATLIT); } yy189: yych = *++YYCURSOR; if(yych == 'L') goto yy191; @@ -3559,28 +3552,28 @@ yy238: yych = *++YYCURSOR; yy239: yych = *++YYCURSOR; goto yy240; yy240: -#line 544 +#line 537 { RET(T_GREATEREQUAL); } yy241: yych = *++YYCURSOR; if(yych == '=') goto yy243; goto yy242; yy242: -#line 537 +#line 530 { RET(T_SHIFTRIGHT); } yy243: yych = *++YYCURSOR; goto yy244; yy244: -#line 538 +#line 531 { RET(T_SHIFTRIGHTASSIGN); } yy245: yych = *++YYCURSOR; goto yy246; yy246: -#line 540 +#line 533 { RET(T_EQUAL); } yy247: yych = *++YYCURSOR; goto yy248; yy248: -#line 541 +#line 534 { RET(T_NOTEQUAL); } yy249: yych = *++YYCURSOR; if(yych == '?') goto yy254; @@ -3588,12 +3581,12 @@ yy249: yych = *++YYCURSOR; yy250: yych = *++YYCURSOR; goto yy251; yy251: -#line 547 +#line 540 { RET(T_OROR); } yy252: yych = *++YYCURSOR; goto yy253; yy253: -#line 533 +#line 526 { RET(T_ORASSIGN); } yy254: yych = *++YYCURSOR; if(yych != '!') goto yy2; @@ -3601,17 +3594,17 @@ yy254: yych = *++YYCURSOR; yy255: yych = *++YYCURSOR; goto yy256; yy256: -#line 549 +#line 542 { RET(T_OROR); } yy257: yych = *++YYCURSOR; goto yy258; yy258: -#line 545 +#line 538 { RET(T_ANDAND); } yy259: yych = *++YYCURSOR; goto yy260; yy260: -#line 531 +#line 524 { RET(T_ANDASSIGN); } yy261: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -3641,7 +3634,7 @@ yy262: yyaccept = 10; } } yy263: -#line 509 +#line 502 { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XOR_ALT); } yy264: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -3674,38 +3667,38 @@ yy266: yyaccept = 11; } } yy267: -#line 529 +#line 522 { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XORASSIGN_ALT); } yy268: yych = *++YYCURSOR; goto yy269; yy269: -#line 528 +#line 521 { RET(T_XORASSIGN); } yy270: yych = *++YYCURSOR; goto yy271; yy271: -#line 525 +#line 518 { RET(T_STARASSIGN); } yy272: yych = *++YYCURSOR; if(yych == '*') goto yy278; goto yy273; yy273: -#line 565 +#line 558 { RET(T_ARROW); } yy274: yych = *++YYCURSOR; goto yy275; yy275: -#line 553 +#line 546 { RET(T_MINUSMINUS); } yy276: yych = *++YYCURSOR; goto yy277; yy277: -#line 524 +#line 517 { RET(T_MINUSASSIGN); } yy278: yych = *++YYCURSOR; goto yy279; yy279: -#line 556 +#line 549 { if (s->act_in_c99_mode) { --YYCURSOR; @@ -3718,17 +3711,17 @@ yy279: yy280: yych = *++YYCURSOR; goto yy281; yy281: -#line 552 +#line 545 { RET(T_PLUSPLUS); } yy282: yych = *++YYCURSOR; goto yy283; yy283: -#line 523 +#line 516 { RET(T_PLUSASSIGN); } yy284: yych = *++YYCURSOR; goto yy285; yy285: -#line 493 +#line 486 { if (s->act_in_c99_mode) { --YYCURSOR; @@ -3744,13 +3737,13 @@ yy286: yych = *++YYCURSOR; yy287: yych = *++YYCURSOR; goto yy288; yy288: -#line 479 +#line 472 { RET(T_ELLIPSIS); } yy289: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; goto yy290; -yy290: if(yych <= 'i'){ +yy290: if(yych <= 'h'){ if(yych <= '.'){ if(yych <= '\t'){ if(yych <= '\b') goto yy2; @@ -3760,32 +3753,31 @@ yy290: if(yych <= 'i'){ goto yy2; } } else { - if(yych <= 'd'){ - if(yych <= '/') goto yy291; - if(yych <= 'c') goto yy2; - goto yy299; + if(yych <= 'c'){ + if(yych >= '0') goto yy2; + goto yy291; } else { - if(yych <= 'e') goto yy293; - if(yych <= 'h') goto yy2; - goto yy292; + if(yych <= 'd') goto yy297; + if(yych <= 'e') goto yy294; + goto yy2; } } } else { - if(yych <= 'q'){ - if(yych <= 'l'){ - if(yych <= 'k') goto yy2; - goto yy297; - } else { - if(yych == 'p') goto yy296; + if(yych <= 'p'){ + if(yych <= 'k'){ + if(yych <= 'i') goto yy298; goto yy2; + } else { + if(yych <= 'l') goto yy295; + if(yych <= 'o') goto yy2; + goto yy293; } } else { if(yych <= 'u'){ - if(yych <= 'r') goto yy294; if(yych <= 't') goto yy2; - goto yy298; + goto yy296; } else { - if(yych == 'w') goto yy295; + if(yych == 'w') goto yy292; goto yy2; } } @@ -3793,80 +3785,77 @@ yy290: if(yych <= 'i'){ yy291: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == '*') goto yy412; + if(yych == '*') goto yy392; goto yy2; yy292: yych = *++YYCURSOR; - if(yych <= 'l'){ - if(yych == 'f') goto yy365; - goto yy2; - } else { - if(yych <= 'm') goto yy367; - if(yych <= 'n') goto yy364; - goto yy2; - } -yy293: yych = *++YYCURSOR; - if(yych <= 'm'){ - if(yych == 'l') goto yy340; - goto yy2; - } else { - if(yych <= 'n') goto yy341; - if(yych == 'r') goto yy342; - goto yy2; - } -yy294: yych = *++YYCURSOR; - if(yych == 'e') goto yy334; + if(yych == 'a') goto yy385; goto yy2; +yy293: yych = *++YYCURSOR; + if(yych == 'r') goto yy379; + goto yy2; +yy294: yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych == 'l') goto yy362; + goto yy2; + } else { + if(yych <= 'n') goto yy363; + if(yych == 'r') goto yy364; + goto yy2; + } yy295: yych = *++YYCURSOR; - if(yych == 'a') goto yy327; + if(yych == 'i') goto yy358; goto yy2; yy296: yych = *++YYCURSOR; - if(yych == 'r') goto yy321; + if(yych == 'n') goto yy353; goto yy2; yy297: yych = *++YYCURSOR; - if(yych == 'i') goto yy317; + if(yych == 'e') goto yy347; goto yy2; yy298: yych = *++YYCURSOR; - if(yych == 'n') goto yy312; + if(yych == 'f') goto yy306; + if(yych == 'n') goto yy305; goto yy2; yy299: yych = *++YYCURSOR; - if(yych == 'e') goto yy306; + if(yych == '?') goto yy302; goto yy2; yy300: yych = *++YYCURSOR; - if(yych == '?') goto yy303; - goto yy2; -yy301: yych = *++YYCURSOR; - goto yy302; -yy302: -#line 470 + goto yy301; +yy301: +#line 463 { RET(T_POUND_POUND); } -yy303: yych = *++YYCURSOR; +yy302: yych = *++YYCURSOR; if(yych != '=') goto yy2; + goto yy303; +yy303: yych = *++YYCURSOR; goto yy304; -yy304: yych = *++YYCURSOR; - goto yy305; -yy305: -#line 471 +yy304: +#line 464 { RET(T_POUND_POUND_TRIGRAPH); } -yy306: yych = *++YYCURSOR; - if(yych != 'f') goto yy2; +yy305: yych = *++YYCURSOR; + if(yych == 'c') goto yy317; + goto yy2; +yy306: yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'd') goto yy309; + if(yych == 'n') goto yy308; goto yy307; -yy307: yych = *++YYCURSOR; - if(yych != 'i') goto yy2; - goto yy308; +yy307: +#line 585 + { RET(T_PP_IF); } yy308: yych = *++YYCURSOR; - if(yych != 'n') goto yy2; - goto yy309; + if(yych == 'd') goto yy313; + goto yy2; yy309: yych = *++YYCURSOR; if(yych != 'e') goto yy2; goto yy310; yy310: yych = *++YYCURSOR; + if(yych != 'f') goto yy2; goto yy311; -yy311: -#line 598 - { RET(T_PP_DEFINE); } -yy312: yych = *++YYCURSOR; - if(yych != 'd') goto yy2; - goto yy313; +yy311: yych = *++YYCURSOR; + goto yy312; +yy312: +#line 586 + { RET(T_PP_IFDEF); } yy313: yych = *++YYCURSOR; if(yych != 'e') goto yy2; goto yy314; @@ -3876,412 +3865,352 @@ yy314: yych = *++YYCURSOR; yy315: yych = *++YYCURSOR; goto yy316; yy316: -#line 599 - { RET(T_PP_UNDEF); } +#line 587 + { RET(T_PP_IFNDEF); } yy317: yych = *++YYCURSOR; - if(yych != 'n') goto yy2; + if(yych != 'l') goto yy2; goto yy318; yy318: yych = *++YYCURSOR; - if(yych != 'e') goto yy2; + if(yych != 'u') goto yy2; goto yy319; yy319: yych = *++YYCURSOR; + if(yych != 'd') goto yy2; goto yy320; -yy320: -#line 600 - { RET(T_PP_LINE); } -yy321: yych = *++YYCURSOR; - if(yych != 'a') goto yy2; - goto yy322; -yy322: yych = *++YYCURSOR; - if(yych != 'g') goto yy2; - goto yy323; -yy323: yych = *++YYCURSOR; - if(yych != 'm') goto yy2; - goto yy324; -yy324: yych = *++YYCURSOR; - if(yych != 'a') goto yy2; +yy320: yych = *++YYCURSOR; + if(yych != 'e') goto yy2; + goto yy321; +yy321: yyaccept = 13; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '_') goto yy323; goto yy325; -yy325: yych = *++YYCURSOR; - goto yy326; -yy326: -#line 602 - { RET(T_PP_PRAGMA); } +yy322: +#line 583 + { RET(T_PP_INCLUDE); } +yy323: yych = *++YYCURSOR; + if(yych == 'n') goto yy344; + goto yy2; +yy324: yyaccept = 13; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy325; +yy325: if(yych <= '!'){ + if(yych <= '\t'){ + if(yych <= '\b') goto yy322; + goto yy324; + } else { + if(yych == ' ') goto yy324; + goto yy322; + } + } else { + if(yych <= '/'){ + if(yych <= '"') goto yy328; + if(yych <= '.') goto yy322; + goto yy326; + } else { + if(yych == '<') goto yy327; + goto yy322; + } + } +yy326: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych == '*') goto yy337; + goto yy2; yy327: yych = *++YYCURSOR; - if(yych != 'r') goto yy2; - goto yy328; + if(yych == '>') goto yy2; + goto yy334; yy328: yych = *++YYCURSOR; - if(yych != 'n') goto yy2; - goto yy329; -yy329: yych = *++YYCURSOR; - if(yych != 'i') goto yy2; + if(yych == '"') goto yy2; goto yy330; -yy330: yych = *++YYCURSOR; - if(yych != 'n') goto yy2; - goto yy331; +yy329: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy330; +yy330: if(yych <= '\f'){ + if(yych == '\t') goto yy329; + if(yych <= '\n') goto yy2; + goto yy329; + } else { + if(yych <= '\037') goto yy2; + if(yych != '"') goto yy329; + goto yy331; + } yy331: yych = *++YYCURSOR; - if(yych != 'g') goto yy2; goto yy332; -yy332: yych = *++YYCURSOR; - goto yy333; -yy333: -#line 604 - { RET(T_PP_WARNING); } -yy334: yych = *++YYCURSOR; - if(yych != 'g') goto yy2; - goto yy335; +yy332: +#line 580 + { RET(T_PP_QHEADER); } +yy333: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy334; +yy334: if(yych <= '\f'){ + if(yych == '\t') goto yy333; + if(yych <= '\n') goto yy2; + goto yy333; + } else { + if(yych <= '\037') goto yy2; + if(yych != '>') goto yy333; + goto yy335; + } yy335: yych = *++YYCURSOR; - if(yych != 'i') goto yy2; goto yy336; -yy336: yych = *++YYCURSOR; - if(yych != 'o') goto yy2; - goto yy337; -yy337: yych = *++YYCURSOR; - if(yych != 'n') goto yy2; +yy336: +#line 577 + { RET(T_PP_HHEADER); } +yy337: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; goto yy338; -yy338: yych = *++YYCURSOR; - goto yy339; -yy339: -#line 606 - { RET(T_PP_REGION); } -yy340: yych = *++YYCURSOR; - if(yych == 'i') goto yy358; - if(yych == 's') goto yy359; - goto yy2; -yy341: yych = *++YYCURSOR; - if(yych == 'd') goto yy347; - goto yy2; -yy342: yych = *++YYCURSOR; - if(yych != 'r') goto yy2; - goto yy343; -yy343: yych = *++YYCURSOR; - if(yych != 'o') goto yy2; - goto yy344; +yy338: if(yych <= '\r'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy337; + goto yy339; + } else { + if(yych <= '\037') goto yy2; + if(yych == '*') goto yy341; + goto yy337; + } +yy339: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy340; +yy340: if(yych <= '\r'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy337; + goto yy339; + } else { + if(yych <= '\037') goto yy2; + if(yych != '*') goto yy337; + goto yy341; + } +yy341: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy342; +yy342: if(yych <= '\037'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy337; + if(yych >= '\016') goto yy2; + goto yy343; + } else { + if(yych <= '*'){ + if(yych <= ')') goto yy337; + goto yy341; + } else { + if(yych == '/') goto yy324; + goto yy337; + } + } +yy343: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= '\r'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy337; + goto yy339; + } else { + if(yych <= '\037') goto yy2; + if(yych == '*') goto yy341; + goto yy337; + } yy344: yych = *++YYCURSOR; - if(yych != 'r') goto yy2; + if(yych != 'e') goto yy2; goto yy345; yy345: yych = *++YYCURSOR; + if(yych != 'x') goto yy2; goto yy346; -yy346: -#line 601 - { RET(T_PP_ERROR); } +yy346: yych = *++YYCURSOR; + if(yych == 't') goto yy324; + goto yy2; yy347: yych = *++YYCURSOR; - if(yych == 'i') goto yy348; - if(yych == 'r') goto yy349; - goto yy2; + if(yych != 'f') goto yy2; + goto yy348; yy348: yych = *++YYCURSOR; - if(yych == 'f') goto yy356; - goto yy2; + if(yych != 'i') goto yy2; + goto yy349; yy349: yych = *++YYCURSOR; - if(yych != 'e') goto yy2; + if(yych != 'n') goto yy2; goto yy350; yy350: yych = *++YYCURSOR; - if(yych != 'g') goto yy2; + if(yych != 'e') goto yy2; goto yy351; yy351: yych = *++YYCURSOR; - if(yych != 'i') goto yy2; goto yy352; -yy352: yych = *++YYCURSOR; - if(yych != 'o') goto yy2; - goto yy353; +yy352: +#line 591 + { RET(T_PP_DEFINE); } yy353: yych = *++YYCURSOR; - if(yych != 'n') goto yy2; + if(yych != 'd') goto yy2; goto yy354; yy354: yych = *++YYCURSOR; + if(yych != 'e') goto yy2; goto yy355; -yy355: -#line 607 - { RET(T_PP_ENDREGION); } +yy355: yych = *++YYCURSOR; + if(yych != 'f') goto yy2; + goto yy356; yy356: yych = *++YYCURSOR; goto yy357; yy357: -#line 597 - { RET(T_PP_ENDIF); } +#line 592 + { RET(T_PP_UNDEF); } yy358: yych = *++YYCURSOR; - if(yych == 'f') goto yy362; - goto yy2; + if(yych != 'n') goto yy2; + goto yy359; yy359: yych = *++YYCURSOR; if(yych != 'e') goto yy2; goto yy360; yy360: yych = *++YYCURSOR; goto yy361; yy361: -#line 595 - { RET(T_PP_ELSE); } +#line 593 + { RET(T_PP_LINE); } yy362: yych = *++YYCURSOR; - goto yy363; -yy363: -#line 596 - { RET(T_PP_ELIF); } -yy364: yych = *++YYCURSOR; - if(yych == 'c') goto yy382; + if(yych == 'i') goto yy373; + if(yych == 's') goto yy374; goto yy2; -yy365: yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'd') goto yy374; - if(yych == 'n') goto yy373; - goto yy366; -yy366: -#line 592 - { RET(T_PP_IF); } -yy367: yych = *++YYCURSOR; - if(yych != 'p') goto yy2; - goto yy368; -yy368: yych = *++YYCURSOR; - if(yych != 'o') goto yy2; - goto yy369; -yy369: yych = *++YYCURSOR; +yy363: yych = *++YYCURSOR; + if(yych == 'd') goto yy369; + goto yy2; +yy364: yych = *++YYCURSOR; if(yych != 'r') goto yy2; + goto yy365; +yy365: yych = *++YYCURSOR; + if(yych != 'o') goto yy2; + goto yy366; +yy366: yych = *++YYCURSOR; + if(yych != 'r') goto yy2; + goto yy367; +yy367: yych = *++YYCURSOR; + goto yy368; +yy368: +#line 594 + { RET(T_PP_ERROR); } +yy369: yych = *++YYCURSOR; + if(yych != 'i') goto yy2; goto yy370; yy370: yych = *++YYCURSOR; - if(yych != 't') goto yy2; + if(yych != 'f') goto yy2; goto yy371; yy371: yych = *++YYCURSOR; goto yy372; yy372: -#line 608 - { RET(T_PP_IMPORT); } +#line 590 + { RET(T_PP_ENDIF); } yy373: yych = *++YYCURSOR; - if(yych == 'd') goto yy378; + if(yych == 'f') goto yy377; goto yy2; yy374: yych = *++YYCURSOR; if(yych != 'e') goto yy2; goto yy375; yy375: yych = *++YYCURSOR; - if(yych != 'f') goto yy2; goto yy376; -yy376: yych = *++YYCURSOR; - goto yy377; -yy377: -#line 593 - { RET(T_PP_IFDEF); } -yy378: yych = *++YYCURSOR; - if(yych != 'e') goto yy2; - goto yy379; +yy376: +#line 588 + { RET(T_PP_ELSE); } +yy377: yych = *++YYCURSOR; + goto yy378; +yy378: +#line 589 + { RET(T_PP_ELIF); } yy379: yych = *++YYCURSOR; - if(yych != 'f') goto yy2; + if(yych != 'a') goto yy2; goto yy380; yy380: yych = *++YYCURSOR; + if(yych != 'g') goto yy2; goto yy381; -yy381: -#line 594 - { RET(T_PP_IFNDEF); } +yy381: yych = *++YYCURSOR; + if(yych != 'm') goto yy2; + goto yy382; yy382: yych = *++YYCURSOR; - if(yych != 'l') goto yy2; + if(yych != 'a') goto yy2; goto yy383; yy383: yych = *++YYCURSOR; - if(yych != 'u') goto yy2; goto yy384; -yy384: yych = *++YYCURSOR; - if(yych != 'd') goto yy2; - goto yy385; +yy384: +#line 595 + { RET(T_PP_PRAGMA); } yy385: yych = *++YYCURSOR; - if(yych != 'e') goto yy2; + if(yych != 'r') goto yy2; goto yy386; -yy386: yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '_') goto yy388; - goto yy390; -yy387: -#line 590 - { RET(T_PP_INCLUDE); } +yy386: yych = *++YYCURSOR; + if(yych != 'n') goto yy2; + goto yy387; +yy387: yych = *++YYCURSOR; + if(yych != 'i') goto yy2; + goto yy388; yy388: yych = *++YYCURSOR; - if(yych == 'n') goto yy409; - goto yy2; -yy389: yyaccept = 13; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + if(yych != 'n') goto yy2; + goto yy389; +yy389: yych = *++YYCURSOR; + if(yych != 'g') goto yy2; goto yy390; -yy390: if(yych <= '!'){ - if(yych <= '\t'){ - if(yych <= '\b') goto yy387; - goto yy389; - } else { - if(yych == ' ') goto yy389; - goto yy387; - } - } else { - if(yych <= '/'){ - if(yych <= '"') goto yy393; - if(yych <= '.') goto yy387; - goto yy391; - } else { - if(yych == '<') goto yy392; - goto yy387; - } - } -yy391: ++YYCURSOR; +yy390: yych = *++YYCURSOR; + goto yy391; +yy391: +#line 597 + { RET(T_PP_WARNING); } +yy392: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == '*') goto yy402; - goto yy2; -yy392: yych = *++YYCURSOR; - if(yych == '>') goto yy2; - goto yy399; -yy393: yych = *++YYCURSOR; - if(yych == '"') goto yy2; - goto yy395; + goto yy393; +yy393: if(yych <= '\r'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy392; + goto yy394; + } else { + if(yych <= '\037') goto yy2; + if(yych == '*') goto yy396; + goto yy392; + } yy394: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; goto yy395; -yy395: if(yych <= '\f'){ - if(yych == '\t') goto yy394; - if(yych <= '\n') goto yy2; +yy395: if(yych <= '\r'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy392; goto yy394; } else { if(yych <= '\037') goto yy2; - if(yych != '"') goto yy394; + if(yych != '*') goto yy392; goto yy396; } -yy396: yych = *++YYCURSOR; +yy396: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; goto yy397; -yy397: -#line 587 - { RET(T_PP_QHEADER); } +yy397: if(yych <= '\037'){ + if(yych <= '\b') goto yy2; + if(yych <= '\f') goto yy392; + if(yych >= '\016') goto yy2; + goto yy398; + } else { + if(yych <= '*'){ + if(yych <= ')') goto yy392; + goto yy396; + } else { + if(yych == '/') goto yy289; + goto yy392; + } + } yy398: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy399; -yy399: if(yych <= '\f'){ - if(yych == '\t') goto yy398; - if(yych <= '\n') goto yy2; - goto yy398; - } else { - if(yych <= '\037') goto yy2; - if(yych != '>') goto yy398; - goto yy400; - } -yy400: yych = *++YYCURSOR; - goto yy401; -yy401: -#line 584 - { RET(T_PP_HHEADER); } -yy402: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy403; -yy403: if(yych <= '\r'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy402; - goto yy404; - } else { - if(yych <= '\037') goto yy2; - if(yych == '*') goto yy406; - goto yy402; - } -yy404: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy405; -yy405: if(yych <= '\r'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy402; - goto yy404; - } else { - if(yych <= '\037') goto yy2; - if(yych != '*') goto yy402; - goto yy406; - } -yy406: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy407; -yy407: if(yych <= '\037'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy402; - if(yych >= '\016') goto yy2; - goto yy408; - } else { - if(yych <= '*'){ - if(yych <= ')') goto yy402; - goto yy406; - } else { - if(yych == '/') goto yy389; - goto yy402; - } - } -yy408: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; if(yych <= '\r'){ if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy402; - goto yy404; + if(yych <= '\f') goto yy392; + goto yy394; } else { if(yych <= '\037') goto yy2; - if(yych == '*') goto yy406; - goto yy402; + if(yych == '*') goto yy396; + goto yy392; } -yy409: yych = *++YYCURSOR; - if(yych != 'e') goto yy2; - goto yy410; -yy410: yych = *++YYCURSOR; - if(yych != 'x') goto yy2; - goto yy411; -yy411: yych = *++YYCURSOR; - if(yych == 't') goto yy389; - goto yy2; -yy412: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy413; -yy413: if(yych <= '\r'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy412; - goto yy414; - } else { - if(yych <= '\037') goto yy2; - if(yych == '*') goto yy416; - goto yy412; - } -yy414: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy415; -yy415: if(yych <= '\r'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy412; - goto yy414; - } else { - if(yych <= '\037') goto yy2; - if(yych != '*') goto yy412; - goto yy416; - } -yy416: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy417; -yy417: if(yych <= '\037'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy412; - if(yych >= '\016') goto yy2; - goto yy418; - } else { - if(yych <= '*'){ - if(yych <= ')') goto yy412; - goto yy416; - } else { - if(yych == '/') goto yy289; - goto yy412; - } - } -yy418: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '\r'){ - if(yych <= '\b') goto yy2; - if(yych <= '\f') goto yy412; - goto yy414; - } else { - if(yych <= '\037') goto yy2; - if(yych == '*') goto yy416; - goto yy412; - } -yy419: yych = *++YYCURSOR; - goto yy420; -yy420: -#line 482 +yy399: yych = *++YYCURSOR; + goto yy400; +yy400: +#line 475 { if (s->act_in_c99_mode) { --YYCURSOR; @@ -4291,637 +4220,802 @@ yy420: RET(T_COLON_COLON); } } -yy421: yych = *++YYCURSOR; - goto yy422; -yy422: -#line 466 +yy401: yych = *++YYCURSOR; + goto yy402; +yy402: +#line 459 { RET(T_RIGHTBRACKET_ALT); } -yy423: yyaccept = 14; +yy403: yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'h'){ + if(yych <= 'e'){ if(yych <= '$'){ if(yych <= '\t'){ if(yych >= '\t') goto yy290; - goto yy424; + goto yy404; } else { if(yych == ' ') goto yy290; - goto yy424; + goto yy404; } } else { - if(yych <= '/'){ - if(yych <= '%') goto yy429; - if(yych >= '/') goto yy290; - goto yy424; + if(yych <= '.'){ + if(yych <= '%') goto yy409; + goto yy404; } else { - if(yych <= 'c') goto yy424; - if(yych <= 'e') goto yy290; - goto yy424; + if(yych <= '/') goto yy290; + if(yych >= 'd') goto yy290; + goto yy404; } } } else { - if(yych <= 'q'){ - if(yych <= 'l'){ - if(yych <= 'i') goto yy290; - if(yych >= 'l') goto yy290; - goto yy424; + if(yych <= 'o'){ + if(yych <= 'i'){ + if(yych >= 'i') goto yy290; + goto yy404; } else { - if(yych == 'p') goto yy290; - goto yy424; + if(yych == 'l') goto yy290; + goto yy404; } } else { if(yych <= 'u'){ - if(yych <= 'r') goto yy290; + if(yych <= 'p') goto yy290; if(yych >= 'u') goto yy290; - goto yy424; + goto yy404; } else { if(yych == 'w') goto yy290; - goto yy424; + goto yy404; } } } -yy424: -#line 468 +yy404: +#line 461 { RET(T_POUND_ALT); } +yy405: yych = *++YYCURSOR; + goto yy406; +yy406: +#line 520 + { RET(T_PERCENTASSIGN); } +yy407: yych = *++YYCURSOR; + goto yy408; +yy408: +#line 453 + { RET(T_RIGHTBRACE_ALT); } +yy409: yych = *++YYCURSOR; + if(yych != ':') goto yy2; + goto yy410; +yy410: yych = *++YYCURSOR; + goto yy411; +yy411: +#line 467 + { RET(T_POUND_POUND_ALT); } +yy412: yych = *++YYCURSOR; + goto yy413; +yy413: +#line 536 + { RET(T_LESSEQUAL); } +yy414: yych = *++YYCURSOR; + if(yych == '=') goto yy420; + goto yy415; +yy415: +#line 529 + { RET(T_SHIFTLEFT); } +yy416: yych = *++YYCURSOR; + goto yy417; +yy417: +#line 456 + { RET(T_LEFTBRACKET_ALT); } +yy418: yych = *++YYCURSOR; + goto yy419; +yy419: +#line 450 + { RET(T_LEFTBRACE_ALT); } +yy420: yych = *++YYCURSOR; + goto yy421; +yy421: +#line 532 + { RET(T_SHIFTLEFTASSIGN); } +yy422: yych = *++YYCURSOR; + switch(yych){ + case '!': goto yy435; + case '\'': goto yy433; + case '(': goto yy427; + case ')': goto yy429; + case '-': goto yy437; + case '/': goto yy439; + case '<': goto yy423; + case '=': goto yy431; + case '>': goto yy425; + default: goto yy2; + } +yy423: yych = *++YYCURSOR; + goto yy424; +yy424: +#line 449 + { RET(T_LEFTBRACE_TRIGRAPH); } yy425: yych = *++YYCURSOR; goto yy426; yy426: -#line 527 - { RET(T_PERCENTASSIGN); } +#line 452 + { RET(T_RIGHTBRACE_TRIGRAPH); } yy427: yych = *++YYCURSOR; goto yy428; yy428: -#line 460 - { RET(T_RIGHTBRACE_ALT); } -yy429: yych = *++YYCURSOR; - if(yych != ':') goto yy2; - goto yy430; -yy430: yych = *++YYCURSOR; - goto yy431; -yy431: -#line 474 - { RET(T_POUND_POUND_ALT); } -yy432: yych = *++YYCURSOR; - goto yy433; -yy433: -#line 543 - { RET(T_LESSEQUAL); } -yy434: yych = *++YYCURSOR; - if(yych == '=') goto yy440; - goto yy435; -yy435: -#line 536 - { RET(T_SHIFTLEFT); } -yy436: yych = *++YYCURSOR; - goto yy437; -yy437: -#line 463 - { RET(T_LEFTBRACKET_ALT); } -yy438: yych = *++YYCURSOR; - goto yy439; -yy439: -#line 457 - { RET(T_LEFTBRACE_ALT); } -yy440: yych = *++YYCURSOR; - goto yy441; -yy441: -#line 539 - { RET(T_SHIFTLEFTASSIGN); } -yy442: yych = *++YYCURSOR; - switch(yych){ - case '!': goto yy455; - case '\'': goto yy453; - case '(': goto yy447; - case ')': goto yy449; - case '-': goto yy457; - case '/': goto yy459; - case '<': goto yy443; - case '=': goto yy451; - case '>': goto yy445; - default: goto yy2; - } -yy443: yych = *++YYCURSOR; - goto yy444; -yy444: -#line 456 - { RET(T_LEFTBRACE_TRIGRAPH); } -yy445: yych = *++YYCURSOR; - goto yy446; -yy446: -#line 459 - { RET(T_RIGHTBRACE_TRIGRAPH); } -yy447: yych = *++YYCURSOR; - goto yy448; -yy448: -#line 462 +#line 455 { RET(T_LEFTBRACKET_TRIGRAPH); } -yy449: yych = *++YYCURSOR; - goto yy450; -yy450: -#line 465 +yy429: yych = *++YYCURSOR; + goto yy430; +yy430: +#line 458 { RET(T_RIGHTBRACKET_TRIGRAPH); } -yy451: yyaccept = 15; +yy431: yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'e'){ - if(yych <= '#'){ - if(yych <= '\037'){ - if(yych == '\t') goto yy290; - goto yy452; + if(yych <= 'c'){ + if(yych <= '"'){ + if(yych <= '\t'){ + if(yych >= '\t') goto yy290; + goto yy432; } else { - if(yych <= ' ') goto yy290; - if(yych >= '#') goto yy471; - goto yy452; + if(yych == ' ') goto yy290; + goto yy432; } } else { - if(yych <= '>'){ - if(yych == '/') goto yy290; - goto yy452; + if(yych <= '/'){ + if(yych <= '#') goto yy451; + if(yych >= '/') goto yy290; + goto yy432; } else { - if(yych <= '?') goto yy470; - if(yych >= 'd') goto yy290; - goto yy452; + if(yych == '?') goto yy450; + goto yy432; } } } else { - if(yych <= 'p'){ - if(yych <= 'k'){ - if(yych == 'i') goto yy290; - goto yy452; + if(yych <= 'o'){ + if(yych <= 'i'){ + if(yych <= 'e') goto yy290; + if(yych >= 'i') goto yy290; + goto yy432; } else { - if(yych <= 'l') goto yy290; - if(yych >= 'p') goto yy290; - goto yy452; + if(yych == 'l') goto yy290; + goto yy432; } } else { - if(yych <= 't'){ - if(yych == 'r') goto yy290; - goto yy452; + if(yych <= 'u'){ + if(yych <= 'p') goto yy290; + if(yych >= 'u') goto yy290; + goto yy432; } else { - if(yych == 'v') goto yy452; - if(yych <= 'w') goto yy290; - goto yy452; + if(yych == 'w') goto yy290; + goto yy432; } } } -yy452: -#line 469 +yy432: +#line 462 { RET(T_POUND_TRIGRAPH); } -yy453: yych = *++YYCURSOR; - if(yych == '=') goto yy468; - goto yy454; -yy454: -#line 508 +yy433: yych = *++YYCURSOR; + if(yych == '=') goto yy448; + goto yy434; +yy434: +#line 501 { RET(T_XOR_TRIGRAPH); } -yy455: yyaccept = 16; +yy435: yyaccept = 16; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '>'){ - if(yych == '=') goto yy463; - goto yy456; + if(yych == '=') goto yy443; + goto yy436; } else { - if(yych <= '?') goto yy460; - if(yych == '|') goto yy461; - goto yy456; + if(yych <= '?') goto yy440; + if(yych == '|') goto yy441; + goto yy436; } -yy456: -#line 514 +yy436: +#line 507 { RET(T_OR_TRIGRAPH); } -yy457: yych = *++YYCURSOR; - goto yy458; -yy458: -#line 516 +yy437: yych = *++YYCURSOR; + goto yy438; +yy438: +#line 509 { RET(T_COMPL_TRIGRAPH); } -yy459: yych = *++YYCURSOR; +yy439: yych = *++YYCURSOR; if(yych == 'U') goto yy210; if(yych == 'u') goto yy209; goto yy2; -yy460: yych = *++YYCURSOR; - if(yych == '?') goto yy465; +yy440: yych = *++YYCURSOR; + if(yych == '?') goto yy445; goto yy2; -yy461: yych = *++YYCURSOR; - goto yy462; -yy462: -#line 548 +yy441: yych = *++YYCURSOR; + goto yy442; +yy442: +#line 541 { RET(T_OROR); } -yy463: yych = *++YYCURSOR; - goto yy464; -yy464: -#line 535 +yy443: yych = *++YYCURSOR; + goto yy444; +yy444: +#line 528 { RET(T_ORASSIGN); } -yy465: yych = *++YYCURSOR; +yy445: yych = *++YYCURSOR; if(yych != '!') goto yy2; - goto yy466; -yy466: yych = *++YYCURSOR; - goto yy467; -yy467: -#line 551 + goto yy446; +yy446: yych = *++YYCURSOR; + goto yy447; +yy447: +#line 544 { RET(T_OROR); } -yy468: yych = *++YYCURSOR; - goto yy469; -yy469: -#line 530 +yy448: yych = *++YYCURSOR; + goto yy449; +yy449: +#line 523 { RET(T_XORASSIGN); } -yy470: yych = *++YYCURSOR; - if(yych == '?') goto yy473; +yy450: yych = *++YYCURSOR; + if(yych == '?') goto yy453; goto yy2; -yy471: yych = *++YYCURSOR; - goto yy472; -yy472: -#line 472 +yy451: yych = *++YYCURSOR; + goto yy452; +yy452: +#line 465 { RET(T_POUND_POUND_TRIGRAPH); } -yy473: yych = *++YYCURSOR; +yy453: yych = *++YYCURSOR; if(yych != '=') goto yy2; - goto yy474; -yy474: yych = *++YYCURSOR; - goto yy475; -yy475: -#line 473 + goto yy454; +yy454: yych = *++YYCURSOR; + goto yy455; +yy455: +#line 466 { RET(T_POUND_POUND_TRIGRAPH); } -yy476: yyaccept = 0; +yy456: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch(yych){ - case 'a': goto yy477; - case 'b': goto yy478; - case 'c': goto yy527; - case 'd': goto yy480; - case 'e': goto yy530; - case 'f': goto yy528; - case 'i': goto yy526; - case 'l': goto yy531; - case 'r': goto yy532; - case 's': goto yy483; - case 't': goto yy529; + case 'a': goto yy457; + case 'b': goto yy458; + case 'c': goto yy459; + case 'd': goto yy460; + case 'e': goto yy509; + case 'f': goto yy507; + case 'i': goto yy506; + case 'l': goto yy510; + case 's': goto yy463; + case 't': goto yy508; default: goto yy219; } -yy477: yyaccept = 0; +yy457: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 's') goto yy523; + if(yych == 's') goto yy503; goto yy219; -yy478: yyaccept = 0; +yy458: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy518; + if(yych == 'a') goto yy498; goto yy219; -yy479: yyaccept = 0; +yy459: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'd') goto yy513; + if(yych == 'd') goto yy493; goto yy219; -yy480: yyaccept = 0; +yy460: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy505; + if(yych == 'e') goto yy485; goto yy219; -yy481: yyaccept = 0; +yy461: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy497; + if(yych == 'a') goto yy477; goto yy219; -yy482: yyaccept = 0; +yy462: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'n') goto yy491; + if(yych == 'n') goto yy471; goto yy219; -yy483: yyaccept = 0; +yy463: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy484; -yy484: yyaccept = 0; + goto yy464; +yy464: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'd') goto yy219; - goto yy485; + goto yy465; +yy465: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy466; +yy466: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'a') goto yy219; + goto yy467; +yy467: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy468; +yy468: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy469; +yy469: yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy470; + if(yych <= '9') goto yy218; + goto yy470; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy470; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy470; + } else { + if(yych == '`') goto yy470; + if(yych <= 'z') goto yy218; + goto yy470; + } + } +yy470: +#line 440 + { RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); } +yy471: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy472; +yy472: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'i') goto yy219; + goto yy473; +yy473: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy474; +yy474: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy475; +yy475: yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy476; + if(yych <= '9') goto yy218; + goto yy476; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy476; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy476; + } else { + if(yych == '`') goto yy476; + if(yych <= 'z') goto yy218; + goto yy476; + } + } +yy476: +#line 445 + { RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); } +yy477: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 's') goto yy219; + goto yy478; +yy478: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy479; +yy479: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy480; +yy480: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'a') goto yy219; + goto yy481; +yy481: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy482; +yy482: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy483; +yy483: yyaccept = 19; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy484; + if(yych <= '9') goto yy218; + goto yy484; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy484; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy484; + } else { + if(yych == '`') goto yy484; + if(yych <= 'z') goto yy218; + goto yy484; + } + } +yy484: +#line 439 + { RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); } yy485: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'c') goto yy219; goto yy486; yy486: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'l') goto yy219; goto yy487; yy487: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; + if(yych != 's') goto yy219; goto yy488; yy488: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; + if(yych != 'p') goto yy219; goto yy489; -yy489: yyaccept = 17; +yy489: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy490; +yy490: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy491; +yy491: yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy490; + if(yych <= '/') goto yy492; if(yych <= '9') goto yy218; - goto yy490; + goto yy492; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy490; + goto yy492; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy490; + goto yy492; } else { - if(yych == '`') goto yy490; + if(yych == '`') goto yy492; if(yych <= 'z') goto yy218; - goto yy490; + goto yy492; } } -yy490: -#line 443 - { RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); } -yy491: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy492; -yy492: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; - goto yy493; +yy492: +#line 437 + { RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); } yy493: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; + if(yych != 'e') goto yy219; goto yy494; yy494: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'c') goto yy219; goto yy495; -yy495: yyaccept = 18; +yy495: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy496; +yy496: yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy496; + if(yych <= '/') goto yy497; if(yych <= '9') goto yy218; - goto yy496; + goto yy497; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy496; + goto yy497; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy496; + goto yy497; } else { - if(yych == '`') goto yy496; + if(yych == '`') goto yy497; if(yych <= 'z') goto yy218; - goto yy496; + goto yy497; } } -yy496: -#line 448 - { RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); } -yy497: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy498; +yy497: +#line 438 + { RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); } yy498: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 's') goto yy219; goto yy499; yy499: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 'e') goto yy219; goto yy500; yy500: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'd') goto yy219; goto yy501; -yy501: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy502; -yy502: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy503; -yy503: yyaccept = 19; +yy501: yyaccept = 22; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy504; + if(yych <= '/') goto yy502; if(yych <= '9') goto yy218; - goto yy504; + goto yy502; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy504; + goto yy502; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy504; + goto yy502; } else { - if(yych == '`') goto yy504; + if(yych == '`') goto yy502; if(yych <= 'z') goto yy218; - goto yy504; + goto yy502; } } -yy504: -#line 442 - { RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); } -yy505: yyaccept = 0; +yy502: +#line 436 + { RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); } +yy503: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy506; + if(yych != 'm') goto yy219; + goto yy504; +yy504: yyaccept = 23; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy505; + if(yych <= '9') goto yy218; + goto yy505; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy505; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy505; + } else { + if(yych == '`') goto yy505; + if(yych <= 'z') goto yy218; + goto yy505; + } + } +yy505: +#line 446 + { RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); } yy506: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy507; + if(yych == 'n') goto yy532; + goto yy219; yy507: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy508; + if(yych == 'a') goto yy477; + if(yych == 'i') goto yy525; + goto yy219; yy508: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; - goto yy509; + if(yych == 'r') goto yy522; + goto yy219; yy509: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy510; + if(yych == 'x') goto yy516; + goto yy219; yy510: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 'e') goto yy219; goto yy511; -yy511: yyaccept = 20; +yy511: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy512; - if(yych <= '9') goto yy218; - goto yy512; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy512; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy512; - } else { - if(yych == '`') goto yy512; - if(yych <= 'z') goto yy218; - goto yy512; - } - } -yy512: -#line 440 - { RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); } + if(yych != 'a') goto yy219; + goto yy512; +yy512: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'v') goto yy219; + goto yy513; yy513: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; goto yy514; -yy514: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy515; -yy515: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy516; -yy516: yyaccept = 21; +yy514: yyaccept = 24; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy517; + if(yych <= '/') goto yy515; if(yych <= '9') goto yy218; - goto yy517; + goto yy515; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy517; + goto yy515; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy517; + goto yy515; } else { - if(yych == '`') goto yy517; + if(yych == '`') goto yy515; if(yych <= 'z') goto yy218; - goto yy517; + goto yy515; } } -yy517: -#line 441 - { RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); } +yy515: +#line 444 + { RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); } +yy516: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy517; +yy517: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy518; yy518: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; + if(yych != 'p') goto yy219; goto yy519; yy519: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 't') goto yy219; goto yy520; -yy520: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'd') goto yy219; - goto yy521; -yy521: yyaccept = 22; +yy520: yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy522; + if(yych <= '/') goto yy521; if(yych <= '9') goto yy218; - goto yy522; + goto yy521; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy522; + goto yy521; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy522; + goto yy521; } else { - if(yych == '`') goto yy522; + if(yych == '`') goto yy521; if(yych <= 'z') goto yy218; - goto yy522; + goto yy521; } } -yy522: -#line 439 - { RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); } -yy523: yyaccept = 0; +yy521: +#line 442 + { RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); } +yy522: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'm') goto yy219; - goto yy524; -yy524: yyaccept = 23; + if(yych != 'y') goto yy219; + goto yy523; +yy523: yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy525; + if(yych <= '/') goto yy524; if(yych <= '9') goto yy218; - goto yy525; + goto yy524; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy525; + goto yy524; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy525; + goto yy524; } else { - if(yych == '`') goto yy525; + if(yych == '`') goto yy524; if(yych <= 'z') goto yy218; - goto yy525; + goto yy524; } } -yy525: -#line 449 - { RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); } +yy524: +#line 441 + { RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); } +yy525: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy526; yy526: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'n') goto yy577; - goto yy219; + if(yych != 'a') goto yy219; + goto yy527; yy527: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'd') goto yy513; - if(yych == 'o') goto yy570; - goto yy219; + if(yych != 'l') goto yy219; + goto yy528; yy528: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy497; - if(yych == 'i') goto yy563; - goto yy219; + if(yych != 'l') goto yy219; + goto yy529; yy529: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'r') goto yy560; - goto yy219; -yy530: yyaccept = 0; + if(yych != 'y') goto yy219; + goto yy530; +yy530: yyaccept = 27; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'x') goto yy554; - goto yy219; -yy531: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy541; - if(yych == 'p') goto yy542; - goto yy219; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy531; + if(yych <= '9') goto yy218; + goto yy531; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy531; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy531; + } else { + if(yych == '`') goto yy531; + if(yych <= 'z') goto yy218; + goto yy531; + } + } +yy531: +#line 443 + { RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); } yy532: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; + if(yych == 'l') goto yy472; + if(yych != 't') goto yy219; goto yy533; yy533: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy534; + switch(yych){ + case '1': goto yy534; + case '3': goto yy535; + case '6': goto yy536; + case '8': goto yy537; + default: goto yy219; + } yy534: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy535; + if(yych == '6') goto yy543; + goto yy219; yy535: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy536; + if(yych == '2') goto yy541; + goto yy219; yy536: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy537; -yy537: yyaccept = 0; + if(yych == '4') goto yy539; + goto yy219; +yy537: yyaccept = 28; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; - goto yy538; -yy538: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; - goto yy539; -yy539: yyaccept = 24; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy538; + if(yych <= '9') goto yy218; + goto yy538; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy538; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy538; + } else { + if(yych == '`') goto yy538; + if(yych <= 'z') goto yy218; + goto yy538; + } + } +yy538: +#line 432 + { RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); } +yy539: yyaccept = 29; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -4944,562 +5038,582 @@ yy539: yyaccept = 24; } } yy540: -#line 453 - { RET(s->act_in_cpp0x_mode ? T_RIGHTPAREN_ALT : T_IDENTIFIER); } -yy541: yyaccept = 0; +#line 435 + { RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); } +yy541: yyaccept = 30; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy550; - goto yy219; -yy542: yyaccept = 0; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy542; + if(yych <= '9') goto yy218; + goto yy542; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy542; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy542; + } else { + if(yych == '`') goto yy542; + if(yych <= 'z') goto yy218; + goto yy542; + } + } +yy542: +#line 434 + { RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); } +yy543: yyaccept = 31; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy543; -yy543: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy544; -yy544: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy545; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy544; + if(yych <= '9') goto yy218; + goto yy544; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy544; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy544; + } else { + if(yych == '`') goto yy544; + if(yych <= 'z') goto yy218; + goto yy544; + } + } +yy544: +#line 433 + { RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); } yy545: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy546; + if(yych == 'h') goto yy551; + goto yy219; yy546: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; + if(yych != 'i') goto yy219; goto yy547; yy547: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; + if(yych != 'l') goto yy219; goto yy548; -yy548: yyaccept = 25; +yy548: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy549; +yy549: yyaccept = 32; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy549; + if(yych <= '/') goto yy550; if(yych <= '9') goto yy218; - goto yy549; + goto yy550; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy549; + goto yy550; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy549; + goto yy550; } else { - if(yych == '`') goto yy549; + if(yych == '`') goto yy550; if(yych <= 'z') goto yy218; - goto yy549; + goto yy550; } } -yy549: -#line 452 - { RET(s->act_in_cpp0x_mode ? T_LEFTPAREN_ALT : T_IDENTIFIER); } -yy550: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'v') goto yy219; - goto yy551; +yy550: +#line 430 + { RET(T_WHILE); } yy551: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'a') goto yy219; goto yy552; -yy552: yyaccept = 26; +yy552: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy553; - if(yych <= '9') goto yy218; - goto yy553; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy553; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy553; - } else { - if(yych == '`') goto yy553; - if(yych <= 'z') goto yy218; - goto yy553; - } - } -yy553: -#line 447 - { RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); } + if(yych != 'r') goto yy219; + goto yy553; +yy553: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != '_') goto yy219; + goto yy554; yy554: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 't') goto yy219; goto yy555; -yy555: yyaccept = 0; +yy555: yyaccept = 33; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy556; -yy556: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; - goto yy557; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy556; + if(yych <= '9') goto yy218; + goto yy556; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy556; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy556; + } else { + if(yych == '`') goto yy556; + if(yych <= 'z') goto yy218; + goto yy556; + } + } +yy556: +#line 429 + { RET(T_WCHART); } yy557: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy558; -yy558: yyaccept = 27; + if(yych == 'r') goto yy569; + goto yy219; +yy558: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy559; - if(yych <= '9') goto yy218; - goto yy559; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy559; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy559; - } else { - if(yych == '`') goto yy559; - if(yych <= 'z') goto yy218; - goto yy559; - } - } -yy559: -#line 445 - { RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); } + if(yych == 'i') goto yy559; + if(yych == 'l') goto yy560; + goto yy219; +yy559: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'd') goto yy567; + goto yy219; yy560: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'y') goto yy219; + if(yych != 'a') goto yy219; goto yy561; -yy561: yyaccept = 28; +yy561: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy562; - if(yych <= '9') goto yy218; - goto yy562; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy562; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy562; - } else { - if(yych == '`') goto yy562; - if(yych <= 'z') goto yy218; - goto yy562; - } - } -yy562: -#line 444 - { RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); } + if(yych != 't') goto yy219; + goto yy562; +yy562: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'i') goto yy219; + goto yy563; yy563: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; + if(yych != 'l') goto yy219; goto yy564; yy564: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'e') goto yy219; goto yy565; -yy565: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy566; -yy566: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy567; -yy567: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'y') goto yy219; - goto yy568; -yy568: yyaccept = 29; +yy565: yyaccept = 34; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy569; + if(yych <= '/') goto yy566; if(yych <= '9') goto yy218; - goto yy569; + goto yy566; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy569; + goto yy566; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy569; + goto yy566; } else { - if(yych == '`') goto yy569; + if(yych == '`') goto yy566; if(yych <= 'z') goto yy218; - goto yy569; + goto yy566; } } -yy569: -#line 446 - { RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); } +yy566: +#line 428 + { RET(T_VOLATILE); } +yy567: yyaccept = 35; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy568; + if(yych <= '9') goto yy218; + goto yy568; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy568; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy568; + } else { + if(yych == '`') goto yy568; + if(yych <= 'z') goto yy218; + goto yy568; + } + } +yy568: +#line 427 + { RET(T_VOID); } +yy569: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy570; yy570: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'm') goto yy219; + if(yych != 'u') goto yy219; goto yy571; yy571: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'm') goto yy219; + if(yych != 'a') goto yy219; goto yy572; yy572: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'l') goto yy219; goto yy573; -yy573: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; - goto yy574; -yy574: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; - goto yy575; -yy575: yyaccept = 30; +yy573: yyaccept = 36; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy576; + if(yych <= '/') goto yy574; if(yych <= '9') goto yy218; - goto yy576; + goto yy574; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy576; + goto yy574; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy576; + goto yy574; } else { - if(yych == '`') goto yy576; + if(yych == '`') goto yy574; if(yych <= 'z') goto yy218; - goto yy576; + goto yy574; } } -yy576: -#line 451 - { RET(s->act_in_cpp0x_mode ? T_COMMA_ALT : T_IDENTIFIER); } +yy574: +#line 426 + { RET(T_VIRTUAL); } +yy575: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'i') goto yy581; + if(yych == 's') goto yy582; + goto yy219; +yy576: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'i') goto yy219; + goto yy577; yy577: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'l') goto yy492; - if(yych != 't') goto yy219; + if(yych != 'n') goto yy219; goto yy578; yy578: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case '1': goto yy579; - case '3': goto yy580; - case '6': goto yy581; - case '8': goto yy582; - default: goto yy219; + if(yych != 'g') goto yy219; + goto yy579; +yy579: yyaccept = 37; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy580; + if(yych <= '9') goto yy218; + goto yy580; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy580; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy580; + } else { + if(yych == '`') goto yy580; + if(yych <= 'z') goto yy218; + goto yy580; + } } -yy579: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '6') goto yy588; - goto yy219; -yy580: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '2') goto yy586; - goto yy219; +yy580: +#line 425 + { RET(T_USING); } yy581: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '4') goto yy584; + if(yych == 'o') goto yy589; goto yy219; -yy582: yyaccept = 31; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy583; - if(yych <= '9') goto yy218; - goto yy583; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy583; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy583; - } else { - if(yych == '`') goto yy583; - if(yych <= 'z') goto yy218; - goto yy583; - } - } -yy583: -#line 435 - { RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); } -yy584: yyaccept = 32; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy585; - if(yych <= '9') goto yy218; - goto yy585; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy585; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy585; - } else { - if(yych == '`') goto yy585; - if(yych <= 'z') goto yy218; - goto yy585; - } - } -yy585: -#line 438 - { RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); } -yy586: yyaccept = 33; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy587; - if(yych <= '9') goto yy218; - goto yy587; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy587; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy587; - } else { - if(yych == '`') goto yy587; - if(yych <= 'z') goto yy218; - goto yy587; - } - } -yy587: -#line 437 - { RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); } -yy588: yyaccept = 34; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy589; - if(yych <= '9') goto yy218; - goto yy589; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy589; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy589; - } else { - if(yych == '`') goto yy589; - if(yych <= 'z') goto yy218; - goto yy589; - } - } -yy589: -#line 436 - { RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); } -yy590: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'h') goto yy596; - goto yy219; -yy591: yyaccept = 0; +yy582: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'i') goto yy219; - goto yy592; -yy592: yyaccept = 0; + goto yy583; +yy583: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy593; -yy593: yyaccept = 0; + if(yych != 'g') goto yy219; + goto yy584; +yy584: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy585; +yy585: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy594; -yy594: yyaccept = 35; + goto yy586; +yy586: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'd') goto yy219; + goto yy587; +yy587: yyaccept = 38; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy595; + if(yych <= '/') goto yy588; if(yych <= '9') goto yy218; - goto yy595; + goto yy588; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy595; + goto yy588; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy595; + goto yy588; } else { - if(yych == '`') goto yy595; + if(yych == '`') goto yy588; if(yych <= 'z') goto yy218; - goto yy595; + goto yy588; } } -yy595: -#line 433 - { RET(T_WHILE); } +yy588: +#line 424 + { RET(T_UNSIGNED); } +yy589: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy590; +yy590: yyaccept = 39; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy591; + if(yych <= '9') goto yy218; + goto yy591; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy591; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy591; + } else { + if(yych == '`') goto yy591; + if(yych <= 'z') goto yy218; + goto yy591; + } + } +yy591: +#line 423 + { RET(T_UNION); } +yy592: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'm') goto yy622; + goto yy219; +yy593: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'i') goto yy615; + if(yych == 'r') goto yy616; + goto yy219; +yy594: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'u') goto yy610; + if(yych == 'y') goto yy611; + goto yy219; +yy595: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'p') goto yy219; + goto yy596; yy596: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'e') goto yy219; goto yy597; yy597: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy598; + if(yych <= 'h'){ + if(yych != 'd') goto yy219; + goto yy598; + } else { + if(yych <= 'i') goto yy599; + if(yych == 'n') goto yy600; + goto yy219; + } yy598: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; - goto yy599; + if(yych == 'e') goto yy607; + goto yy219; yy599: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy600; -yy600: yyaccept = 36; + if(yych == 'd') goto yy605; + goto yy219; +yy600: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy601; - if(yych <= '9') goto yy218; - goto yy601; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy601; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy601; - } else { - if(yych == '`') goto yy601; - if(yych <= 'z') goto yy218; - goto yy601; - } - } -yy601: -#line 432 - { RET(T_WCHART); } + if(yych != 'a') goto yy219; + goto yy601; +yy601: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'm') goto yy219; + goto yy602; yy602: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'r') goto yy614; - goto yy219; -yy603: yyaccept = 0; + if(yych != 'e') goto yy219; + goto yy603; +yy603: yyaccept = 40; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy604; - if(yych == 'l') goto yy605; - goto yy219; -yy604: yyaccept = 0; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy604; + if(yych <= '9') goto yy218; + goto yy604; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy604; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy604; + } else { + if(yych == '`') goto yy604; + if(yych <= 'z') goto yy218; + goto yy604; + } + } +yy604: +#line 422 + { RET(T_TYPENAME); } +yy605: yyaccept = 41; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'd') goto yy612; - goto yy219; -yy605: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy606; -yy606: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy607; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy606; + if(yych <= '9') goto yy218; + goto yy606; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy606; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy606; + } else { + if(yych == '`') goto yy606; + if(yych <= 'z') goto yy218; + goto yy606; + } + } +yy606: +#line 421 + { RET(T_TYPEID); } yy607: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; + if(yych != 'f') goto yy219; goto yy608; -yy608: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy609; -yy609: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy610; -yy610: yyaccept = 37; +yy608: yyaccept = 42; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy611; + if(yych <= '/') goto yy609; if(yych <= '9') goto yy218; - goto yy611; + goto yy609; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy611; + goto yy609; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy611; + goto yy609; } else { - if(yych == '`') goto yy611; + if(yych == '`') goto yy609; if(yych <= 'z') goto yy218; - goto yy611; + goto yy609; } } -yy611: -#line 431 - { RET(T_VOLATILE); } -yy612: yyaccept = 38; +yy609: +#line 420 + { RET(T_TYPEDEF); } +yy610: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'e') goto yy613; + goto yy219; +yy611: yyaccept = 43; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy613; + if(yych <= '/') goto yy612; if(yych <= '9') goto yy218; - goto yy613; + goto yy612; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy613; + goto yy612; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy613; + goto yy612; } else { - if(yych == '`') goto yy613; + if(yych == '`') goto yy612; if(yych <= 'z') goto yy218; - goto yy613; + goto yy612; } } -yy613: -#line 430 - { RET(T_VOID); } -yy614: yyaccept = 0; +yy612: +#line 419 + { RET(T_TRY); } +yy613: yyaccept = 44; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy615; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy614; + if(yych <= '9') goto yy218; + goto yy614; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy614; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy614; + } else { + if(yych == '`') goto yy614; + if(yych <= 'z') goto yy218; + goto yy614; + } + } +yy614: +#line 418 + { RET(T_TRUE); } yy615: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'u') goto yy219; - goto yy616; + if(yych == 's') goto yy620; + goto yy219; yy616: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'o') goto yy219; goto yy617; yy617: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; + if(yych != 'w') goto yy219; goto yy618; -yy618: yyaccept = 39; +yy618: yyaccept = 45; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -5522,289 +5636,266 @@ yy618: yyaccept = 39; } } yy619: -#line 429 - { RET(T_VIRTUAL); } -yy620: yyaccept = 0; +#line 417 + { RET(T_THROW); } +yy620: yyaccept = 46; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy626; - if(yych == 's') goto yy627; - goto yy219; -yy621: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; - goto yy622; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy621; + if(yych <= '9') goto yy218; + goto yy621; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy621; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy621; + } else { + if(yych == '`') goto yy621; + if(yych <= 'z') goto yy218; + goto yy621; + } + } +yy621: +#line 416 + { RET(T_THIS); } yy622: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; + if(yych != 'p') goto yy219; goto yy623; yy623: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'g') goto yy219; + if(yych != 'l') goto yy219; goto yy624; -yy624: yyaccept = 40; +yy624: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy625; - if(yych <= '9') goto yy218; - goto yy625; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy625; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy625; - } else { - if(yych == '`') goto yy625; - if(yych <= 'z') goto yy218; - goto yy625; - } - } -yy625: -#line 428 - { RET(T_USING); } + if(yych != 'a') goto yy219; + goto yy625; +yy625: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy626; yy626: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'o') goto yy634; - goto yy219; -yy627: yyaccept = 0; + if(yych != 'e') goto yy219; + goto yy627; +yy627: yyaccept = 47; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; - goto yy628; -yy628: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'g') goto yy219; - goto yy629; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy628; + if(yych <= '9') goto yy218; + goto yy628; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy628; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy628; + } else { + if(yych == '`') goto yy628; + if(yych <= 'z') goto yy218; + goto yy628; + } + } +yy628: +#line 415 + { RET(T_TEMPLATE); } yy629: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy630; + if(yych == 'o') goto yy664; + goto yy219; yy630: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy631; + if(yych == 'g') goto yy654; + if(yych == 'z') goto yy655; + goto yy219; yy631: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'd') goto yy219; - goto yy632; -yy632: yyaccept = 41; + if(yych == 'a') goto yy638; + if(yych == 'r') goto yy639; + goto yy219; +yy632: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy633; - if(yych <= '9') goto yy218; - goto yy633; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy633; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy633; - } else { - if(yych == '`') goto yy633; - if(yych <= 'z') goto yy218; - goto yy633; - } - } -yy633: -#line 427 - { RET(T_UNSIGNED); } + if(yych != 'i') goto yy219; + goto yy633; +yy633: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy634; yy634: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; + if(yych != 'c') goto yy219; goto yy635; -yy635: yyaccept = 42; +yy635: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'h') goto yy219; + goto yy636; +yy636: yyaccept = 48; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy636; + if(yych <= '/') goto yy637; if(yych <= '9') goto yy218; - goto yy636; + goto yy637; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy636; + goto yy637; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy636; + goto yy637; } else { - if(yych == '`') goto yy636; + if(yych == '`') goto yy637; if(yych <= 'z') goto yy218; - goto yy636; + goto yy637; } } -yy636: -#line 426 - { RET(T_UNION); } -yy637: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'm') goto yy667; - goto yy219; +yy637: +#line 414 + { RET(T_SWITCH); } yy638: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy660; - if(yych == 'r') goto yy661; + if(yych == 't') goto yy644; goto yy219; yy639: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'u') goto yy655; - if(yych == 'y') goto yy656; - goto yy219; + if(yych != 'u') goto yy219; + goto yy640; yy640: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; + if(yych != 'c') goto yy219; goto yy641; yy641: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 't') goto yy219; goto yy642; -yy642: yyaccept = 0; +yy642: yyaccept = 49; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'h'){ - if(yych != 'd') goto yy219; - goto yy643; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy643; + if(yych <= '9') goto yy218; + goto yy643; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy643; + } } else { - if(yych <= 'i') goto yy644; - if(yych == 'n') goto yy645; - goto yy219; + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy643; + } else { + if(yych == '`') goto yy643; + if(yych <= 'z') goto yy218; + goto yy643; + } } -yy643: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy652; - goto yy219; +yy643: +#line 413 + { RET(T_STRUCT); } yy644: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'd') goto yy650; - goto yy219; + if(yych != 'i') goto yy219; + goto yy645; yy645: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'c') goto yy219; goto yy646; -yy646: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'm') goto yy219; - goto yy647; -yy647: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy648; -yy648: yyaccept = 43; +yy646: yyaccept = 50; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy649; + if(yych <= '/') goto yy647; if(yych <= '9') goto yy218; - goto yy649; + goto yy647; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy649; + goto yy647; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy649; + goto yy647; } else { - if(yych == '`') goto yy649; + if(yych <= '_') goto yy648; + if(yych <= '`') goto yy647; if(yych <= 'z') goto yy218; - goto yy649; + goto yy647; } } -yy649: -#line 425 - { RET(T_TYPENAME); } -yy650: yyaccept = 44; +yy647: +#line 411 + { RET(T_STATIC); } +yy648: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy649; +yy649: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'a') goto yy219; + goto yy650; +yy650: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 's') goto yy219; + goto yy651; +yy651: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy652; +yy652: yyaccept = 51; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy651; + if(yych <= '/') goto yy653; if(yych <= '9') goto yy218; - goto yy651; + goto yy653; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy651; + goto yy653; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy651; + goto yy653; } else { - if(yych == '`') goto yy651; + if(yych == '`') goto yy653; if(yych <= 'z') goto yy218; - goto yy651; + goto yy653; } } -yy651: -#line 424 - { RET(T_TYPEID); } -yy652: yyaccept = 0; +yy653: +#line 412 + { RET(T_STATICCAST); } +yy654: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'f') goto yy219; - goto yy653; -yy653: yyaccept = 45; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy654; - if(yych <= '9') goto yy218; - goto yy654; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy654; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy654; - } else { - if(yych == '`') goto yy654; - if(yych <= 'z') goto yy218; - goto yy654; - } - } -yy654: -#line 423 - { RET(T_TYPEDEF); } + if(yych == 'n') goto yy660; + goto yy219; yy655: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy658; - goto yy219; -yy656: yyaccept = 46; + if(yych != 'e') goto yy219; + goto yy656; +yy656: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy657; - if(yych <= '9') goto yy218; - goto yy657; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy657; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy657; - } else { - if(yych == '`') goto yy657; - if(yych <= 'z') goto yy218; - goto yy657; - } - } -yy657: -#line 422 - { RET(T_TRY); } -yy658: yyaccept = 47; + if(yych != 'o') goto yy219; + goto yy657; +yy657: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'f') goto yy219; + goto yy658; +yy658: yyaccept = 52; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -5827,637 +5918,653 @@ yy658: yyaccept = 47; } } yy659: -#line 421 - { RET(T_TRUE); } +#line 410 + { RET(T_SIZEOF); } yy660: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 's') goto yy665; - goto yy219; + if(yych != 'e') goto yy219; + goto yy661; yy661: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'o') goto yy219; + if(yych != 'd') goto yy219; goto yy662; -yy662: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'w') goto yy219; - goto yy663; -yy663: yyaccept = 48; +yy662: yyaccept = 53; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy664; + if(yych <= '/') goto yy663; if(yych <= '9') goto yy218; - goto yy664; + goto yy663; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy664; + goto yy663; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy664; + goto yy663; } else { - if(yych == '`') goto yy664; + if(yych == '`') goto yy663; if(yych <= 'z') goto yy218; - goto yy664; + goto yy663; } } -yy664: -#line 420 - { RET(T_THROW); } -yy665: yyaccept = 49; +yy663: +#line 409 + { RET(T_SIGNED); } +yy664: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy666; - if(yych <= '9') goto yy218; - goto yy666; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy666; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy666; - } else { - if(yych == '`') goto yy666; - if(yych <= 'z') goto yy218; - goto yy666; - } - } -yy666: -#line 419 - { RET(T_THIS); } -yy667: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; - goto yy668; -yy668: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy669; -yy669: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy670; -yy670: yyaccept = 0; + if(yych != 'r') goto yy219; + goto yy665; +yy665: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy671; -yy671: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy672; -yy672: yyaccept = 50; + goto yy666; +yy666: yyaccept = 54; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy673; + if(yych <= '/') goto yy667; if(yych <= '9') goto yy218; - goto yy673; + goto yy667; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy673; + goto yy667; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy673; + goto yy667; } else { - if(yych == '`') goto yy673; + if(yych == '`') goto yy667; if(yych <= 'z') goto yy218; - goto yy673; + goto yy667; } } -yy673: -#line 418 - { RET(T_TEMPLATE); } -yy674: yyaccept = 0; +yy667: +#line 408 + { RET(T_SHORT); } +yy668: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'o') goto yy709; - goto yy219; -yy675: yyaccept = 0; + if(yych <= 'h'){ + if(yych != 'g') goto yy219; + goto yy669; + } else { + if(yych <= 'i') goto yy670; + if(yych == 't') goto yy671; + goto yy219; + } +yy669: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'g') goto yy699; - if(yych == 'z') goto yy700; + if(yych == 'i') goto yy690; goto yy219; +yy670: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'n') goto yy676; + goto yy219; +yy671: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'u') goto yy219; + goto yy672; +yy672: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'r') goto yy219; + goto yy673; +yy673: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy674; +yy674: yyaccept = 55; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy675; + if(yych <= '9') goto yy218; + goto yy675; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy675; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy675; + } else { + if(yych == '`') goto yy675; + if(yych <= 'z') goto yy218; + goto yy675; + } + } +yy675: +#line 407 + { RET(T_RETURN); } yy676: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy683; - if(yych == 'r') goto yy684; - goto yy219; + if(yych != 't') goto yy219; + goto yy677; yy677: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; + if(yych != 'e') goto yy219; goto yy678; yy678: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'r') goto yy219; goto yy679; yy679: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 'p') goto yy219; goto yy680; yy680: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'h') goto yy219; + if(yych != 'r') goto yy219; goto yy681; -yy681: yyaccept = 51; +yy681: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy682; - if(yych <= '9') goto yy218; - goto yy682; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy682; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy682; - } else { - if(yych == '`') goto yy682; - if(yych <= 'z') goto yy218; - goto yy682; - } - } -yy682: -#line 417 - { RET(T_SWITCH); } + if(yych != 'e') goto yy219; + goto yy682; +yy682: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy683; yy683: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 't') goto yy689; - goto yy219; + if(yych != '_') goto yy219; + goto yy684; yy684: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'u') goto yy219; + if(yych != 'c') goto yy219; goto yy685; yy685: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 'a') goto yy219; goto yy686; yy686: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 's') goto yy219; goto yy687; -yy687: yyaccept = 52; +yy687: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy688; +yy688: yyaccept = 56; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy688; + if(yych <= '/') goto yy689; if(yych <= '9') goto yy218; - goto yy688; + goto yy689; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy688; + goto yy689; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy688; + goto yy689; } else { - if(yych == '`') goto yy688; + if(yych == '`') goto yy689; if(yych <= 'z') goto yy218; - goto yy688; + goto yy689; } } -yy688: -#line 416 - { RET(T_STRUCT); } -yy689: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; - goto yy690; +yy689: +#line 406 + { RET(T_REINTERPRETCAST); } yy690: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy691; -yy691: yyaccept = 53; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy692; - if(yych <= '9') goto yy218; - goto yy692; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy692; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy692; - } else { - if(yych <= '_') goto yy693; - if(yych <= '`') goto yy692; - if(yych <= 'z') goto yy218; - goto yy692; - } - } -yy692: -#line 414 - { RET(T_STATIC); } -yy693: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy694; -yy694: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy695; -yy695: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 's') goto yy219; - goto yy696; -yy696: yyaccept = 0; + goto yy691; +yy691: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy697; -yy697: yyaccept = 54; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy698; - if(yych <= '9') goto yy218; - goto yy698; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy698; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy698; - } else { - if(yych == '`') goto yy698; - if(yych <= 'z') goto yy218; - goto yy698; - } - } -yy698: -#line 415 - { RET(T_STATICCAST); } -yy699: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'n') goto yy705; - goto yy219; -yy700: yyaccept = 0; + goto yy692; +yy692: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy701; -yy701: yyaccept = 0; + goto yy693; +yy693: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'o') goto yy219; - goto yy702; -yy702: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'f') goto yy219; - goto yy703; -yy703: yyaccept = 55; + if(yych != 'r') goto yy219; + goto yy694; +yy694: yyaccept = 57; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy704; + if(yych <= '/') goto yy695; if(yych <= '9') goto yy218; - goto yy704; + goto yy695; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy704; + goto yy695; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy704; + goto yy695; } else { - if(yych == '`') goto yy704; + if(yych == '`') goto yy695; if(yych <= 'z') goto yy218; - goto yy704; + goto yy695; } } -yy704: -#line 413 - { RET(T_SIZEOF); } +yy695: +#line 405 + { RET(T_REGISTER); } +yy696: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'i') goto yy703; + if(yych == 'o') goto yy704; + goto yy219; +yy697: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'b') goto yy219; + goto yy698; +yy698: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy699; +yy699: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'i') goto yy219; + goto yy700; +yy700: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy701; +yy701: yyaccept = 58; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy702; + if(yych <= '9') goto yy218; + goto yy702; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy702; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy702; + } else { + if(yych == '`') goto yy702; + if(yych <= 'z') goto yy218; + goto yy702; + } + } +yy702: +#line 404 + { RET(T_PUBLIC); } +yy703: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'v') goto yy712; + goto yy219; +yy704: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy705; yy705: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; goto yy706; yy706: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'd') goto yy219; + if(yych != 'c') goto yy219; goto yy707; -yy707: yyaccept = 56; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy708; - if(yych <= '9') goto yy218; - goto yy708; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy708; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy708; - } else { - if(yych == '`') goto yy708; - if(yych <= 'z') goto yy218; - goto yy708; - } - } -yy708: -#line 412 - { RET(T_SIGNED); } -yy709: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy710; -yy710: yyaccept = 0; +yy707: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy711; -yy711: yyaccept = 57; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy712; - if(yych <= '9') goto yy218; - goto yy712; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy712; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy712; - } else { - if(yych == '`') goto yy712; - if(yych <= 'z') goto yy218; - goto yy712; - } - } -yy712: -#line 411 - { RET(T_SHORT); } -yy713: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'h'){ - if(yych != 'g') goto yy219; - goto yy714; - } else { - if(yych <= 'i') goto yy715; - if(yych == 't') goto yy716; - goto yy219; - } -yy714: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy735; - goto yy219; -yy715: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'n') goto yy721; - goto yy219; -yy716: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'u') goto yy219; - goto yy717; -yy717: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy718; -yy718: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy719; -yy719: yyaccept = 58; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy720; - if(yych <= '9') goto yy218; - goto yy720; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy720; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy720; - } else { - if(yych == '`') goto yy720; - if(yych <= 'z') goto yy218; - goto yy720; - } - } -yy720: -#line 410 - { RET(T_RETURN); } -yy721: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy722; -yy722: yyaccept = 0; + goto yy708; +yy708: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy723; -yy723: yyaccept = 0; + goto yy709; +yy709: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy724; + if(yych != 'd') goto yy219; + goto yy710; +yy710: yyaccept = 59; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy711; + if(yych <= '9') goto yy218; + goto yy711; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy711; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy711; + } else { + if(yych == '`') goto yy711; + if(yych <= 'z') goto yy218; + goto yy711; + } + } +yy711: +#line 403 + { RET(T_PROTECTED); } +yy712: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'a') goto yy219; + goto yy713; +yy713: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy714; +yy714: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy715; +yy715: yyaccept = 60; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy716; + if(yych <= '9') goto yy218; + goto yy716; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy716; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy716; + } else { + if(yych == '`') goto yy716; + if(yych <= 'z') goto yy218; + goto yy716; + } + } +yy716: +#line 402 + { RET(T_PRIVATE); } +yy717: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'e') goto yy724; + goto yy219; +yy718: yyaccept = 61; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy719; + if(yych <= '9') goto yy218; + goto yy719; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy719; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy719; + } else { + if(yych <= '_') goto yy720; + if(yych <= '`') goto yy719; + if(yych <= 'z') goto yy218; + goto yy719; + } + } +yy719: +#line 543 + { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); } +yy720: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy721; +yy721: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'q') goto yy219; + goto yy722; +yy722: yyaccept = 62; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy723; + if(yych <= '9') goto yy218; + goto yy723; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy723; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy723; + } else { + if(yych == '`') goto yy723; + if(yych <= 'z') goto yy218; + goto yy723; + } + } +yy723: +#line 527 + { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); } yy724: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; + if(yych != 'r') goto yy219; goto yy725; yy725: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; + if(yych != 'a') goto yy219; goto yy726; yy726: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 't') goto yy219; goto yy727; yy727: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'o') goto yy219; goto yy728; yy728: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; + if(yych != 'r') goto yy219; goto yy729; -yy729: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy730; -yy730: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy731; -yy731: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy732; -yy732: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy733; -yy733: yyaccept = 59; +yy729: yyaccept = 63; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy734; + if(yych <= '/') goto yy730; if(yych <= '9') goto yy218; - goto yy734; + goto yy730; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy734; + goto yy730; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy734; + goto yy730; } else { - if(yych == '`') goto yy734; + if(yych == '`') goto yy730; if(yych <= 'z') goto yy218; - goto yy734; + goto yy730; } } -yy734: -#line 409 - { RET(T_REINTERPRETCAST); } -yy735: yyaccept = 0; +yy730: +#line 401 + { RET(T_OPERATOR); } +yy731: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy736; -yy736: yyaccept = 0; + if(yych == 'm') goto yy742; + goto yy219; +yy732: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'w') goto yy740; + goto yy219; +yy733: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; + goto yy734; +yy734: yyaccept = 64; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy735; + if(yych <= '9') goto yy218; + goto yy735; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy735; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy735; + } else { + if(yych <= '_') goto yy736; + if(yych <= '`') goto yy735; + if(yych <= 'z') goto yy218; + goto yy735; + } + } +yy735: +#line 512 + { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); } +yy736: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; goto yy737; yy737: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'q') goto yy219; goto yy738; -yy738: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy739; -yy739: yyaccept = 60; +yy738: yyaccept = 65; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy740; + if(yych <= '/') goto yy739; if(yych <= '9') goto yy218; - goto yy740; + goto yy739; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy740; + goto yy739; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy740; + goto yy739; } else { - if(yych == '`') goto yy740; + if(yych == '`') goto yy739; if(yych <= 'z') goto yy218; - goto yy740; + goto yy739; } } -yy740: -#line 408 - { RET(T_REGISTER); } -yy741: yyaccept = 0; +yy739: +#line 535 + { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); } +yy740: yyaccept = 66; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy748; - if(yych == 'o') goto yy749; - goto yy219; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy741; + if(yych <= '9') goto yy218; + goto yy741; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy741; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy741; + } else { + if(yych == '`') goto yy741; + if(yych <= 'z') goto yy218; + goto yy741; + } + } +yy741: +#line 400 + { RET(T_NEW); } yy742: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'b') goto yy219; + if(yych != 'e') goto yy219; goto yy743; yy743: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; + if(yych != 's') goto yy219; goto yy744; yy744: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; + if(yych != 'p') goto yy219; goto yy745; yy745: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 'a') goto yy219; goto yy746; -yy746: yyaccept = 61; +yy746: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'c') goto yy219; + goto yy747; +yy747: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy748; +yy748: yyaccept = 67; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy747; + if(yych <= '/') goto yy749; if(yych <= '9') goto yy218; - goto yy747; + goto yy749; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy747; + goto yy749; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy747; + goto yy749; } else { - if(yych == '`') goto yy747; + if(yych == '`') goto yy749; if(yych <= 'z') goto yy218; - goto yy747; + goto yy749; } } -yy747: -#line 407 - { RET(T_PUBLIC); } -yy748: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'v') goto yy757; - goto yy219; -yy749: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy750; +yy749: +#line 399 + { RET(T_NAMESPACE); } yy750: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 't') goto yy219; goto yy751; yy751: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 'a') goto yy219; goto yy752; yy752: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'b') goto yy219; goto yy753; yy753: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'l') goto yy219; goto yy754; yy754: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'd') goto yy219; + if(yych != 'e') goto yy219; goto yy755; -yy755: yyaccept = 62; +yy755: yyaccept = 68; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -6480,116 +6587,133 @@ yy755: yyaccept = 62; } } yy756: -#line 406 - { RET(T_PROTECTED); } +#line 398 + { RET(T_MUTABLE); } yy757: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'n') goto yy219; goto yy758; yy758: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'g') goto yy219; goto yy759; -yy759: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy760; -yy760: yyaccept = 63; +yy759: yyaccept = 69; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy761; + if(yych <= '/') goto yy760; if(yych <= '9') goto yy218; - goto yy761; + goto yy760; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy761; + goto yy760; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy761; + goto yy760; } else { - if(yych == '`') goto yy761; + if(yych == '`') goto yy760; if(yych <= 'z') goto yy218; - goto yy761; + goto yy760; } } -yy761: -#line 405 - { RET(T_PRIVATE); } -yy762: yyaccept = 0; +yy760: +#line 397 + { RET(T_LONG); } +yy761: yyaccept = 70; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy769; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy762; + if(yych <= '9') goto yy218; + goto yy762; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy762; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy762; + } else { + if(yych == '`') goto yy762; + if(yych <= 'z') goto yy218; + goto yy762; + } + } +yy762: +#line 394 + { RET(T_IF); } +yy763: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'l') goto yy764; + if(yych == 't') goto yy765; goto yy219; -yy763: yyaccept = 64; +yy764: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'i') goto yy767; + goto yy219; +yy765: yyaccept = 71; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy764; + if(yych <= '/') goto yy766; if(yych <= '9') goto yy218; - goto yy764; + goto yy766; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy764; + goto yy766; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy764; + goto yy766; } else { - if(yych <= '_') goto yy765; - if(yych <= '`') goto yy764; + if(yych == '`') goto yy766; if(yych <= 'z') goto yy218; - goto yy764; + goto yy766; } } -yy764: -#line 550 - { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); } -yy765: yyaccept = 0; +yy766: +#line 396 + { RET(T_INT); } +yy767: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy768; +yy768: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy766; -yy766: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'q') goto yy219; - goto yy767; -yy767: yyaccept = 65; + goto yy769; +yy769: yyaccept = 72; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy768; + if(yych <= '/') goto yy770; if(yych <= '9') goto yy218; - goto yy768; + goto yy770; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy768; + goto yy770; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy768; + goto yy770; } else { - if(yych == '`') goto yy768; + if(yych == '`') goto yy770; if(yych <= 'z') goto yy218; - goto yy768; + goto yy770; } } -yy768: -#line 534 - { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); } -yy769: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy770; -yy770: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy771; +yy770: +#line 395 + { RET(T_INLINE); } yy771: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; @@ -6598,259 +6722,243 @@ yy772: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'o') goto yy219; goto yy773; -yy773: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy774; -yy774: yyaccept = 66; +yy773: yyaccept = 73; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy775; + if(yych <= '/') goto yy774; if(yych <= '9') goto yy218; - goto yy775; + goto yy774; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy775; + goto yy774; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy775; + goto yy774; } else { - if(yych == '`') goto yy775; + if(yych == '`') goto yy774; if(yych <= 'z') goto yy218; - goto yy775; + goto yy774; } } -yy775: -#line 404 - { RET(T_OPERATOR); } +yy774: +#line 393 + { RET(T_GOTO); } +yy775: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'l') goto yy790; + goto yy219; yy776: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'm') goto yy787; + if(yych == 'o') goto yy786; goto yy219; yy777: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'w') goto yy785; + if(yych == 'r') goto yy784; goto yy219; yy778: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'i') goto yy219; goto yy779; -yy779: yyaccept = 67; +yy779: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy780; - if(yych <= '9') goto yy218; - goto yy780; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy780; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy780; - } else { - if(yych <= '_') goto yy781; - if(yych <= '`') goto yy780; - if(yych <= 'z') goto yy218; - goto yy780; - } - } -yy780: -#line 519 - { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); } + if(yych != 'e') goto yy219; + goto yy780; +yy780: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'n') goto yy219; + goto yy781; yy781: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'd') goto yy219; goto yy782; -yy782: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'q') goto yy219; - goto yy783; -yy783: yyaccept = 68; +yy782: yyaccept = 74; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy784; + if(yych <= '/') goto yy783; if(yych <= '9') goto yy218; - goto yy784; + goto yy783; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy784; + goto yy783; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy784; + goto yy783; } else { - if(yych == '`') goto yy784; + if(yych == '`') goto yy783; if(yych <= 'z') goto yy218; - goto yy784; + goto yy783; } } -yy784: -#line 542 - { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); } -yy785: yyaccept = 69; +yy783: +#line 392 + { RET(T_FRIEND); } +yy784: yyaccept = 75; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy786; + if(yych <= '/') goto yy785; if(yych <= '9') goto yy218; - goto yy786; + goto yy785; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy786; + goto yy785; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy786; + goto yy785; } else { - if(yych == '`') goto yy786; + if(yych == '`') goto yy785; if(yych <= 'z') goto yy218; - goto yy786; + goto yy785; } } -yy786: -#line 403 - { RET(T_NEW); } -yy787: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy788; -yy788: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy789; -yy789: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; - goto yy790; -yy790: yyaccept = 0; +yy785: +#line 391 + { RET(T_FOR); } +yy786: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'a') goto yy219; + goto yy787; +yy787: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy788; +yy788: yyaccept = 76; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy789; + if(yych <= '9') goto yy218; + goto yy789; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy789; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy789; + } else { + if(yych == '`') goto yy789; + if(yych <= 'z') goto yy218; + goto yy789; + } + } +yy789: +#line 390 + { RET(T_FLOAT); } +yy790: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 's') goto yy219; goto yy791; yy791: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy792; -yy792: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy793; -yy793: yyaccept = 70; + goto yy792; +yy792: yyaccept = 77; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy794; + if(yych <= '/') goto yy793; if(yych <= '9') goto yy218; - goto yy794; + goto yy793; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy794; + goto yy793; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy794; + goto yy793; } else { - if(yych == '`') goto yy794; + if(yych == '`') goto yy793; if(yych <= 'z') goto yy218; - goto yy794; + goto yy793; } } -yy794: -#line 402 - { RET(T_NAMESPACE); } +yy793: +#line 389 + { RET(T_FALSE); } +yy794: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 's') goto yy816; + goto yy219; yy795: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy796; + if(yych == 'u') goto yy813; + goto yy219; yy796: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy797; + if(yych == 'p') goto yy797; + if(yych == 't') goto yy798; + goto yy219; yy797: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'b') goto yy219; - goto yy798; + if(yych == 'l') goto yy803; + if(yych == 'o') goto yy804; + goto yy219; yy798: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; + if(yych != 'e') goto yy219; goto yy799; yy799: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'r') goto yy219; goto yy800; -yy800: yyaccept = 71; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy801; - if(yych <= '9') goto yy218; - goto yy801; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy801; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy801; - } else { - if(yych == '`') goto yy801; - if(yych <= 'z') goto yy218; - goto yy801; - } - } -yy801: -#line 401 - { RET(T_MUTABLE); } -yy802: yyaccept = 0; +yy800: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'n') goto yy219; - goto yy803; -yy803: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'g') goto yy219; - goto yy804; -yy804: yyaccept = 72; + goto yy801; +yy801: yyaccept = 78; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy805; + if(yych <= '/') goto yy802; if(yych <= '9') goto yy218; - goto yy805; + goto yy802; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy805; + goto yy802; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy805; + goto yy802; } else { - if(yych == '`') goto yy805; + if(yych == '`') goto yy802; if(yych <= 'z') goto yy218; - goto yy805; + goto yy802; } } -yy805: -#line 400 - { RET(T_LONG); } -yy806: yyaccept = 73; +yy802: +#line 388 + { RET(T_EXTERN); } +yy803: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'i') goto yy808; + goto yy219; +yy804: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'r') goto yy219; + goto yy805; +yy805: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy806; +yy806: yyaccept = 79; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -6873,51 +6981,50 @@ yy806: yyaccept = 73; } } yy807: -#line 397 - { RET(T_IF); } +#line 387 + { RET(T_EXPORT); } yy808: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'l') goto yy809; - if(yych == 't') goto yy810; - goto yy219; + if(yych != 'c') goto yy219; + goto yy809; yy809: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy812; - goto yy219; -yy810: yyaccept = 74; + if(yych != 'i') goto yy219; + goto yy810; +yy810: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 't') goto yy219; + goto yy811; +yy811: yyaccept = 80; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy811; + if(yych <= '/') goto yy812; if(yych <= '9') goto yy218; - goto yy811; + goto yy812; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy811; + goto yy812; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy811; + goto yy812; } else { - if(yych == '`') goto yy811; + if(yych == '`') goto yy812; if(yych <= 'z') goto yy218; - goto yy811; + goto yy812; } } -yy811: -#line 399 - { RET(T_INT); } -yy812: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy813; +yy812: +#line 386 + { RET(T_EXPLICIT); } yy813: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'm') goto yy219; goto yy814; -yy814: yyaccept = 75; +yy814: yyaccept = 81; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -6940,161 +7047,147 @@ yy814: yyaccept = 75; } } yy815: -#line 398 - { RET(T_INLINE); } +#line 385 + { RET(T_ENUM); } yy816: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'e') goto yy219; goto yy817; -yy817: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'o') goto yy219; - goto yy818; -yy818: yyaccept = 76; +yy817: yyaccept = 82; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy819; + if(yych <= '/') goto yy818; if(yych <= '9') goto yy218; - goto yy819; + goto yy818; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy819; + goto yy818; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy819; + goto yy818; } else { - if(yych == '`') goto yy819; + if(yych == '`') goto yy818; if(yych <= 'z') goto yy218; - goto yy819; + goto yy818; } } -yy819: -#line 396 - { RET(T_GOTO); } -yy820: yyaccept = 0; +yy818: +#line 384 + { RET(T_ELSE); } +yy819: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'l') goto yy835; + if(yych == 'f') goto yy839; + if(yych == 'l') goto yy840; goto yy219; -yy821: yyaccept = 0; +yy820: yyaccept = 83; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'o') goto yy831; - goto yy219; + if(yych <= '['){ + if(yych <= '>'){ + if(yych <= '/') goto yy821; + if(yych <= '9') goto yy218; + goto yy821; + } else { + if(yych <= '?') goto yy221; + if(yych <= '@') goto yy821; + if(yych <= 'Z') goto yy218; + goto yy821; + } + } else { + if(yych <= '`'){ + if(yych <= '\\') goto yy220; + if(yych == '_') goto yy218; + goto yy821; + } else { + if(yych == 'u') goto yy834; + if(yych <= 'z') goto yy218; + goto yy821; + } + } +yy821: +#line 381 + { RET(T_DO); } yy822: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'r') goto yy829; - goto yy219; + if(yych != 'n') goto yy219; + goto yy823; yy823: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; + if(yych != 'a') goto yy219; goto yy824; yy824: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'm') goto yy219; goto yy825; yy825: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; + if(yych != 'i') goto yy219; goto yy826; yy826: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'd') goto yy219; + if(yych != 'c') goto yy219; goto yy827; -yy827: yyaccept = 77; +yy827: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy828; - if(yych <= '9') goto yy218; - goto yy828; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy828; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy828; - } else { - if(yych == '`') goto yy828; - if(yych <= 'z') goto yy218; - goto yy828; - } - } -yy828: -#line 395 - { RET(T_FRIEND); } -yy829: yyaccept = 78; + if(yych != '_') goto yy219; + goto yy828; +yy828: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy830; - if(yych <= '9') goto yy218; - goto yy830; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy830; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy830; - } else { - if(yych == '`') goto yy830; - if(yych <= 'z') goto yy218; - goto yy830; - } - } -yy830: -#line 394 - { RET(T_FOR); } -yy831: yyaccept = 0; + if(yych != 'c') goto yy219; + goto yy829; +yy829: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'a') goto yy219; - goto yy832; -yy832: yyaccept = 0; + goto yy830; +yy830: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 's') goto yy219; + goto yy831; +yy831: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy833; -yy833: yyaccept = 79; + goto yy832; +yy832: yyaccept = 84; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy834; + if(yych <= '/') goto yy833; if(yych <= '9') goto yy218; - goto yy834; + goto yy833; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy834; + goto yy833; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy834; + goto yy833; } else { - if(yych == '`') goto yy834; + if(yych == '`') goto yy833; if(yych <= 'z') goto yy218; - goto yy834; + goto yy833; } } -yy834: -#line 393 - { RET(T_FLOAT); } +yy833: +#line 383 + { RET(T_DYNAMICCAST); } +yy834: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'b') goto yy219; + goto yy835; yy835: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; + if(yych != 'l') goto yy219; goto yy836; yy836: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; goto yy837; -yy837: yyaccept = 80; +yy837: yyaccept = 85; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -7117,383 +7210,402 @@ yy837: yyaccept = 80; } } yy838: -#line 392 - { RET(T_FALSE); } +#line 382 + { RET(T_DOUBLE); } yy839: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 's') goto yy861; + if(yych == 'a') goto yy845; goto yy219; yy840: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'u') goto yy858; - goto yy219; + if(yych != 'e') goto yy219; + goto yy841; yy841: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'p') goto yy842; - if(yych == 't') goto yy843; - goto yy219; + if(yych != 't') goto yy219; + goto yy842; yy842: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'l') goto yy848; - if(yych == 'o') goto yy849; - goto yy219; -yy843: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy844; -yy844: yyaccept = 0; + goto yy843; +yy843: yyaccept = 86; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy845; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy844; + if(yych <= '9') goto yy218; + goto yy844; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy844; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy844; + } else { + if(yych == '`') goto yy844; + if(yych <= 'z') goto yy218; + goto yy844; + } + } +yy844: +#line 380 + { RET(T_DELETE); } yy845: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; + if(yych != 'u') goto yy219; goto yy846; -yy846: yyaccept = 81; +yy846: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy847; - if(yych <= '9') goto yy218; - goto yy847; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy847; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy847; - } else { - if(yych == '`') goto yy847; - if(yych <= 'z') goto yy218; - goto yy847; - } - } -yy847: -#line 391 - { RET(T_EXTERN); } -yy848: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'i') goto yy853; - goto yy219; -yy849: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy850; -yy850: yyaccept = 0; + if(yych != 'l') goto yy219; + goto yy847; +yy847: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy851; -yy851: yyaccept = 82; + goto yy848; +yy848: yyaccept = 87; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy852; + if(yych <= '/') goto yy849; if(yych <= '9') goto yy218; - goto yy852; + goto yy849; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy852; + goto yy849; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy852; + goto yy849; } else { - if(yych == '`') goto yy852; + if(yych == '`') goto yy849; if(yych <= 'z') goto yy218; - goto yy852; + goto yy849; } } -yy852: -#line 390 - { RET(T_EXPORT); } +yy849: +#line 379 + { RET(T_DEFAULT); } +yy850: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'r') goto yy219; + if(yych <= 's') goto yy881; + if(yych <= 't') goto yy882; + goto yy219; +yy851: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'a') goto yy878; + goto yy219; +yy852: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'a') goto yy874; + goto yy219; yy853: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych <= 'l') goto yy219; + if(yych <= 'm') goto yy855; + if(yych >= 'o') goto yy219; goto yy854; yy854: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; - goto yy855; + if(yych <= 'r') goto yy219; + if(yych <= 's') goto yy859; + if(yych <= 't') goto yy860; + goto yy219; yy855: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'p') goto yy219; goto yy856; -yy856: yyaccept = 83; +yy856: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'l') goto yy219; + goto yy857; +yy857: yyaccept = 88; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy857; + if(yych <= '/') goto yy858; if(yych <= '9') goto yy218; - goto yy857; + goto yy858; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy857; + goto yy858; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy857; + goto yy858; } else { - if(yych == '`') goto yy857; + if(yych == '`') goto yy858; if(yych <= 'z') goto yy218; - goto yy857; + goto yy858; } } -yy857: -#line 389 - { RET(T_EXPLICIT); } -yy858: yyaccept = 0; +yy858: +#line 510 + { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); } +yy859: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'm') goto yy219; - goto yy859; -yy859: yyaccept = 84; + if(yych == 't') goto yy866; + goto yy219; +yy860: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy860; - if(yych <= '9') goto yy218; - goto yy860; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy860; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy860; - } else { - if(yych == '`') goto yy860; - if(yych <= 'z') goto yy218; - goto yy860; - } - } -yy860: -#line 388 - { RET(T_ENUM); } + if(yych != 'i') goto yy219; + goto yy861; yy861: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; + if(yych != 'n') goto yy219; goto yy862; -yy862: yyaccept = 85; +yy862: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'u') goto yy219; + goto yy863; +yy863: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != 'e') goto yy219; + goto yy864; +yy864: yyaccept = 89; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy863; + if(yych <= '/') goto yy865; if(yych <= '9') goto yy218; - goto yy863; + goto yy865; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy863; + goto yy865; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy863; + goto yy865; } else { - if(yych == '`') goto yy863; + if(yych == '`') goto yy865; if(yych <= 'z') goto yy218; - goto yy863; + goto yy865; } } -yy863: -#line 387 - { RET(T_ELSE); } -yy864: yyaccept = 0; +yy865: +#line 378 + { RET(T_CONTINUE); } +yy866: yyaccept = 90; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'f') goto yy884; - if(yych == 'l') goto yy885; - goto yy219; -yy865: yyaccept = 86; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '['){ + if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy866; + if(yych <= '/') goto yy867; if(yych <= '9') goto yy218; - goto yy866; + goto yy867; } else { if(yych <= '?') goto yy221; - if(yych <= '@') goto yy866; - if(yych <= 'Z') goto yy218; - goto yy866; + if(yych >= 'A') goto yy218; + goto yy867; } } else { - if(yych <= '`'){ - if(yych <= '\\') goto yy220; - if(yych == '_') goto yy218; - goto yy866; + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy867; } else { - if(yych == 'u') goto yy879; + if(yych <= '_') goto yy868; + if(yych <= '`') goto yy867; if(yych <= 'z') goto yy218; - goto yy866; + goto yy867; } } -yy866: -#line 384 - { RET(T_DO); } -yy867: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy868; +yy867: +#line 376 + { RET(T_CONST); } yy868: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 'c') goto yy219; goto yy869; yy869: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'm') goto yy219; + if(yych != 'a') goto yy219; goto yy870; yy870: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; + if(yych != 's') goto yy219; goto yy871; yy871: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; + if(yych != 't') goto yy219; goto yy872; -yy872: yyaccept = 0; +yy872: yyaccept = 91; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '_') goto yy219; - goto yy873; -yy873: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy874; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy873; + if(yych <= '9') goto yy218; + goto yy873; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy873; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy873; + } else { + if(yych == '`') goto yy873; + if(yych <= 'z') goto yy218; + goto yy873; + } + } +yy873: +#line 377 + { RET(T_CONSTCAST); } yy874: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; + if(yych != 's') goto yy219; goto yy875; yy875: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 's') goto yy219; goto yy876; -yy876: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy877; -yy877: yyaccept = 87; +yy876: yyaccept = 92; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy878; + if(yych <= '/') goto yy877; if(yych <= '9') goto yy218; - goto yy878; + goto yy877; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy878; + goto yy877; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy878; + goto yy877; } else { - if(yych == '`') goto yy878; + if(yych == '`') goto yy877; if(yych <= 'z') goto yy218; - goto yy878; + goto yy877; } } -yy878: -#line 386 - { RET(T_DYNAMICCAST); } -yy879: yyaccept = 0; +yy877: +#line 375 + { RET(T_CLASS); } +yy878: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'b') goto yy219; - goto yy880; -yy880: yyaccept = 0; + if(yych != 'r') goto yy219; + goto yy879; +yy879: yyaccept = 93; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy881; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy880; + if(yych <= '9') goto yy218; + goto yy880; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy880; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy880; + } else { + if(yych == '`') goto yy880; + if(yych <= 'z') goto yy218; + goto yy880; + } + } +yy880: +#line 374 + { RET(T_CHAR); } yy881: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy882; -yy882: yyaccept = 88; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy883; - if(yych <= '9') goto yy218; - goto yy883; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy883; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy883; - } else { - if(yych == '`') goto yy883; - if(yych <= 'z') goto yy218; - goto yy883; - } - } -yy883: -#line 385 - { RET(T_DOUBLE); } -yy884: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy890; + if(yych == 'e') goto yy886; goto yy219; -yy885: yyaccept = 0; +yy882: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy886; -yy886: yyaccept = 0; + if(yych != 'c') goto yy219; + goto yy883; +yy883: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy887; -yy887: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy888; -yy888: yyaccept = 89; + if(yych != 'h') goto yy219; + goto yy884; +yy884: yyaccept = 94; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy889; + if(yych <= '/') goto yy885; if(yych <= '9') goto yy218; - goto yy889; + goto yy885; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy889; + goto yy885; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy889; + goto yy885; } else { - if(yych == '`') goto yy889; + if(yych == '`') goto yy885; if(yych <= 'z') goto yy218; - goto yy889; + goto yy885; } } -yy889: -#line 383 - { RET(T_DELETE); } +yy885: +#line 373 + { RET(T_CATCH); } +yy886: yyaccept = 95; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy887; + if(yych <= '9') goto yy218; + goto yy887; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy887; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy887; + } else { + if(yych == '`') goto yy887; + if(yych <= 'z') goto yy218; + goto yy887; + } + } +yy887: +#line 372 + { RET(T_CASE); } +yy888: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 't') goto yy898; + goto yy219; +yy889: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'o') goto yy895; + goto yy219; yy890: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'u') goto yy219; + if(yych != 'e') goto yy219; goto yy891; yy891: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; + if(yych != 'a') goto yy219; goto yy892; yy892: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; + if(yych != 'k') goto yy219; goto yy893; -yy893: yyaccept = 90; +yy893: yyaccept = 96; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ @@ -7516,639 +7628,299 @@ yy893: yyaccept = 90; } } yy894: -#line 382 - { RET(T_DEFAULT); } +#line 371 + { RET(T_BREAK); } yy895: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'r') goto yy219; - if(yych <= 's') goto yy926; - if(yych <= 't') goto yy927; - goto yy219; -yy896: yyaccept = 0; + if(yych != 'l') goto yy219; + goto yy896; +yy896: yyaccept = 97; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy923; - goto yy219; -yy897: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy919; - goto yy219; + if(yych <= 'Z'){ + if(yych <= '>'){ + if(yych <= '/') goto yy897; + if(yych <= '9') goto yy218; + goto yy897; + } else { + if(yych <= '?') goto yy221; + if(yych >= 'A') goto yy218; + goto yy897; + } + } else { + if(yych <= '^'){ + if(yych == '\\') goto yy220; + goto yy897; + } else { + if(yych == '`') goto yy897; + if(yych <= 'z') goto yy218; + goto yy897; + } + } +yy897: +#line 370 + { RET(T_BOOL); } yy898: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'l') goto yy219; - if(yych <= 'm') goto yy900; - if(yych >= 'o') goto yy219; - goto yy899; + if(yych == 'a') goto yy899; + if(yych == 'o') goto yy900; + goto yy219; yy899: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'r') goto yy219; - if(yych <= 's') goto yy904; - if(yych <= 't') goto yy905; + if(yych == 'n') goto yy903; goto yy219; yy900: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'p') goto yy219; + if(yych != 'r') goto yy219; goto yy901; -yy901: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy902; -yy902: yyaccept = 91; +yy901: yyaccept = 98; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy903; + if(yych <= '/') goto yy902; if(yych <= '9') goto yy218; - goto yy903; + goto yy902; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy903; + goto yy902; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy903; + goto yy902; } else { - if(yych == '`') goto yy903; + if(yych == '`') goto yy902; if(yych <= 'z') goto yy218; - goto yy903; + goto yy902; } } -yy903: -#line 517 - { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); } -yy904: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 't') goto yy911; - goto yy219; -yy905: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'i') goto yy219; - goto yy906; -yy906: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'n') goto yy219; - goto yy907; -yy907: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'u') goto yy219; - goto yy908; -yy908: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy909; -yy909: yyaccept = 92; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy910; - if(yych <= '9') goto yy218; - goto yy910; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy910; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy910; - } else { - if(yych == '`') goto yy910; - if(yych <= 'z') goto yy218; - goto yy910; - } - } -yy910: -#line 381 - { RET(T_CONTINUE); } -yy911: yyaccept = 93; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy912; - if(yych <= '9') goto yy218; - goto yy912; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy912; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy912; - } else { - if(yych <= '_') goto yy913; - if(yych <= '`') goto yy912; - if(yych <= 'z') goto yy218; - goto yy912; - } - } -yy912: -#line 379 - { RET(T_CONST); } -yy913: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy914; -yy914: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy915; -yy915: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy916; -yy916: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 't') goto yy219; - goto yy917; -yy917: yyaccept = 94; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy918; - if(yych <= '9') goto yy218; - goto yy918; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy918; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy918; - } else { - if(yych == '`') goto yy918; - if(yych <= 'z') goto yy218; - goto yy918; - } - } -yy918: -#line 380 - { RET(T_CONSTCAST); } -yy919: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy920; -yy920: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 's') goto yy219; - goto yy921; -yy921: yyaccept = 95; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy922; - if(yych <= '9') goto yy218; - goto yy922; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy922; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy922; - } else { - if(yych == '`') goto yy922; - if(yych <= 'z') goto yy218; - goto yy922; - } - } -yy922: -#line 378 - { RET(T_CLASS); } -yy923: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy924; -yy924: yyaccept = 96; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy925; - if(yych <= '9') goto yy218; - goto yy925; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy925; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy925; - } else { - if(yych == '`') goto yy925; - if(yych <= 'z') goto yy218; - goto yy925; - } - } -yy925: -#line 377 - { RET(T_CHAR); } -yy926: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'e') goto yy931; - goto yy219; -yy927: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'c') goto yy219; - goto yy928; -yy928: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'h') goto yy219; - goto yy929; -yy929: yyaccept = 97; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy930; - if(yych <= '9') goto yy218; - goto yy930; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy930; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy930; - } else { - if(yych == '`') goto yy930; - if(yych <= 'z') goto yy218; - goto yy930; - } - } -yy930: -#line 376 - { RET(T_CATCH); } -yy931: yyaccept = 98; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy932; - if(yych <= '9') goto yy218; - goto yy932; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy932; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy932; - } else { - if(yych == '`') goto yy932; - if(yych <= 'z') goto yy218; - goto yy932; - } - } -yy932: -#line 375 - { RET(T_CASE); } -yy933: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 't') goto yy943; - goto yy219; -yy934: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'o') goto yy940; - goto yy219; -yy935: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'e') goto yy219; - goto yy936; -yy936: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'a') goto yy219; - goto yy937; -yy937: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'k') goto yy219; - goto yy938; -yy938: yyaccept = 99; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy939; - if(yych <= '9') goto yy218; - goto yy939; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy939; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy939; - } else { - if(yych == '`') goto yy939; - if(yych <= 'z') goto yy218; - goto yy939; - } - } -yy939: -#line 374 - { RET(T_BREAK); } -yy940: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'l') goto yy219; - goto yy941; -yy941: yyaccept = 100; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy942; - if(yych <= '9') goto yy218; - goto yy942; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy942; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy942; - } else { - if(yych == '`') goto yy942; - if(yych <= 'z') goto yy218; - goto yy942; - } - } -yy942: -#line 373 - { RET(T_BOOL); } -yy943: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'a') goto yy944; - if(yych == 'o') goto yy945; - goto yy219; -yy944: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'n') goto yy948; - goto yy219; -yy945: yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'r') goto yy219; - goto yy946; -yy946: yyaccept = 101; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Z'){ - if(yych <= '>'){ - if(yych <= '/') goto yy947; - if(yych <= '9') goto yy218; - goto yy947; - } else { - if(yych <= '?') goto yy221; - if(yych >= 'A') goto yy218; - goto yy947; - } - } else { - if(yych <= '^'){ - if(yych == '\\') goto yy220; - goto yy947; - } else { - if(yych == '`') goto yy947; - if(yych <= 'z') goto yy218; - goto yy947; - } - } -yy947: -#line 513 +yy902: +#line 506 { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OR_ALT); } -yy948: yyaccept = 0; +yy903: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'd') goto yy219; - goto yy949; -yy949: yyaccept = 102; + goto yy904; +yy904: yyaccept = 99; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy950; + if(yych <= '/') goto yy905; if(yych <= '9') goto yy218; - goto yy950; + goto yy905; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy950; + goto yy905; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy950; + goto yy905; } else { - if(yych == '`') goto yy950; + if(yych == '`') goto yy905; if(yych <= 'z') goto yy218; - goto yy950; + goto yy905; } } -yy950: -#line 511 +yy905: +#line 504 { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_AND_ALT); } -yy951: yyaccept = 0; +yy906: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'd') goto yy959; + if(yych == 'd') goto yy914; goto yy219; -yy952: yyaccept = 0; +yy907: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'm') goto yy957; + if(yych == 'm') goto yy912; goto yy219; -yy953: yyaccept = 0; +yy908: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 't') goto yy219; - goto yy954; -yy954: yyaccept = 0; + goto yy909; +yy909: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'o') goto yy219; - goto yy955; -yy955: yyaccept = 103; + goto yy910; +yy910: yyaccept = 100; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy956; + if(yych <= '/') goto yy911; if(yych <= '9') goto yy218; - goto yy956; + goto yy911; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy956; + goto yy911; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy956; + goto yy911; } else { - if(yych == '`') goto yy956; + if(yych == '`') goto yy911; if(yych <= 'z') goto yy218; - goto yy956; + goto yy911; } } -yy956: -#line 372 +yy911: +#line 369 { RET(T_AUTO); } -yy957: yyaccept = 104; +yy912: yyaccept = 101; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy958; + if(yych <= '/') goto yy913; if(yych <= '9') goto yy218; - goto yy958; + goto yy913; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy958; + goto yy913; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy958; + goto yy913; } else { - if(yych == '`') goto yy958; + if(yych == '`') goto yy913; if(yych <= 'z') goto yy218; - goto yy958; + goto yy913; } } -yy958: -#line 371 +yy913: +#line 368 { RET(T_ASM); } -yy959: yyaccept = 105; +yy914: yyaccept = 102; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy960; + if(yych <= '/') goto yy915; if(yych <= '9') goto yy218; - goto yy960; + goto yy915; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy960; + goto yy915; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy960; + goto yy915; } else { - if(yych <= '_') goto yy961; - if(yych <= '`') goto yy960; + if(yych <= '_') goto yy916; + if(yych <= '`') goto yy915; if(yych <= 'z') goto yy218; - goto yy960; + goto yy915; } } -yy960: -#line 546 +yy915: +#line 539 { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDAND_ALT); } -yy961: yyaccept = 0; +yy916: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'e') goto yy219; - goto yy962; -yy962: yyaccept = 0; + goto yy917; +yy917: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych != 'q') goto yy219; - goto yy963; -yy963: yyaccept = 106; + goto yy918; +yy918: yyaccept = 103; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'Z'){ if(yych <= '>'){ - if(yych <= '/') goto yy964; + if(yych <= '/') goto yy919; if(yych <= '9') goto yy218; - goto yy964; + goto yy919; } else { if(yych <= '?') goto yy221; if(yych >= 'A') goto yy218; - goto yy964; + goto yy919; } } else { if(yych <= '^'){ if(yych == '\\') goto yy220; - goto yy964; + goto yy919; } else { - if(yych == '`') goto yy964; + if(yych == '`') goto yy919; if(yych <= 'z') goto yy218; - goto yy964; + goto yy919; } } -yy964: -#line 532 +yy919: +#line 525 { RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDASSIGN_ALT); } -yy965: yych = *++YYCURSOR; - goto yy966; -yy966: -#line 526 +yy920: yych = *++YYCURSOR; + goto yy921; +yy921: +#line 519 { RET(T_DIVIDEASSIGN); } -yy967: yych = *++YYCURSOR; - goto yy968; -yy968: -#line 369 +yy922: yych = *++YYCURSOR; + goto yy923; +yy923: +#line 366 { goto cppcomment; } -yy969: yych = *++YYCURSOR; - goto yy970; -yy970: -#line 368 +yy924: yych = *++YYCURSOR; + goto yy925; +yy925: +#line 365 { goto ccomment; } } -#line 640 +#line 629 ccomment: { YYCTYPE yych; unsigned int yyaccept; - goto yy971; -yy972: ++YYCURSOR; -yy971: + goto yy926; +yy927: ++YYCURSOR; +yy926: if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; if(yych <= '\f'){ if(yych <= '\b'){ - if(yych <= '\000') goto yy980; - goto yy973; + if(yych <= '\000') goto yy935; + goto yy928; } else { - if(yych == '\n') goto yy976; - goto yy979; + if(yych == '\n') goto yy931; + goto yy934; } } else { if(yych <= '\037'){ - if(yych <= '\r') goto yy978; - goto yy973; + if(yych <= '\r') goto yy933; + goto yy928; } else { - if(yych == '*') goto yy974; - goto yy979; + if(yych == '*') goto yy929; + goto yy934; } } -yy973:yy974: yych = *++YYCURSOR; - if(yych == '/') goto yy983; - goto yy975; -yy975: -#line 653 +yy928:yy929: yych = *++YYCURSOR; + if(yych == '/') goto yy938; + goto yy930; +yy930: +#line 642 { goto ccomment; } -yy976: yych = *++YYCURSOR; - goto yy977; -yy977: -#line 646 +yy931: yych = *++YYCURSOR; + goto yy932; +yy932: +#line 635 { /*if(cursor == s->eof) RET(T_EOF);*/ /*s->tok = cursor; */ s->line += count_backslash_newlines(s, cursor) +1; goto ccomment; } -yy978: yych = *++YYCURSOR; - if(yych == '\n') goto yy982; - goto yy977; -yy979: yych = *++YYCURSOR; - goto yy975; -yy980: yych = *++YYCURSOR; - goto yy981; -yy981: -#line 656 +yy933: yych = *++YYCURSOR; + if(yych == '\n') goto yy937; + goto yy932; +yy934: yych = *++YYCURSOR; + goto yy930; +yy935: yych = *++YYCURSOR; + goto yy936; +yy936: +#line 645 { yyaccept = 0; /* avoid warning about unreferenced variable */ if(cursor == s->eof) @@ -8167,59 +7939,59 @@ yy981: } RET(T_EOF); } -yy982: yych = *++YYCURSOR; - goto yy977; -yy983: yych = *++YYCURSOR; - goto yy984; -yy984: -#line 644 +yy937: yych = *++YYCURSOR; + goto yy932; +yy938: yych = *++YYCURSOR; + goto yy939; +yy939: +#line 633 { RET(T_CCOMMENT); } } -#line 675 +#line 664 cppcomment: { YYCTYPE yych; unsigned int yyaccept; - goto yy985; -yy986: ++YYCURSOR; -yy985: + goto yy940; +yy941: ++YYCURSOR; +yy940: if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; if(yych <= '\n'){ - if(yych <= '\000') goto yy993; - if(yych <= '\b') goto yy987; - if(yych <= '\t') goto yy991; - goto yy988; + if(yych <= '\000') goto yy948; + if(yych <= '\b') goto yy942; + if(yych <= '\t') goto yy946; + goto yy943; } else { - if(yych <= '\f') goto yy991; - if(yych <= '\r') goto yy990; - if(yych >= ' ') goto yy991; - goto yy987; + if(yych <= '\f') goto yy946; + if(yych <= '\r') goto yy945; + if(yych >= ' ') goto yy946; + goto yy942; } -yy987:yy988: yych = *++YYCURSOR; - goto yy989; -yy989: -#line 680 +yy942:yy943: yych = *++YYCURSOR; + goto yy944; +yy944: +#line 669 { /*if(cursor == s->eof) RET(T_EOF); */ /*s->tok = cursor; */ s->line++; RET(T_CPPCOMMENT); } -yy990: yych = *++YYCURSOR; - if(yych == '\n') goto yy995; - goto yy989; -yy991: yych = *++YYCURSOR; - goto yy992; -yy992: -#line 687 +yy945: yych = *++YYCURSOR; + if(yych == '\n') goto yy950; + goto yy944; +yy946: yych = *++YYCURSOR; + goto yy947; +yy947: +#line 676 { goto cppcomment; } -yy993: yych = *++YYCURSOR; - goto yy994; -yy994: -#line 690 +yy948: yych = *++YYCURSOR; + goto yy949; +yy949: +#line 679 { yyaccept = 0; /* avoid warning about unreferenced variable */ if(cursor != s->eof) @@ -8234,10 +8006,10 @@ yy994: /* the comment is unterminated, but nevertheless its a comment */ RET(T_CPPCOMMENT); } -yy995: yych = *++YYCURSOR; - goto yy989; +yy950: yych = *++YYCURSOR; + goto yy944; } -#line 704 +#line 693 } /* end of scan */ diff --git a/src/instantiate_cpp_exprgrammar.cpp b/src/instantiate_cpp_exprgrammar.cpp index acf4f17..97020ea 100644 --- a/src/instantiate_cpp_exprgrammar.cpp +++ b/src/instantiate_cpp_exprgrammar.cpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -30,9 +28,9 @@ // /////////////////////////////////////////////////////////////////////////////// -typedef boost::wave::cpplexer::lex_token<> token_t; +typedef boost::wave::cpplexer::lex_token<> token_type; -template struct boost::wave::grammars::expression_grammar_gen; +template struct boost::wave::grammars::expression_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_cpp_grammar.cpp b/src/instantiate_cpp_grammar.cpp index fbb5689..62f9cb2 100644 --- a/src/instantiate_cpp_grammar.cpp +++ b/src/instantiate_cpp_grammar.cpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -31,8 +29,8 @@ typedef boost::wave::cpplexer::lex_iterator< boost::wave::cpplexer::lex_token<> > - lex_t; -template struct boost::wave::grammars::cpp_grammar_gen; + lexer_type; +template struct boost::wave::grammars::cpp_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_cpp_literalgrammars.cpp b/src/instantiate_cpp_literalgrammars.cpp index 7a928b6..7478f7f 100644 --- a/src/instantiate_cpp_literalgrammars.cpp +++ b/src/instantiate_cpp_literalgrammars.cpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -30,10 +28,10 @@ // /////////////////////////////////////////////////////////////////////////////// -typedef boost::wave::cpplexer::lex_token<> token_t; +typedef boost::wave::cpplexer::lex_token<> token_type; -template struct boost::wave::grammars::intlit_grammar_gen; -template struct boost::wave::grammars::chlit_grammar_gen; +template struct boost::wave::grammars::intlit_grammar_gen; +template struct boost::wave::grammars::chlit_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_defined_grammar.cpp b/src/instantiate_defined_grammar.cpp index 67b2d0e..a966307 100644 --- a/src/instantiate_defined_grammar.cpp +++ b/src/instantiate_defined_grammar.cpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -31,8 +29,8 @@ typedef boost::wave::cpplexer::lex_iterator< boost::wave::cpplexer::lex_token<> > - lex_t; -template struct boost::wave::grammars::defined_grammar_gen; + lexer_type; +template struct boost::wave::grammars::defined_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_predef_macros.cpp b/src/instantiate_predef_macros.cpp index f9262a8..c0ebcfa 100644 --- a/src/instantiate_predef_macros.cpp +++ b/src/instantiate_predef_macros.cpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include @@ -31,8 +29,8 @@ typedef boost::wave::cpplexer::lex_iterator< boost::wave::cpplexer::lex_token<> > - lex_t; -template struct boost::wave::grammars::predefined_macros_grammar_gen; + lexer_type; +template struct boost::wave::grammars::predefined_macros_grammar_gen; #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_re2c_lexer.cpp b/src/instantiate_re2c_lexer.cpp index a680dfd..3ebce10 100644 --- a/src/instantiate_re2c_lexer.cpp +++ b/src/instantiate_re2c_lexer.cpp @@ -1,14 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Explicit instantiation of the lex_functor generation function - - Copyright (c) 2001-2004 Hartmut Kaiser + http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include // configuration data diff --git a/src/instantiate_re2c_lexer_string.cpp b/src/instantiate_re2c_lexer_string.cpp index 2cd3852..9de4f8e 100644 --- a/src/instantiate_re2c_lexer_string.cpp +++ b/src/instantiate_re2c_lexer_string.cpp @@ -1,14 +1,12 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Explicit instantiation of the lex_functor generation function - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include // configuration data diff --git a/tool/build/Jamfile b/tool/build/Jamfile index f7f0c78..0269a68 100644 --- a/tool/build/Jamfile +++ b/tool/build/Jamfile @@ -2,12 +2,11 @@ # # Boost Wave Library Build Jamfile # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) subproject tools/wave/build ; diff --git a/tool/build/Jamfile.v2 b/tool/build/Jamfile.v2 index 7a64b72..2b55322 100644 --- a/tool/build/Jamfile.v2 +++ b/tool/build/Jamfile.v2 @@ -2,12 +2,11 @@ # # Boost Wave Library Build Jamfile # -# Copyright (c) 2001-2004 Hartmut Kaiser # http://spirit.sourceforge.net/ # -# Use, modification, and distribution is subject to 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) +# Copyright (c) 2001-2004 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) exe wave : ../cpp.cpp diff --git a/tool/cpp.cpp b/tool/cpp.cpp index 6ece7fa..683adc3 100644 --- a/tool/cpp.cpp +++ b/tool/cpp.cpp @@ -1,24 +1,18 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #include "cpp.hpp" // global configuration /////////////////////////////////////////////////////////////////////////////// -// This sample requires the program_options library written by Vladimir Prus, -// which is already accepted into Boost, but not included with the -// distribution yet. -// It is available here: http://boost-sandbox.sourceforge.net/program_options. -// +// Include additional Boost libraries #include -#include #include #include @@ -84,9 +78,9 @@ int print_version() std::string::iterator, lex_iterator_t, boost::wave::iteration_context_policies::load_file_to_string, trace_macro_expansion> - context_t; + context_type; - string version (context_t::get_version_string()); + string version (context_type::get_version_string()); cout << version.substr(1, version.size()-2) // strip quotes << " (" << CPP_VERSION_DATE << ")" // add date @@ -98,15 +92,14 @@ int print_version() // print the copyright statement int print_copyright() { - char const *copyright[] = { + char const *copyright[] = { "", "Wave: A Standard conformant C++ preprocessor", - "Copyright (c) 2001-2004 Hartmut Kaiser", "It is hosted by http://spirit.sourceforge.net/.", "", - "Use, modification and distribution is subject to 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)", + "Copyright (c) 2001-2004 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)", 0 }; @@ -219,12 +212,15 @@ namespace cmd_line_util { // switching the semantics of an -I option. // /////////////////////////////////////////////////////////////////////////////// -void -po::validator::operator()( - boost::any &v, std::vector const &s) -{ - cmd_line_util::include_paths::validate(v, s); -} +namespace boost { namespace program_options { + + void validate(boost::any &v, std::vector const &s, + cmd_line_util::include_paths *, int) + { + cmd_line_util::include_paths::validate(v, s); + } + +}} // namespace boost::program_options /////////////////////////////////////////////////////////////////////////////// namespace { @@ -260,7 +256,7 @@ int do_actual_work (std::string file_name, po::variables_map const &vm) { // current file position is saved for exception handling -boost::wave::util::file_position_t current_position; +boost::wave::util::file_position_type current_position; try { // process the given file @@ -292,14 +288,14 @@ boost::wave::util::file_position_t current_position; std::string::iterator, lex_iterator_t, boost::wave::iteration_context_policies::load_file_to_string, trace_macro_expansion> - context_t; + context_type; // The C++ preprocessor iterators shouldn't be constructed directly. They // are to be generated through a boost::wave::context<> object. This // boost::wave::context object is additionally to be used to initialize and // define different parameters of the actual preprocessing. // The preprocessing of the input stream is done on the fly behind the - // scenes during iteration over the context_t::iterator_t stream. + // scenes during iteration over the context_type::iterator_type stream. std::ofstream traceout; boost::wave::trace_policies::trace_flags enable_trace = boost::wave::trace_policies::trace_nothing; @@ -327,27 +323,14 @@ boost::wave::util::file_position_t current_position; static_cast &>(traceout).rdbuf(cerr.rdbuf()); } - context_t ctx (instring.begin(), instring.end(), file_name.c_str(), + context_type ctx (instring.begin(), instring.end(), file_name.c_str(), trace_macro_expansion(traceout, enable_trace)); #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 // enable C99 mode, if appropriate (implies variadics) if (vm.count("c99")) { -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - if (vm.count("c++0x")) { - cerr << - "wave: the C99 and C++0x modes are mutually exclusive, " - "working in C99 mode." << endl; - } -#endif ctx.set_language(boost::wave::support_c99); } -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - // enable experimental C++0x mode (implies variadics) - else if (vm.count("c++0x")) { - ctx.set_language(boost::wave::support_cpp0x); - } -#endif else if (vm.count("variadics")) { // enable variadics and placemarkers, if appropriate ctx.set_language(boost::wave::enable_variadics(ctx.get_language())); @@ -458,8 +441,8 @@ boost::wave::util::file_position_t current_position; } // analyze the input file - context_t::iterator_t first = ctx.begin(); - context_t::iterator_t last = ctx.end(); + context_type::iterator_type first = ctx.begin(); + context_type::iterator_type last = ctx.end(); // preprocess the required include files if (vm.count("forceinclude")) { @@ -478,7 +461,7 @@ boost::wave::util::file_position_t current_position; } // loop over all generated tokens outputing the generated text - auto_stop_watch elapsed_time(vm.count("timer") > 0, cerr); + auto_stop_watch elapsed_time(vm.count("timer") > 0, cout); while (first != last) { // print out the string representation of this token (skip comments) @@ -557,7 +540,8 @@ main (int argc, char *argv[]) po::options_description desc_generic ("Options allowed additionally in a config file"); desc_generic.add_options() - ("output,o", "specify a file to use for output instead of stdout") + ("output,o", po::value(), + "specify a file to use for output instead of stdout") ("include,I", po::value()->composing(), "specify an additional include directory") ("sysinclude,S", po::value >()->composing(), @@ -583,9 +567,6 @@ main (int argc, char *argv[]) #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 ("variadics", "enable certain C99 extensions in C++ mode") ("c99", "enable C99 mode (implies --variadics)") -#endif -#if BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS != 0 - ("c++0x", "enable C++0x support (implies --variadics)") #endif ; diff --git a/tool/cpp.hpp b/tool/cpp.hpp index bcfc5c5..066bc88 100644 --- a/tool/cpp.hpp +++ b/tool/cpp.hpp @@ -1,12 +1,11 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_HPP_920D0370_741F_44AF_BF86_F6104BDACF75_INCLUDED) diff --git a/tool/cpp_config.hpp b/tool/cpp_config.hpp index 764ec63..8b7542c 100644 --- a/tool/cpp_config.hpp +++ b/tool/cpp_config.hpp @@ -1,158 +1,24 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - Global application configuration of the Wave driver command - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED) #define CPP_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED /////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement macro scopes (#scope/#endscope), variadics, -// placemarkers and well defined token pasting in C++ mode -// -// To implement these features, uncomment the following -// -#define BOOST_WAVE_ENABLE_CPP0X_EXTENSIONS 1 - -/////////////////////////////////////////////////////////////////////////////// -// Define the macro scoping keywords to be used for the experimental macro -// scoping support. -// -// If the following macros aren't defined, the corresponding default value is -// used. -// -// Note, if you change this, you will have to change the corresponding entries -// inside the wave/cpplexer/re2c/cpp.re file too. -// -//#define BOOST_WAVE_PP_REGION "region" -//#define BOOST_WAVE_PP_REGION_UC "REGION" // uppercase of BOOST_WAVE_PP_REGION -//#define BOOST_WAVE_PP_ENDREGION "endregion" -//#define BOOST_WAVE_PP_IMPORT "import" - -/////////////////////////////////////////////////////////////////////////////// -// Define the maximal include nesting depth allowed. If this value isn't -// defined it defaults to 1024 -// -// To define a new initial include nesting depth uncomment the following and -// supply a new integer value. -// -//#define BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH 1024 - -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to support variadics and placemarkers -// -// To implement support variadics and placemarkers uncomment the following -// -#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1 - -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement a #warning directive as -// -// To implement #warning directives, uncomment the following -// -#define BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE 1 - -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement #pragma once -// -// To implement #pragma once, uncomment the following -// -#define BOOST_WAVE_SUPPORT_PRAGMA_ONCE 1 - -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to implement #include_next -// Please note, that this is an extension to the C++ Standard. -// -// To implement #include_next, uncomment the following -// -#define BOOST_WAVE_SUPPORT_INCLUDE_NEXT 1 - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment the following, to enable some MS specific language extensions: -// __int8, __int16, __int32, __int64, __based, __declspec, __cdecl, -// __fastcall, __stdcall, __try, __except, __finally, __leave, __inline, -// __asm -#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 1 - -/////////////////////////////////////////////////////////////////////////////// -// Allow the message body of the #error and #warning directives to be -// preprocessed before the diagnostic is issued. -// -// Uncommenting the following will preprocess the message bodies of #error and -// #warning messages before the error (warning) is issued -// -#define BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY 1 - -/////////////////////////////////////////////////////////////////////////////// -// Allow the #pragma directives to be returned to the caller (optionally after -// preprocessing the body) -// -// Undefining the following will skip #pragma directives, so that the caller -// will not see them. -// -#define BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES 1 - -/////////////////////////////////////////////////////////////////////////////// -// Allow the body of a #pragma directive to be preprocessed before the -// directive is returned to the caller. -// -// Uncommenting the following will preprocess the bodies of #pragma directives -// -#define BOOST_WAVE_PREPROCESS_PRAGMA_BODY 1 - -/////////////////////////////////////////////////////////////////////////////// -// Allow to define macros with the command line syntax (-DMACRO(x)=definition) -// -// Uncommenting the following will enable the possibility to define macros -// based on the command line syntax -// -#define BOOST_WAVE_ENABLE_COMMANDLINE_MACROS 1 - -/////////////////////////////////////////////////////////////////////////////// -// Define the string type to be used to store the token values and the file -// names inside a file_position template class -// - -// use the following, if you have a fast std::allocator -#define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \ - char, std::char_traits, std::allocator, \ - boost::wave::util::CowString \ - > \ - > \ - /**/ - -//#define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \ -// char, std::char_traits, boost::fast_pool_allocator, \ -// boost::wave::util::CowString \ -// > \ -// > \ -// > \ -// /**/ - -// This include is needed for the flex_string class used in the -// BOOST_WAVE_STRINGTYPE above. -#include - -// This include is needed for the boost::fast_allocator class used in the -// BOOST_WAVE_STRINGTYPE above. -// Configure Boost.Pool thread support (for now: no thread support at all) -#define BOOST_NO_MT -#include +// Include the configuration stuff for the Wave library itself +#include /////////////////////////////////////////////////////////////////////////////// // Uncomment the following, if you need debug output, the -// BOOST_SPIRIT_DEBUG_FLAGS constants below help to fine control the amount of +// BOOST_SPIRIT_DEBUG_FLAGS constants below helps to fine control the amount of // the generated debug output //#define BOOST_SPIRIT_DEBUG @@ -168,7 +34,7 @@ /**/ /////////////////////////////////////////////////////////////////////////////// -// debug flags for the Wave library, possible flags (defined in +// Debug flags for the Wave library, possible flags (defined in // wave_config.hpp): // // #define BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR 0x0001 @@ -179,59 +45,12 @@ // #define BOOST_SPIRIT_DEBUG_FLAGS_DEFINED_GRAMMAR 0x0020 // #define BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR 0x0040 -#define BOOST_SPIRIT_DEBUG_FLAGS_CPP ( 0 | \ +#define BOOST_SPIRIT_DEBUG_FLAGS_CPP ( 0 \ /* insert the required flags from above */ \ ) \ /**/ #endif -/////////////////////////////////////////////////////////////////////////////// -// -// For all recognized preprocessor statements the output parse trees -// formatted as xml are printed. The formatted parse trees are streamed to the -// std::ostream defined by the BOOST_WAVE_DUMP_PARSE_TREE_OUT constant. -// -// Uncomment the following, if you want to see these parse trees. -// -//#define BOOST_WAVE_DUMP_PARSE_TREE 1 -//#define BOOST_WAVE_DUMP_PARSE_TREE_OUT std::cerr - -/////////////////////////////////////////////////////////////////////////////// -// -// For all #if and #elif directives the preprocessed expressions are printed. -// These expressions are streamed to the std::ostream defined by the -// BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT constant. -// -// Uncomment the following, if you want to see the preprocessed expressions -// -//#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS 1 -//#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT std::cerr - -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to use the separate compilation model for the instantiation -// of the C++ lexer objects. -// -// If this is defined, you should explicitly instantiate the C++ lexer -// template with the correct parameters in a separate compilation unit of -// your program (see the files instantiate_re2c_lexer_string.cpp and -// instantiate_re2c_lexer.cpp). -// -// To use the lexer inclusion model, uncomment the following -// -#define BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION 1 - -/////////////////////////////////////////////////////////////////////////////// -// Decide, whether to use the separate compilation model for the instantiation -// of the grammar objects. -// -// If this is defined, you should explicitly instantiate the grammar -// templates with the correct parameters in a separate compilation unit of -// your program (see the files instantiate_cpp_grammar.cpp et.al.). -// -// To use the grammar inclusion model, uncomment the following -// -#define BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION 1 - /////////////////////////////////////////////////////////////////////////////// // MSVC specific #pragma's #if defined(BOOST_MSVC) @@ -241,8 +60,4 @@ #pragma inline_recursion(on) #endif // defined(BOOST_MSVC) -/////////////////////////////////////////////////////////////////////////////// -// Now include the cofiguration stuff for the Wave library itself -#include - #endif // !defined(CPP_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED) diff --git a/tool/cpp_version.hpp b/tool/cpp_version.hpp index fb4dda0..9e4777f 100644 --- a/tool/cpp_version.hpp +++ b/tool/cpp_version.hpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED) @@ -17,6 +15,6 @@ #define CPP_VERSION_MAJOR BOOST_WAVE_VERSION_MAJOR #define CPP_VERSION_MINOR BOOST_WAVE_VERSION_MINOR #define CPP_VERSION_SUBMINOR BOOST_WAVE_VERSION_SUBMINOR -#define CPP_VERSION_DATE 20040421L +#define CPP_VERSION_DATE 20040825L #endif // !defined(CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED) diff --git a/tool/trace_macro_expansion.hpp b/tool/trace_macro_expansion.hpp index 46f5485..a71628c 100644 --- a/tool/trace_macro_expansion.hpp +++ b/tool/trace_macro_expansion.hpp @@ -1,12 +1,10 @@ /*============================================================================= Wave: A Standard compliant C++ preprocessor library - - Copyright (c) 2001-2004 Hartmut Kaiser http://spirit.sourceforge.net/ - Use, modification and distribution is subject to 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) + Copyright (c) 2001-2004 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) =============================================================================*/ #if !defined(TRACE_MACRO_EXPANSION_HPP_D8469318_8407_4B9D_A19F_13CA60C1661F_INCLUDED)