mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 07:56:37 +00:00 
			
		
		
		
	Removed an optimization that caused problems on 32 bit builds
This commit is contained in:
		
							parent
							
								
									c40e753ea9
								
							
						
					
					
						commit
						a54f8c7ee2
					
				
					 19 changed files with 15 additions and 10600 deletions
				
			
		|  | @ -181,15 +181,8 @@ if (UNIX AND NOT APPLE) | |||
|     find_package (Threads) | ||||
| endif() | ||||
| 
 | ||||
| # find boost without components so we can use Boost_VERSION | ||||
| find_package(Boost REQUIRED) | ||||
| 
 | ||||
| set(BOOST_COMPONENTS system filesystem program_options thread date_time) | ||||
| 
 | ||||
| if (Boost_VERSION LESS 104900) | ||||
|     set(SHINY_USE_WAVE_SYSTEM_INSTALL "TRUE") | ||||
|     set(BOOST_COMPONENTS ${BOOST_COMPONENTS} wave) | ||||
| endif() | ||||
| set(BOOST_COMPONENTS system filesystem program_options thread date_time wave) | ||||
| 
 | ||||
| IF(BOOST_STATIC) | ||||
|     set(Boost_USE_STATIC_LIBS   ON) | ||||
|  |  | |||
							
								
								
									
										20
									
								
								extern/shiny/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								extern/shiny/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							|  | @ -22,26 +22,6 @@ set(SOURCE_FILES | |||
|     Main/ShaderSet.cpp | ||||
| ) | ||||
| 
 | ||||
| if (DEFINED SHINY_USE_WAVE_SYSTEM_INSTALL) | ||||
|     # use system install | ||||
| else() | ||||
|     list(APPEND SOURCE_FILES | ||||
|         Preprocessor/aq.cpp | ||||
|         Preprocessor/cpp_re.cpp | ||||
|         Preprocessor/instantiate_cpp_literalgrs.cpp | ||||
|         Preprocessor/instantiate_cpp_exprgrammar.cpp | ||||
|         Preprocessor/instantiate_cpp_grammar.cpp | ||||
|         Preprocessor/instantiate_defined_grammar.cpp | ||||
|         Preprocessor/instantiate_predef_macros.cpp | ||||
|         Preprocessor/instantiate_re2c_lexer.cpp | ||||
|         Preprocessor/instantiate_re2c_lexer_str.cpp | ||||
|         Preprocessor/token_ids.cpp | ||||
|     ) | ||||
| 
 | ||||
|     # Don't use thread-safe boost::wave. Results in a huge speed-up for the preprocessor. | ||||
|     add_definitions(-DBOOST_WAVE_SUPPORT_THREADING=0) | ||||
| endif() | ||||
| 
 | ||||
| set(OGRE_PLATFORM_SOURCE_FILES | ||||
|     Platforms/Ogre/OgreGpuProgram.cpp | ||||
|     Platforms/Ogre/OgreMaterial.cpp | ||||
|  |  | |||
							
								
								
									
										5
									
								
								extern/shiny/Docs/Materials.dox
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								extern/shiny/Docs/Materials.dox
									
									
									
									
										vendored
									
									
								
							|  | @ -84,7 +84,8 @@ | |||
| 	 - There is no entry_point property because the entry point is always \a main. | ||||
| 	 - Both profiles_cg and profiles_hlsl are a list of shader profiles. The first profile that is supported is automatically picked. GLSL does not have shader profiles. | ||||
| 
 | ||||
| 	Now, let's get into writing our shader! As you can guess from above, the filename should be 'example.shader' | ||||
| 	Now, let's get into writing our shader! As you can guess from above, the filename should be 'example.shader'. | ||||
| 	Make sure to also copy the 'core.h' file to the same location. It is included in shiny's source tree under 'Extra/'. | ||||
| 
 | ||||
| 	\code | ||||
| 	#include "core.h" | ||||
|  | @ -93,7 +94,7 @@ | |||
| 
 | ||||
| 	SH_BEGIN_PROGRAM | ||||
| 		shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix) | ||||
| 		shInput(float2, uv0) | ||||
| 		shVertexInput(float2, uv0) | ||||
| 		shOutput(float2, UV) | ||||
| 	SH_START_PROGRAM | ||||
| 	{ | ||||
|  |  | |||
							
								
								
									
										2
									
								
								extern/shiny/Editor/MainWindow.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								extern/shiny/Editor/MainWindow.cpp
									
									
									
									
										vendored
									
									
								
							|  | @ -1,6 +1,8 @@ | |||
| #include "MainWindow.hpp" | ||||
| #include "ui_mainwindow.h" | ||||
| 
 | ||||
| #include <iostream> | ||||
| 
 | ||||
| #include <QCloseEvent> | ||||
| #include <QTimer> | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								extern/shiny/Main/Language.hpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								extern/shiny/Main/Language.hpp
									
									
									
									
										vendored
									
									
								
							|  | @ -8,6 +8,7 @@ namespace sh | |||
| 		Language_CG, | ||||
| 		Language_HLSL, | ||||
| 		Language_GLSL, | ||||
| 		Language_GLSLES, | ||||
| 		Language_Count, | ||||
| 		Language_None | ||||
| 	}; | ||||
|  |  | |||
							
								
								
									
										5
									
								
								extern/shiny/Main/ShaderInstance.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								extern/shiny/Main/ShaderInstance.cpp
									
									
									
									
										vendored
									
									
								
							|  | @ -22,8 +22,11 @@ namespace | |||
| 			return "SH_CG"; | ||||
| 		else if (lang == sh::Language_HLSL) | ||||
| 			return "SH_HLSL"; | ||||
| 		else //if (lang == sh::Language_GLSL)
 | ||||
| 		else if (lang == sh::Language_GLSL) | ||||
| 			return "SH_GLSL"; | ||||
| 		else if (lang == sh::Language_GLSLES) | ||||
| 			return "SH_GLSLES"; | ||||
| 		throw std::runtime_error("invalid language"); | ||||
| 	} | ||||
| 
 | ||||
| 	char getComponent(int num) | ||||
|  |  | |||
|  | @ -28,9 +28,8 @@ namespace sh | |||
| 			t = Ogre::GPT_FRAGMENT_PROGRAM; | ||||
| 
 | ||||
| 		mProgram = mgr.createProgram(name, resourceGroup, lang, t); | ||||
| 		if (lang != "glsl") | ||||
| 		if (lang != "glsl" && lang != "glsles") | ||||
| 			mProgram->setParameter("entry_point", "main"); | ||||
| 
 | ||||
| 		if (lang == "hlsl") | ||||
| 			mProgram->setParameter("target", profile); | ||||
| 		else if (lang == "cg") | ||||
|  |  | |||
							
								
								
									
										4
									
								
								extern/shiny/Platforms/Ogre/OgrePlatform.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								extern/shiny/Platforms/Ogre/OgrePlatform.cpp
									
									
									
									
										vendored
									
									
								
							|  | @ -24,7 +24,9 @@ namespace | |||
| 			return "hlsl"; | ||||
| 		else if (lang == sh::Language_GLSL) | ||||
| 			return "glsl"; | ||||
| 		throw std::runtime_error ("invalid language, valid are: cg, hlsl, glsl"); | ||||
| 		else if (lang == sh::Language_GLSLES) | ||||
| 			return "glsles"; | ||||
| 		throw std::runtime_error ("invalid language, valid are: cg, hlsl, glsl, glsles"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										236
									
								
								extern/shiny/Preprocessor/aq.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										236
									
								
								extern/shiny/Preprocessor/aq.cpp
									
									
									
									
										vendored
									
									
								
							|  | @ -1,236 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001 Daniel C. Nuffer. | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| 
 | ||||
| #include <cstdlib> | ||||
| #include <cstring> | ||||
| 
 | ||||
| #include <boost/wave/wave_config.hpp>          // configuration data
 | ||||
| #include <boost/wave/cpplexer/re2clex/aq.hpp> | ||||
| 
 | ||||
| #include <boost/assert.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| namespace boost { | ||||
| namespace wave { | ||||
| namespace cpplexer { | ||||
| namespace re2clex { | ||||
| 
 | ||||
| int aq_grow(aq_queue q) | ||||
| { | ||||
|     using namespace std;        // some systems have memcpy/realloc in std
 | ||||
|     std::size_t new_size = q->max_size << 1; | ||||
|     aq_stdelement* new_queue = (aq_stdelement*)realloc(q->queue, | ||||
|             new_size * sizeof(aq_stdelement)); | ||||
| 
 | ||||
|     BOOST_ASSERT(NULL != q); | ||||
|     BOOST_ASSERT(q->max_size < 100000); | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
| 
 | ||||
| #define ASSERT_SIZE BOOST_ASSERT( \ | ||||
|     ((q->tail + q->max_size + 1) - q->head) % q->max_size == \ | ||||
|     q->size % q->max_size) | ||||
| 
 | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     if (!new_queue) | ||||
|     { | ||||
|         BOOST_ASSERT(0); | ||||
|         return 0; | ||||
|     } | ||||
| 
 | ||||
|     q->queue = new_queue; | ||||
|     if (q->tail <= q->head) /* tail has wrapped around */ | ||||
|     { | ||||
|         /* move the tail from the beginning to the end */ | ||||
|         memcpy(q->queue + q->max_size, q->queue, | ||||
|                 (q->tail + 1) * sizeof(aq_stdelement)); | ||||
|         q->tail += q->max_size; | ||||
|     } | ||||
|     q->max_size = new_size; | ||||
| 
 | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     return 1; | ||||
| } | ||||
| 
 | ||||
| int aq_enqueue(aq_queue q, aq_stdelement e) | ||||
| { | ||||
|     BOOST_ASSERT(NULL != q); | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
| 
 | ||||
|     if (AQ_FULL(q)) | ||||
|         if (!aq_grow(q)) | ||||
|             return 0; | ||||
| 
 | ||||
|     ++q->tail; | ||||
|     if (q->tail == q->max_size) | ||||
|         q->tail = 0; | ||||
| 
 | ||||
|     q->queue[q->tail] = e; | ||||
|     ++q->size; | ||||
| 
 | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     return 1; | ||||
| } | ||||
| 
 | ||||
| int aq_enqueue_front(aq_queue q, aq_stdelement e) | ||||
| { | ||||
|     BOOST_ASSERT(NULL != q); | ||||
| 
 | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
| 
 | ||||
|     if (AQ_FULL(q)) | ||||
|         if (!aq_grow(q)) | ||||
|             return 0; | ||||
| 
 | ||||
|     if (q->head == 0) | ||||
|         q->head = q->max_size - 1; | ||||
|     else | ||||
|         --q->head; | ||||
| 
 | ||||
|     q->queue[q->head] = e; | ||||
|     ++q->size; | ||||
| 
 | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     return 1; | ||||
| } | ||||
| 
 | ||||
| int aq_serve(aq_queue q, aq_stdelement *e) | ||||
| { | ||||
| 
 | ||||
|     BOOST_ASSERT(NULL != q); | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
| 
 | ||||
|     if (AQ_EMPTY(q)) | ||||
|         return 0; | ||||
| 
 | ||||
|     *e = q->queue[q->head]; | ||||
|     return aq_pop(q); | ||||
| } | ||||
| 
 | ||||
| int aq_pop(aq_queue q) | ||||
| { | ||||
| 
 | ||||
|     BOOST_ASSERT(NULL != q); | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
| 
 | ||||
|     if (AQ_EMPTY(q)) | ||||
|         return 0; | ||||
| 
 | ||||
|     ++q->head; | ||||
|     if (q->head == q->max_size) | ||||
|         q->head = 0; | ||||
|     --q->size; | ||||
| 
 | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     return 1; | ||||
| } | ||||
| 
 | ||||
| aq_queue aq_create(void) | ||||
| { | ||||
|     aq_queue q; | ||||
| 
 | ||||
|     using namespace std;        // some systems have malloc in std
 | ||||
|     q = (aq_queue)malloc(sizeof(aq_queuetype)); | ||||
|     if (!q) | ||||
|     { | ||||
|         return 0; | ||||
|     } | ||||
| 
 | ||||
|     q->max_size = 8; /* initial size */ | ||||
|     q->queue = (aq_stdelement*)malloc( | ||||
|             sizeof(aq_stdelement) * q->max_size); | ||||
|     if (!q->queue) | ||||
|     { | ||||
|         free(q); | ||||
|         return 0; | ||||
|     } | ||||
| 
 | ||||
|     q->head = 0; | ||||
|     q->tail = q->max_size - 1; | ||||
|     q->size = 0; | ||||
| 
 | ||||
| 
 | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     return q; | ||||
| } | ||||
| 
 | ||||
| void aq_terminate(aq_queue q) | ||||
| { | ||||
|     using namespace std;        // some systems have free in std
 | ||||
| 
 | ||||
|     BOOST_ASSERT(NULL != q); | ||||
|     BOOST_ASSERT(q->size <= q->max_size); | ||||
|     ASSERT_SIZE; | ||||
|     BOOST_ASSERT(q->head <= q->max_size); | ||||
|     BOOST_ASSERT(q->tail <= q->max_size); | ||||
| 
 | ||||
|     free(q->queue); | ||||
|     free(q); | ||||
| } | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| }   // namespace re2clex
 | ||||
| }   // namespace cpplexer
 | ||||
| }   // namespace wave
 | ||||
| }   // namespace boost
 | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
							
								
								
									
										442
									
								
								extern/shiny/Preprocessor/cpp_re.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										442
									
								
								extern/shiny/Preprocessor/cpp_re.cpp
									
									
									
									
										vendored
									
									
								
							|  | @ -1,442 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
| 
 | ||||
|     Copyright (c) 2001 Daniel C. Nuffer | ||||
|     Copyright (c) 2001-2011 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.  | ||||
|         handle errors better. | ||||
|         have some easier way to parse strings instead of files (done)  | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| 
 | ||||
| #include <ctime> | ||||
| #include <cstdlib> | ||||
| #include <cstdio> | ||||
| #include <cstring> | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
| #include <fcntl.h> | ||||
| 
 | ||||
| #include <boost/wave/wave_config.hpp>          // configuration data
 | ||||
| 
 | ||||
| #if defined(BOOST_HAS_UNISTD_H) | ||||
| #include <unistd.h> | ||||
| #else | ||||
| #include <io.h> | ||||
| #endif  | ||||
| 
 | ||||
| #include <boost/assert.hpp> | ||||
| #include <boost/detail/workaround.hpp> | ||||
| 
 | ||||
| #include <boost/wave/token_ids.hpp> | ||||
| #include <boost/wave/cpplexer/re2clex/aq.hpp> | ||||
| #include <boost/wave/cpplexer/re2clex/scanner.hpp> | ||||
| #include <boost/wave/cpplexer/re2clex/cpp_re.hpp> | ||||
| #include <boost/wave/cpplexer/cpplexer_exceptions.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| #if defined(BOOST_MSVC) | ||||
| #pragma warning (disable: 4101)     // 'foo' : unreferenced local variable
 | ||||
| #pragma warning (disable: 4102)     // 'foo' : unreferenced label
 | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| #define BOOST_WAVE_BSIZE     196608 | ||||
| 
 | ||||
| #define YYCTYPE   uchar | ||||
| #define YYCURSOR  cursor | ||||
| #define YYLIMIT   limit | ||||
| #define YYMARKER  marker | ||||
| #define YYFILL(n)                                                             \ | ||||
|     {                                                                         \ | ||||
|         cursor = uchar_wrapper(fill(s, cursor), cursor.column);               \ | ||||
|         limit = uchar_wrapper (s->lim);                                       \ | ||||
|     }                                                                         \ | ||||
|     /**/ | ||||
| 
 | ||||
| #include <iostream> | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| #define BOOST_WAVE_UPDATE_CURSOR()                                            \ | ||||
|     {                                                                         \ | ||||
|         s->line += count_backslash_newlines(s, cursor);                       \ | ||||
|         s->curr_column = cursor.column;                                       \ | ||||
|         s->cur = cursor;                                                      \ | ||||
|         s->lim = limit;                                                       \ | ||||
|         s->ptr = marker;                                                      \ | ||||
|     }                                                                         \ | ||||
|     /**/ | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| #define BOOST_WAVE_RET(i)                                                     \ | ||||
|     {                                                                         \ | ||||
|         BOOST_WAVE_UPDATE_CURSOR()                                            \ | ||||
|         if (s->cur > s->lim)                                                  \ | ||||
|             return T_EOF;     /* may happen for empty files */                \ | ||||
|         return (i);                                                           \ | ||||
|     }                                                                         \ | ||||
|     /**/ | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| namespace boost { | ||||
| namespace wave { | ||||
| namespace cpplexer { | ||||
| namespace re2clex { | ||||
| 
 | ||||
| #define RE2C_ASSERT BOOST_ASSERT | ||||
| 
 | ||||
| int get_one_char(Scanner *s) | ||||
| { | ||||
|     if (0 != s->act) { | ||||
|         RE2C_ASSERT(s->first != 0 && s->last != 0); | ||||
|         RE2C_ASSERT(s->first <= s->act && s->act <= s->last); | ||||
|         if (s->act < s->last)  | ||||
|             return *(s->act)++; | ||||
|     } | ||||
|     return -1; | ||||
| } | ||||
| 
 | ||||
| std::ptrdiff_t rewind_stream (Scanner *s, int cnt) | ||||
| { | ||||
|     if (0 != s->act) { | ||||
|         RE2C_ASSERT(s->first != 0 && s->last != 0); | ||||
|         s->act += cnt; | ||||
|         RE2C_ASSERT(s->first <= s->act && s->act <= s->last); | ||||
|         return s->act - s->first; | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| std::size_t get_first_eol_offset(Scanner* s) | ||||
| { | ||||
|     if (!AQ_EMPTY(s->eol_offsets)) | ||||
|     { | ||||
|         return s->eol_offsets->queue[s->eol_offsets->head]; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         return (unsigned int)-1; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void adjust_eol_offsets(Scanner* s, std::size_t adjustment) | ||||
| { | ||||
|     aq_queue q; | ||||
|     std::size_t i; | ||||
|      | ||||
|     if (!s->eol_offsets) | ||||
|         s->eol_offsets = aq_create(); | ||||
| 
 | ||||
|     q = s->eol_offsets; | ||||
| 
 | ||||
|     if (AQ_EMPTY(q)) | ||||
|         return; | ||||
| 
 | ||||
|     i = q->head; | ||||
|     while (i != q->tail) | ||||
|     { | ||||
|         if (adjustment > q->queue[i]) | ||||
|             q->queue[i] = 0; | ||||
|         else | ||||
|             q->queue[i] -= adjustment; | ||||
|         ++i; | ||||
|         if (i == q->max_size) | ||||
|             i = 0; | ||||
|     } | ||||
|     if (adjustment > q->queue[i]) | ||||
|         q->queue[i] = 0; | ||||
|     else | ||||
|         q->queue[i] -= adjustment; | ||||
| } | ||||
| 
 | ||||
| int count_backslash_newlines(Scanner *s, uchar *cursor) | ||||
| { | ||||
|     std::size_t diff, offset; | ||||
|     int skipped = 0; | ||||
| 
 | ||||
|     /* figure out how many backslash-newlines skipped over unknowingly. */ | ||||
|     diff = cursor - s->bot; | ||||
|     offset = get_first_eol_offset(s); | ||||
|     while (offset <= diff && offset != (unsigned int)-1) | ||||
|     { | ||||
|         skipped++; | ||||
|         aq_pop(s->eol_offsets); | ||||
|         offset = get_first_eol_offset(s); | ||||
|     } | ||||
|     return skipped; | ||||
| } | ||||
| 
 | ||||
| bool is_backslash(uchar *p, uchar *end, int &len) | ||||
| { | ||||
|     if (*p == '\\') { | ||||
|         len = 1; | ||||
|         return true; | ||||
|     } | ||||
|     else if (*p == '?' && *(p+1) == '?' && (p+2 < end && *(p+2) == '/')) { | ||||
|         len = 3; | ||||
|         return true; | ||||
|     } | ||||
|     return false; | ||||
| } | ||||
| 
 | ||||
| uchar *fill(Scanner *s, uchar *cursor) | ||||
| { | ||||
|     using namespace std;    // some systems have memcpy etc. in namespace std
 | ||||
|     if(!s->eof) | ||||
|     { | ||||
|         uchar* p; | ||||
|         std::ptrdiff_t cnt = s->tok - s->bot; | ||||
|         if(cnt) | ||||
|         { | ||||
|             if (NULL == s->lim) | ||||
|                 s->lim = s->top; | ||||
|             memmove(s->bot, s->tok, s->lim - s->tok); | ||||
|             s->tok = s->cur = s->bot; | ||||
|             s->ptr -= cnt; | ||||
|             cursor -= cnt; | ||||
|             s->lim -= cnt; | ||||
|             adjust_eol_offsets(s, cnt); | ||||
|         } | ||||
| 
 | ||||
|         if((s->top - s->lim) < BOOST_WAVE_BSIZE) | ||||
|         { | ||||
|             uchar *buf = (uchar*) malloc(((s->lim - s->bot) + BOOST_WAVE_BSIZE)*sizeof(uchar)); | ||||
|             if (buf == 0) | ||||
|             { | ||||
|                 using namespace std;      // some systems have printf in std
 | ||||
|                 if (0 != s->error_proc) { | ||||
|                     (*s->error_proc)(s, lexing_exception::unexpected_error,  | ||||
|                         "Out of memory!"); | ||||
|                 } | ||||
|                 else  | ||||
|                     printf("Out of memory!\n"); | ||||
| 
 | ||||
|                 /* get the scanner to stop */ | ||||
|                 *cursor = 0; | ||||
|                 return cursor; | ||||
|             } | ||||
| 
 | ||||
|             memmove(buf, s->tok, s->lim - s->tok); | ||||
|             s->tok = s->cur = buf; | ||||
|             s->ptr = &buf[s->ptr - s->bot]; | ||||
|             cursor = &buf[cursor - s->bot]; | ||||
|             s->lim = &buf[s->lim - s->bot]; | ||||
|             s->top = &s->lim[BOOST_WAVE_BSIZE]; | ||||
|             free(s->bot); | ||||
|             s->bot = buf; | ||||
|         } | ||||
| 
 | ||||
|         if (s->act != 0) { | ||||
|             cnt = s->last - s->act; | ||||
|             if (cnt > BOOST_WAVE_BSIZE) | ||||
|                 cnt = BOOST_WAVE_BSIZE; | ||||
|             memmove(s->lim, s->act, cnt); | ||||
|             s->act += cnt; | ||||
|             if (cnt != BOOST_WAVE_BSIZE)  | ||||
|             { | ||||
|                 s->eof = &s->lim[cnt]; *(s->eof)++ = '\0'; | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         /* backslash-newline erasing time */ | ||||
| 
 | ||||
|         /* first scan for backslash-newline and erase them */ | ||||
|         for (p = s->lim; p < s->lim + cnt - 2; ++p) | ||||
|         { | ||||
|             int len = 0; | ||||
|             if (is_backslash(p, s->lim + cnt, len)) | ||||
|             { | ||||
|                 if (*(p+len) == '\n') | ||||
|                 { | ||||
|                     int offset = len + 1; | ||||
|                     memmove(p, p + offset, s->lim + cnt - p - offset); | ||||
|                     cnt -= offset; | ||||
|                     --p; | ||||
|                     aq_enqueue(s->eol_offsets, p - s->bot + 1);     | ||||
|                 } | ||||
|                 else if (*(p+len) == '\r') | ||||
|                 { | ||||
|                     if (*(p+len+1) == '\n') | ||||
|                     { | ||||
|                         int offset = len + 2; | ||||
|                         memmove(p, p + offset, s->lim + cnt - p - offset); | ||||
|                         cnt -= offset; | ||||
|                         --p; | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         int offset = len + 1; | ||||
|                         memmove(p, p + offset, s->lim + cnt - p - offset); | ||||
|                         cnt -= offset; | ||||
|                         --p; | ||||
|                     } | ||||
|                     aq_enqueue(s->eol_offsets, p - s->bot + 1);     | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         /* FIXME: the following code should be fixed to recognize correctly the 
 | ||||
|                   trigraph backslash token */ | ||||
|                    | ||||
|         /* check to see if what we just read ends in a backslash */ | ||||
|         if (cnt >= 2) | ||||
|         { | ||||
|             uchar last = s->lim[cnt-1]; | ||||
|             uchar last2 = s->lim[cnt-2]; | ||||
|             /* check \ EOB */ | ||||
|             if (last == '\\') | ||||
|             { | ||||
|                 int next = get_one_char(s); | ||||
|                 /* check for \ \n or \ \r or \ \r \n straddling the border */ | ||||
|                 if (next == '\n') | ||||
|                 { | ||||
|                     --cnt; /* chop the final \, we've already read the \n. */ | ||||
|                     aq_enqueue(s->eol_offsets, cnt + (s->lim - s->bot));     | ||||
|                 } | ||||
|                 else if (next == '\r') | ||||
|                 { | ||||
|                     int next2 = get_one_char(s); | ||||
|                     if (next2 == '\n') | ||||
|                     { | ||||
|                         --cnt; /* skip the backslash */ | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         /* rewind one, and skip one char */ | ||||
|                         rewind_stream(s, -1); | ||||
|                         --cnt; | ||||
|                     } | ||||
|                     aq_enqueue(s->eol_offsets, cnt + (s->lim - s->bot));     | ||||
|                 } | ||||
|                 else if (next != -1) /* -1 means end of file */ | ||||
|                 { | ||||
|                     /* next was something else, so rewind the stream */ | ||||
|                     rewind_stream(s, -1); | ||||
|                 } | ||||
|             } | ||||
|             /* check \ \r EOB */ | ||||
|             else if (last == '\r' && last2 == '\\') | ||||
|             { | ||||
|                 int next = get_one_char(s); | ||||
|                 if (next == '\n') | ||||
|                 { | ||||
|                     cnt -= 2; /* skip the \ \r */ | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     /* rewind one, and skip two chars */ | ||||
|                     rewind_stream(s, -1); | ||||
|                     cnt -= 2; | ||||
|                 } | ||||
|                 aq_enqueue(s->eol_offsets, cnt + (s->lim - s->bot));     | ||||
|             } | ||||
|             /* check \ \n EOB */ | ||||
|             else if (last == '\n' && last2 == '\\') | ||||
|             { | ||||
|                 cnt -= 2; | ||||
|                 aq_enqueue(s->eol_offsets, cnt + (s->lim - s->bot));     | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         s->lim += cnt; | ||||
|         if (s->eof) /* eof needs adjusting if we erased backslash-newlines */ | ||||
|         { | ||||
|             s->eof = s->lim; | ||||
|             *(s->eof)++ = '\0'; | ||||
|         } | ||||
|     } | ||||
|     return cursor; | ||||
| } | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  Special wrapper class holding the current cursor position 
 | ||||
| struct uchar_wrapper | ||||
| { | ||||
|     uchar_wrapper (uchar *base_cursor, unsigned int column = 1) | ||||
|     :   base_cursor(base_cursor), column(column) | ||||
|     {} | ||||
| 
 | ||||
|     uchar_wrapper& operator++()  | ||||
|     { | ||||
|         ++base_cursor; | ||||
|         ++column; | ||||
|         return *this; | ||||
|     } | ||||
| 
 | ||||
|     uchar_wrapper& operator--()  | ||||
|     { | ||||
|         --base_cursor; | ||||
|         --column; | ||||
|         return *this; | ||||
|     } | ||||
| 
 | ||||
|     uchar operator* () const | ||||
|     { | ||||
|         return *base_cursor; | ||||
|     } | ||||
| 
 | ||||
|     operator uchar *() const | ||||
|     { | ||||
|         return base_cursor; | ||||
|     } | ||||
| 
 | ||||
|     friend std::ptrdiff_t  | ||||
|     operator- (uchar_wrapper const& lhs, uchar_wrapper const& rhs) | ||||
|     { | ||||
|         return lhs.base_cursor - rhs.base_cursor; | ||||
|     } | ||||
| 
 | ||||
|     uchar *base_cursor; | ||||
|     unsigned int column; | ||||
| }; | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| boost::wave::token_id scan(Scanner *s) | ||||
| { | ||||
|     BOOST_ASSERT(0 != s->error_proc);     // error handler must be given
 | ||||
| 
 | ||||
|     uchar_wrapper cursor (s->tok = s->cur, s->column = s->curr_column); | ||||
|     uchar_wrapper marker (s->ptr); | ||||
|     uchar_wrapper limit (s->lim); | ||||
| 
 | ||||
| // include the correct Re2C token definition rules
 | ||||
| #if BOOST_WAVE_USE_STRICT_LEXER != 0 | ||||
| #include "strict_cpp_re.inc" | ||||
| #else | ||||
| #include "cpp_re.inc" | ||||
| #endif | ||||
| 
 | ||||
| } /* end of scan */ | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| }   // namespace re2clex
 | ||||
| }   // namespace cpplexer
 | ||||
| }   // namespace wave
 | ||||
| }   // namespace boost
 | ||||
| 
 | ||||
| #undef BOOST_WAVE_RET | ||||
| #undef BOOST_WAVE_BSIZE  | ||||
| #undef YYCTYPE | ||||
| #undef YYCURSOR | ||||
| #undef YYLIMIT | ||||
| #undef YYMARKER | ||||
| #undef YYFILL | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
							
								
								
									
										9044
									
								
								extern/shiny/Preprocessor/cpp_re.inc
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9044
									
								
								extern/shiny/Preprocessor/cpp_re.inc
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -1,52 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp> | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| #include <utility> | ||||
| 
 | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| #include <boost/wave/grammars/cpp_expression_grammar.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  
 | ||||
| //  Explicit instantiation of the expression_grammar_gen template with the 
 | ||||
| //  correct lexer iterator type. This instantiates the corresponding parse 
 | ||||
| //  function, which in turn instantiates the expression_grammar object (see 
 | ||||
| //  wave/grammars/cpp_expression_grammar.hpp)
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| // if you want to use your own token type the following line must be adjusted
 | ||||
| typedef boost::wave::cpplexer::lex_token<> token_type; | ||||
| 
 | ||||
| // no need to change anything below
 | ||||
| template struct boost::wave::grammars::expression_grammar_gen<token_type>; | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
 | ||||
| 
 | ||||
|  | @ -1,56 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp> | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| #include <list> | ||||
| 
 | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| #include <boost/wave/grammars/cpp_grammar.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  
 | ||||
| //  Explicit instantiation of the cpp_grammar_gen template with the correct
 | ||||
| //  token type. This instantiates the corresponding pt_parse function, which
 | ||||
| //  in turn instantiates the cpp_grammar object 
 | ||||
| //  (see wave/grammars/cpp_grammar.hpp)
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| // if you want to use your own token type the following line must be adjusted
 | ||||
| typedef boost::wave::cpplexer::lex_token<> token_type; | ||||
| 
 | ||||
| // no need to change anything below
 | ||||
| typedef boost::wave::cpplexer::lex_iterator<token_type> lexer_type; | ||||
| typedef std::list<token_type, boost::fast_pool_allocator<token_type> >  | ||||
|     token_sequence_type; | ||||
|      | ||||
| template struct boost::wave::grammars::cpp_grammar_gen<lexer_type, token_sequence_type>; | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
 | ||||
| 
 | ||||
|  | @ -1,56 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp> | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| #include <boost/wave/grammars/cpp_literal_grammar_gen.hpp> | ||||
| #include <boost/wave/grammars/cpp_intlit_grammar.hpp> | ||||
| #include <boost/wave/grammars/cpp_chlit_grammar.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  
 | ||||
| //  Explicit instantiation of the intlit_grammar_gen and chlit_grammar_gen 
 | ||||
| //  templates with the correct token type. This instantiates the corresponding 
 | ||||
| //  parse function, which in turn instantiates the corresponding parser object.
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| typedef boost::wave::cpplexer::lex_token<> token_type; | ||||
| 
 | ||||
| // no need to change anything below
 | ||||
| template struct boost::wave::grammars::intlit_grammar_gen<token_type>; | ||||
| #if BOOST_WAVE_WCHAR_T_SIGNEDNESS == BOOST_WAVE_WCHAR_T_AUTOSELECT || \ | ||||
|     BOOST_WAVE_WCHAR_T_SIGNEDNESS == BOOST_WAVE_WCHAR_T_FORCE_SIGNED | ||||
| template struct boost::wave::grammars::chlit_grammar_gen<int, token_type>; | ||||
| #endif | ||||
| template struct boost::wave::grammars::chlit_grammar_gen<unsigned int, token_type>; | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
 | ||||
| 
 | ||||
|  | @ -1,52 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp> | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| #include <boost/wave/grammars/cpp_defined_grammar.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  
 | ||||
| //  Explicit instantiation of the defined_grammar_gen template 
 | ||||
| //  with the correct token type. This instantiates the corresponding parse 
 | ||||
| //  function, which in turn instantiates the defined_grammar 
 | ||||
| //  object (see wave/grammars/cpp_defined_grammar.hpp)
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| // if you want to use your own token type the following line must be adjusted
 | ||||
| typedef boost::wave::cpplexer::lex_token<> token_type; | ||||
| 
 | ||||
| // no need to change anything below
 | ||||
| typedef boost::wave::cpplexer::lex_iterator<token_type> lexer_type; | ||||
| template struct boost::wave::grammars::defined_grammar_gen<lexer_type>; | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
 | ||||
| 
 | ||||
|  | @ -1,52 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp> | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| #include <boost/wave/grammars/cpp_predef_macros_grammar.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  
 | ||||
| //  Explicit instantiation of the predefined_macros_grammar_gen template 
 | ||||
| //  with the correct token type. This instantiates the corresponding pt_parse 
 | ||||
| //  function, which in turn instantiates the cpp_predefined_macros_grammar 
 | ||||
| //  object (see wave/grammars/cpp_predef_macros_grammar.hpp)
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| // if you want to use your own token type the following line must be adjusted
 | ||||
| typedef boost::wave::cpplexer::lex_token<> token_type; | ||||
| 
 | ||||
| // no need to change anything below
 | ||||
| typedef boost::wave::cpplexer::lex_iterator<token_type> lexer_type; | ||||
| template struct boost::wave::grammars::predefined_macros_grammar_gen<lexer_type>; | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
 | ||||
| 
 | ||||
|  | @ -1,65 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     Explicit instantiation of the lex_functor generation function | ||||
| 
 | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp>          // configuration data
 | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| #include <boost/wave/token_ids.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  The following file needs to be included only once throughout the whole
 | ||||
| //  program.
 | ||||
| #include <boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //
 | ||||
| //  This instantiates the correct 'new_lexer' function, which generates the 
 | ||||
| //  C++ lexer used in this sample. You will have to instantiate the 
 | ||||
| //  new_lexer_gen<> template with the same iterator type, as you have used for
 | ||||
| //  instantiating the boost::wave::context<> object.
 | ||||
| //
 | ||||
| //  This is moved into a separate compilation unit to decouple the compilation
 | ||||
| //  of the C++ lexer from the compilation of the other modules, which helps to 
 | ||||
| //  reduce compilation time.
 | ||||
| //
 | ||||
| //  The template parameter(s) supplied should be identical to the first 
 | ||||
| //  parameter supplied while instantiating the boost::wave::context<> template 
 | ||||
| //  (see the file cpp.cpp).
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| // if you want to use another iterator type for the underlying input stream
 | ||||
| // a corresponding explicit template instantiation needs to be added below
 | ||||
| template struct boost::wave::cpplexer::new_lexer_gen< | ||||
|     BOOST_WAVE_STRINGTYPE::iterator>; | ||||
| template struct boost::wave::cpplexer::new_lexer_gen< | ||||
|     BOOST_WAVE_STRINGTYPE::const_iterator>; | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
 | ||||
|  | @ -1,64 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     Explicit instantiation of the lex_functor generation function | ||||
|      | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| #include <boost/wave/wave_config.hpp>          // configuration data
 | ||||
| 
 | ||||
| #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| #include <boost/wave/token_ids.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_token.hpp> | ||||
| #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  The following file needs to be included only once throughout the whole
 | ||||
| //  program.
 | ||||
| #include <boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //
 | ||||
| //  If you've used another iterator type as std::string::iterator, you have to
 | ||||
| //  instantiate the new_lexer_gen<> template for this iterator type too.
 | ||||
| //  The reason is, that the library internally uses the new_lexer_gen<> 
 | ||||
| //  template with a std::string::iterator. (You just have to undefine the 
 | ||||
| //  following line.)
 | ||||
| //
 | ||||
| //  This is moved into a separate compilation unit to decouple the compilation
 | ||||
| //  of the C++ lexer from the compilation of the other modules, which helps to 
 | ||||
| //  reduce compilation time.
 | ||||
| //
 | ||||
| //  The template parameter(s) supplied should be identical to the first 
 | ||||
| //  parameter supplied while instantiating the boost::wave::context<> template 
 | ||||
| //  (see the file cpp.cpp).
 | ||||
| //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #if !defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING) | ||||
| template struct boost::wave::cpplexer::new_lexer_gen<std::string::iterator>; | ||||
| template struct boost::wave::cpplexer::new_lexer_gen<std::string::const_iterator>; | ||||
| #endif | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
 | ||||
							
								
								
									
										447
									
								
								extern/shiny/Preprocessor/token_ids.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										447
									
								
								extern/shiny/Preprocessor/token_ids.cpp
									
									
									
									
										vendored
									
									
								
							|  | @ -1,447 +0,0 @@ | |||
| /*=============================================================================
 | ||||
|     Boost.Wave: A Standard compliant C++ preprocessor library | ||||
|     The definition of a default set of token identifiers and related  | ||||
|     functions. | ||||
|      | ||||
|     http://www.boost.org/
 | ||||
| 
 | ||||
|     Copyright (c) 2001-2011 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)
 | ||||
| =============================================================================*/ | ||||
| 
 | ||||
| #define BOOST_WAVE_SOURCE 1 | ||||
| 
 | ||||
| // disable stupid compiler warnings
 | ||||
| #include <boost/config/warning_disable.hpp> | ||||
| 
 | ||||
| #include <string> | ||||
| #include <boost/assert.hpp> | ||||
| #include <boost/static_assert.hpp> | ||||
| 
 | ||||
| #include <boost/wave/wave_config.hpp> | ||||
| #include <boost/wave/token_ids.hpp> | ||||
| 
 | ||||
| // this must occur after all of the includes and before any code appears
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_PREFIX | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| namespace boost { | ||||
| namespace wave { | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  return a token name
 | ||||
| BOOST_WAVE_STRINGTYPE | ||||
| get_token_name(token_id tokid) | ||||
| { | ||||
| //  Table of token names
 | ||||
| //
 | ||||
| //      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[] = { | ||||
|     /* 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 */   "DELETE", | ||||
|     /* 320 */   "DO", | ||||
|     /* 321 */   "DOUBLE", | ||||
|     /* 322 */   "DYNAMICCAST", | ||||
|     /* 323 */   "ELSE", | ||||
|     /* 324 */   "ENUM", | ||||
|     /* 325 */   "EXPLICIT", | ||||
|     /* 326 */   "EXPORT", | ||||
|     /* 327 */   "EXTERN", | ||||
|     /* 328 */   "FLOAT", | ||||
|     /* 329 */   "FOR", | ||||
|     /* 330 */   "FRIEND", | ||||
|     /* 331 */   "GOTO", | ||||
|     /* 332 */   "IF", | ||||
|     /* 333 */   "INLINE", | ||||
|     /* 334 */   "INT", | ||||
|     /* 335 */   "LONG", | ||||
|     /* 336 */   "MUTABLE", | ||||
|     /* 337 */   "NAMESPACE", | ||||
|     /* 338 */   "NEW", | ||||
|     /* 339 */   "OPERATOR", | ||||
|     /* 340 */   "PRIVATE", | ||||
|     /* 341 */   "PROTECTED", | ||||
|     /* 342 */   "PUBLIC", | ||||
|     /* 343 */   "REGISTER", | ||||
|     /* 344 */   "REINTERPRETCAST", | ||||
|     /* 345 */   "RETURN", | ||||
|     /* 346 */   "SHORT", | ||||
|     /* 347 */   "SIGNED", | ||||
|     /* 348 */   "SIZEOF", | ||||
|     /* 349 */   "STATIC", | ||||
|     /* 350 */   "STATICCAST", | ||||
|     /* 351 */   "STRUCT", | ||||
|     /* 352 */   "SWITCH", | ||||
|     /* 353 */   "TEMPLATE", | ||||
|     /* 354 */   "THIS", | ||||
|     /* 355 */   "THROW", | ||||
|     /* 356 */   "TRY", | ||||
|     /* 357 */   "TYPEDEF", | ||||
|     /* 358 */   "TYPEID", | ||||
|     /* 359 */   "TYPENAME", | ||||
|     /* 360 */   "UNION", | ||||
|     /* 361 */   "UNSIGNED", | ||||
|     /* 362 */   "USING", | ||||
|     /* 363 */   "VIRTUAL", | ||||
|     /* 364 */   "VOID", | ||||
|     /* 365 */   "VOLATILE", | ||||
|     /* 366 */   "WCHART", | ||||
|     /* 367 */   "WHILE", | ||||
|     /* 368 */   "PP_DEFINE", | ||||
|     /* 369 */   "PP_IF", | ||||
|     /* 370 */   "PP_IFDEF", | ||||
|     /* 371 */   "PP_IFNDEF", | ||||
|     /* 372 */   "PP_ELSE", | ||||
|     /* 373 */   "PP_ELIF", | ||||
|     /* 374 */   "PP_ENDIF", | ||||
|     /* 375 */   "PP_ERROR", | ||||
|     /* 376 */   "PP_LINE", | ||||
|     /* 377 */   "PP_PRAGMA", | ||||
|     /* 378 */   "PP_UNDEF", | ||||
|     /* 379 */   "PP_WARNING", | ||||
|     /* 380 */   "IDENTIFIER", | ||||
|     /* 381 */   "OCTALINT", | ||||
|     /* 382 */   "DECIMALINT", | ||||
|     /* 383 */   "HEXAINT", | ||||
|     /* 384 */   "INTLIT", | ||||
|     /* 385 */   "LONGINTLIT", | ||||
|     /* 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", | ||||
|     /* 403 */   "PP_NUMBER", | ||||
| 
 | ||||
|               // MS extensions
 | ||||
|     /* 404 */   "MSEXT_INT8", | ||||
|     /* 405 */   "MSEXT_INT16", | ||||
|     /* 406 */   "MSEXT_INT32", | ||||
|     /* 407 */   "MSEXT_INT64", | ||||
|     /* 408 */   "MSEXT_BASED", | ||||
|     /* 409 */   "MSEXT_DECLSPEC", | ||||
|     /* 410 */   "MSEXT_CDECL", | ||||
|     /* 411 */   "MSEXT_FASTCALL", | ||||
|     /* 412 */   "MSEXT_STDCALL", | ||||
|     /* 413 */   "MSEXT_TRY", | ||||
|     /* 414 */   "MSEXT_EXCEPT", | ||||
|     /* 415 */   "MSEXT_FINALLY", | ||||
|     /* 416 */   "MSEXT_LEAVE", | ||||
|     /* 417 */   "MSEXT_INLINE", | ||||
|     /* 418 */   "MSEXT_ASM", | ||||
|     /* 419 */   "MSEXT_REGION", | ||||
|     /* 420 */   "MSEXT_ENDREGION", | ||||
|      | ||||
|     /* 421 */   "IMPORT", | ||||
|      | ||||
|     /* 422 */   "ALIGNAS", | ||||
|     /* 423 */   "ALIGNOF", | ||||
|     /* 424 */   "CHAR16_T", | ||||
|     /* 425 */   "CHAR32_T", | ||||
|     /* 426 */   "CONSTEXPR", | ||||
|     /* 427 */   "DECLTYPE", | ||||
|     /* 428 */   "NOEXCEPT", | ||||
|     /* 429 */   "NULLPTR", | ||||
|     /* 430 */   "STATIC_ASSERT", | ||||
|     /* 431 */   "THREADLOCAL", | ||||
|     /* 432 */   "RAWSTRINGLIT", | ||||
|     }; | ||||
| 
 | ||||
|     // make sure, I have not forgotten any commas (as I did more than once)
 | ||||
|     BOOST_STATIC_ASSERT( | ||||
|         sizeof(tok_names)/sizeof(tok_names[0]) == T_LAST_TOKEN-T_FIRST_TOKEN | ||||
|     ); | ||||
| 
 | ||||
|     unsigned int id = BASEID_FROM_TOKEN(tokid)-T_FIRST_TOKEN; | ||||
|     return (id < T_LAST_TOKEN-T_FIRST_TOKEN) ? tok_names[id] : "<UnknownToken>"; | ||||
| } | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| //  return a token name
 | ||||
| char const * | ||||
| get_token_value(token_id tokid) | ||||
| { | ||||
| //  Table of token values
 | ||||
| //
 | ||||
| //      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_values[] = { | ||||
|     /* 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 */   "delete", | ||||
|     /* 320 */   "do", | ||||
|     /* 321 */   "double", | ||||
|     /* 322 */   "dynamic_cast", | ||||
|     /* 323 */   "else", | ||||
|     /* 324 */   "enum", | ||||
|     /* 325 */   "explicit", | ||||
|     /* 326 */   "export", | ||||
|     /* 327 */   "extern", | ||||
|     /* 328 */   "float", | ||||
|     /* 329 */   "for", | ||||
|     /* 330 */   "friend", | ||||
|     /* 331 */   "goto", | ||||
|     /* 332 */   "if", | ||||
|     /* 333 */   "inline", | ||||
|     /* 334 */   "int", | ||||
|     /* 335 */   "long", | ||||
|     /* 336 */   "mutable", | ||||
|     /* 337 */   "namespace", | ||||
|     /* 338 */   "new", | ||||
|     /* 339 */   "operator", | ||||
|     /* 340 */   "private", | ||||
|     /* 341 */   "protected", | ||||
|     /* 342 */   "public", | ||||
|     /* 343 */   "register", | ||||
|     /* 344 */   "reinterpret_cast", | ||||
|     /* 345 */   "return", | ||||
|     /* 346 */   "short", | ||||
|     /* 347 */   "signed", | ||||
|     /* 348 */   "sizeof", | ||||
|     /* 349 */   "static", | ||||
|     /* 350 */   "static_cast", | ||||
|     /* 351 */   "struct", | ||||
|     /* 352 */   "switch", | ||||
|     /* 353 */   "template", | ||||
|     /* 354 */   "this", | ||||
|     /* 355 */   "throw", | ||||
|     /* 356 */   "try", | ||||
|     /* 357 */   "typedef", | ||||
|     /* 358 */   "typeid", | ||||
|     /* 359 */   "typename", | ||||
|     /* 360 */   "union", | ||||
|     /* 361 */   "unsigned", | ||||
|     /* 362 */   "using", | ||||
|     /* 363 */   "virtual", | ||||
|     /* 364 */   "void", | ||||
|     /* 365 */   "volatile", | ||||
|     /* 366 */   "wchar_t", | ||||
|     /* 367 */   "while", | ||||
|     /* 368 */   "#define", | ||||
|     /* 369 */   "#if", | ||||
|     /* 370 */   "#ifdef", | ||||
|     /* 371 */   "#ifndef", | ||||
|     /* 372 */   "#else", | ||||
|     /* 373 */   "#elif", | ||||
|     /* 374 */   "#endif", | ||||
|     /* 375 */   "#error", | ||||
|     /* 376 */   "#line", | ||||
|     /* 377 */   "#pragma", | ||||
|     /* 378 */   "#undef", | ||||
|     /* 379 */   "#warning", | ||||
|     /* 380 */   "",   // identifier
 | ||||
|     /* 381 */   "",   // octalint
 | ||||
|     /* 382 */   "",   // decimalint
 | ||||
|     /* 383 */   "",   // hexlit
 | ||||
|     /* 384 */   "",   // intlit
 | ||||
|     /* 385 */   "",   // longintlit
 | ||||
|     /* 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
 | ||||
|     /* 403 */   "",   // pp-number
 | ||||
| 
 | ||||
|               // MS extensions
 | ||||
|     /* 404 */   "__int8", | ||||
|     /* 405 */   "__int16", | ||||
|     /* 406 */   "__int32", | ||||
|     /* 407 */   "__int64", | ||||
|     /* 408 */   "__based", | ||||
|     /* 409 */   "__declspec", | ||||
|     /* 410 */   "__cdecl", | ||||
|     /* 411 */   "__fastcall", | ||||
|     /* 412 */   "__stdcall", | ||||
|     /* 413 */   "__try", | ||||
|     /* 414 */   "__except", | ||||
|     /* 415 */   "__finally", | ||||
|     /* 416 */   "__leave", | ||||
|     /* 417 */   "__inline", | ||||
|     /* 418 */   "__asm", | ||||
|     /* 419 */   "#region", | ||||
|     /* 420 */   "#endregion", | ||||
|      | ||||
|     /* 421 */   "import", | ||||
|      | ||||
|     /* 422 */   "alignas", | ||||
|     /* 423 */   "alignof", | ||||
|     /* 424 */   "char16_t", | ||||
|     /* 425 */   "char32_t", | ||||
|     /* 426 */   "constexpr", | ||||
|     /* 427 */   "decltype", | ||||
|     /* 428 */   "noexcept", | ||||
|     /* 429 */   "nullptr", | ||||
|     /* 430 */   "static_assert", | ||||
|     /* 431 */   "threadlocal", | ||||
|     /* 432 */   "",   // extrawstringlit
 | ||||
|     };    | ||||
|       | ||||
|     // make sure, I have not forgotten any commas (as I did more than once)
 | ||||
|     BOOST_STATIC_ASSERT( | ||||
|         sizeof(tok_values)/sizeof(tok_values[0]) == T_LAST_TOKEN-T_FIRST_TOKEN | ||||
|     ); | ||||
| 
 | ||||
|     unsigned int id = BASEID_FROM_TOKEN(tokid)-T_FIRST_TOKEN; | ||||
|     return (id < T_LAST_TOKEN-T_FIRST_TOKEN) ? tok_values[id] : "<UnknownToken>"; | ||||
| } | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////////////////////////
 | ||||
| }   // namespace wave
 | ||||
| }   // namespace boost
 | ||||
| 
 | ||||
| // the suffix header occurs after all of the code
 | ||||
| #ifdef BOOST_HAS_ABI_HEADERS | ||||
| #include BOOST_ABI_SUFFIX | ||||
| #endif | ||||
| 
 | ||||
| 
 | ||||
		Loading…
	
		Reference in a new issue