From 7b35b828337ed4e07826c944826c265904799c02 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 6 Nov 2012 19:09:44 +0100 Subject: [PATCH] adding shiny --- extern/shiny/CMakeLists.txt | 72 + extern/shiny/Docs/Configurations.dox | 32 + extern/shiny/Docs/Doxyfile | 1826 ++++ extern/shiny/Docs/GettingStarted.dox | 65 + extern/shiny/Docs/Lod.dox | 49 + extern/shiny/Docs/Macros.dox | 270 + extern/shiny/Docs/Mainpage.dox | 13 + extern/shiny/Docs/Materials.dox | 128 + extern/shiny/Extra/core.h | 168 + extern/shiny/License.txt | 9 + extern/shiny/Main/Factory.cpp | 583 ++ extern/shiny/Main/Factory.hpp | 207 + extern/shiny/Main/Language.hpp | 16 + extern/shiny/Main/MaterialInstance.cpp | 218 + extern/shiny/Main/MaterialInstance.hpp | 104 + extern/shiny/Main/MaterialInstancePass.cpp | 16 + extern/shiny/Main/MaterialInstancePass.hpp | 29 + .../Main/MaterialInstanceTextureUnit.cpp | 14 + .../Main/MaterialInstanceTextureUnit.hpp | 26 + extern/shiny/Main/Platform.cpp | 94 + extern/shiny/Main/Platform.hpp | 145 + extern/shiny/Main/Preprocessor.cpp | 99 + extern/shiny/Main/Preprocessor.hpp | 69 + extern/shiny/Main/PropertyBase.cpp | 268 + extern/shiny/Main/PropertyBase.hpp | 235 + extern/shiny/Main/ScriptLoader.cpp | 401 + extern/shiny/Main/ScriptLoader.hpp | 134 + extern/shiny/Main/ShaderInstance.cpp | 707 ++ extern/shiny/Main/ShaderInstance.hpp | 71 + extern/shiny/Main/ShaderSet.cpp | 172 + extern/shiny/Main/ShaderSet.hpp | 71 + .../shiny/Platforms/Ogre/OgreGpuProgram.cpp | 70 + .../shiny/Platforms/Ogre/OgreGpuProgram.hpp | 31 + extern/shiny/Platforms/Ogre/OgreMaterial.cpp | 99 + extern/shiny/Platforms/Ogre/OgreMaterial.hpp | 38 + .../Platforms/Ogre/OgreMaterialSerializer.cpp | 67 + .../Platforms/Ogre/OgreMaterialSerializer.hpp | 29 + extern/shiny/Platforms/Ogre/OgrePass.cpp | 128 + extern/shiny/Platforms/Ogre/OgrePass.hpp | 35 + extern/shiny/Platforms/Ogre/OgrePlatform.cpp | 174 + extern/shiny/Platforms/Ogre/OgrePlatform.hpp | 72 + .../Platforms/Ogre/OgreTextureUnitState.cpp | 40 + .../Platforms/Ogre/OgreTextureUnitState.hpp | 27 + extern/shiny/Preprocessor/aq.cpp | 236 + extern/shiny/Preprocessor/cpp_re.cpp | 442 + extern/shiny/Preprocessor/cpp_re.inc | 9044 +++++++++++++++++ .../instantiate_cpp_exprgrammar.cpp | 52 + .../Preprocessor/instantiate_cpp_grammar.cpp | 56 + .../instantiate_cpp_literalgrs.cpp | 56 + .../instantiate_defined_grammar.cpp | 52 + .../instantiate_predef_macros.cpp | 52 + .../Preprocessor/instantiate_re2c_lexer.cpp | 65 + .../instantiate_re2c_lexer_str.cpp | 64 + extern/shiny/Preprocessor/token_ids.cpp | 447 + extern/shiny/Readme.txt | 33 + 55 files changed, 17720 insertions(+) create mode 100644 extern/shiny/CMakeLists.txt create mode 100644 extern/shiny/Docs/Configurations.dox create mode 100644 extern/shiny/Docs/Doxyfile create mode 100644 extern/shiny/Docs/GettingStarted.dox create mode 100644 extern/shiny/Docs/Lod.dox create mode 100644 extern/shiny/Docs/Macros.dox create mode 100644 extern/shiny/Docs/Mainpage.dox create mode 100644 extern/shiny/Docs/Materials.dox create mode 100644 extern/shiny/Extra/core.h create mode 100644 extern/shiny/License.txt create mode 100644 extern/shiny/Main/Factory.cpp create mode 100644 extern/shiny/Main/Factory.hpp create mode 100644 extern/shiny/Main/Language.hpp create mode 100644 extern/shiny/Main/MaterialInstance.cpp create mode 100644 extern/shiny/Main/MaterialInstance.hpp create mode 100644 extern/shiny/Main/MaterialInstancePass.cpp create mode 100644 extern/shiny/Main/MaterialInstancePass.hpp create mode 100644 extern/shiny/Main/MaterialInstanceTextureUnit.cpp create mode 100644 extern/shiny/Main/MaterialInstanceTextureUnit.hpp create mode 100644 extern/shiny/Main/Platform.cpp create mode 100644 extern/shiny/Main/Platform.hpp create mode 100644 extern/shiny/Main/Preprocessor.cpp create mode 100644 extern/shiny/Main/Preprocessor.hpp create mode 100644 extern/shiny/Main/PropertyBase.cpp create mode 100644 extern/shiny/Main/PropertyBase.hpp create mode 100644 extern/shiny/Main/ScriptLoader.cpp create mode 100644 extern/shiny/Main/ScriptLoader.hpp create mode 100644 extern/shiny/Main/ShaderInstance.cpp create mode 100644 extern/shiny/Main/ShaderInstance.hpp create mode 100644 extern/shiny/Main/ShaderSet.cpp create mode 100644 extern/shiny/Main/ShaderSet.hpp create mode 100644 extern/shiny/Platforms/Ogre/OgreGpuProgram.cpp create mode 100644 extern/shiny/Platforms/Ogre/OgreGpuProgram.hpp create mode 100644 extern/shiny/Platforms/Ogre/OgreMaterial.cpp create mode 100644 extern/shiny/Platforms/Ogre/OgreMaterial.hpp create mode 100644 extern/shiny/Platforms/Ogre/OgreMaterialSerializer.cpp create mode 100644 extern/shiny/Platforms/Ogre/OgreMaterialSerializer.hpp create mode 100644 extern/shiny/Platforms/Ogre/OgrePass.cpp create mode 100644 extern/shiny/Platforms/Ogre/OgrePass.hpp create mode 100644 extern/shiny/Platforms/Ogre/OgrePlatform.cpp create mode 100644 extern/shiny/Platforms/Ogre/OgrePlatform.hpp create mode 100644 extern/shiny/Platforms/Ogre/OgreTextureUnitState.cpp create mode 100644 extern/shiny/Platforms/Ogre/OgreTextureUnitState.hpp create mode 100644 extern/shiny/Preprocessor/aq.cpp create mode 100644 extern/shiny/Preprocessor/cpp_re.cpp create mode 100644 extern/shiny/Preprocessor/cpp_re.inc create mode 100644 extern/shiny/Preprocessor/instantiate_cpp_exprgrammar.cpp create mode 100644 extern/shiny/Preprocessor/instantiate_cpp_grammar.cpp create mode 100644 extern/shiny/Preprocessor/instantiate_cpp_literalgrs.cpp create mode 100644 extern/shiny/Preprocessor/instantiate_defined_grammar.cpp create mode 100644 extern/shiny/Preprocessor/instantiate_predef_macros.cpp create mode 100644 extern/shiny/Preprocessor/instantiate_re2c_lexer.cpp create mode 100644 extern/shiny/Preprocessor/instantiate_re2c_lexer_str.cpp create mode 100644 extern/shiny/Preprocessor/token_ids.cpp create mode 100644 extern/shiny/Readme.txt diff --git a/extern/shiny/CMakeLists.txt b/extern/shiny/CMakeLists.txt new file mode 100644 index 000000000..c27850ed6 --- /dev/null +++ b/extern/shiny/CMakeLists.txt @@ -0,0 +1,72 @@ +cmake_minimum_required(VERSION 2.8) + +# This is NOT intended as a stand-alone build system! Instead, you should include this from the main CMakeLists of your project. +# Make sure to link against Ogre and boost::filesystem. + +option(SHINY_BUILD_OGRE_PLATFORM "build the Ogre platform" ON) + +set(SHINY_LIBRARY "shiny") +set(SHINY_OGREPLATFORM_LIBRARY "shiny.OgrePlatform") + +# Sources +file(GLOB SOURCE_FILES Main/*.cpp ) + +set(SOURCE_FILES + Main/Factory.cpp + Main/MaterialInstance.cpp + Main/MaterialInstancePass.cpp + Main/MaterialInstanceTextureUnit.cpp + Main/Platform.cpp + Main/Preprocessor.cpp + Main/PropertyBase.cpp + Main/ScriptLoader.cpp + Main/ShaderInstance.cpp + Main/ShaderSet.cpp +) + +# In Debug mode, write the shader sources to the current directory +if (DEFINED CMAKE_BUILD_TYPE) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DSHINY_WRITE_SHADER_DEBUG) + endif() +endif() + +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 + Platforms/Ogre/OgreMaterialSerializer.cpp + Platforms/Ogre/OgrePass.cpp + Platforms/Ogre/OgrePlatform.cpp + Platforms/Ogre/OgreTextureUnitState.cpp +) + +file(GLOB OGRE_PLATFORM_SOURCE_FILES Platforms/Ogre/*.cpp) + +add_library(${SHINY_LIBRARY} STATIC ${SOURCE_FILES}) + +if (SHINY_BUILD_OGRE_PLATFORM) + add_library(${SHINY_OGREPLATFORM_LIBRARY} STATIC ${OGRE_PLATFORM_SOURCE_FILES}) +endif() + + +link_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/extern/shiny/Docs/Configurations.dox b/extern/shiny/Docs/Configurations.dox new file mode 100644 index 000000000..affd91423 --- /dev/null +++ b/extern/shiny/Docs/Configurations.dox @@ -0,0 +1,32 @@ +/*! + + \page configurations Configurations + + A common task in shader development is to provide a different set of simpler shaders for all your materials. Some examples: + - When rendering cubic or planar reflection maps in real-time, you will want to disable shadows. + - For an in-game minimap render target, you don't want to have fog. + + For this task, the library provides a \a Configuration concept. + + A Configuration is a set of properties that can override global settings, as long as this Configuration is active. + + Here's an example. Say you have a global setting with the name 'shadows' that controls if your materials receive shadows. + + Now, lets create a configuration for our reflection render targets that disables shadows for all materials. Paste the following in a new file with the extension '.configuration': + + \code + configuration reflection_targets + { + shadows false + } + \endcode + + \note You may also create configurations using sh::Factory::registerConfiguration. + + The active Configuration is controlled by the active material scheme in Ogre. So, in order to use the configuration "reflection_targets" for your reflection renders, simply call + \code + viewport->setMaterialScheme ("reflection_targets"); + \endcode + on the Ogre viewport of your reflection render! + +*/ diff --git a/extern/shiny/Docs/Doxyfile b/extern/shiny/Docs/Doxyfile new file mode 100644 index 000000000..3564c45f6 --- /dev/null +++ b/extern/shiny/Docs/Doxyfile @@ -0,0 +1,1826 @@ +# Doxyfile 1.8.1.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = shiny + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = /home/scrawl/sh_doxy/generated + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all +# comments according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you +# can mix doxygen, HTML, and XML commands with Markdown formatting. +# Disable only in case of backward compatibilities issues. + +MARKDOWN_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 0 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C, C++ and Fortran comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of +# entries shown in the various tree structured indices initially; the user +# can expand and collapse entries dynamically later on. Doxygen will expand +# the tree to such a level that at most the specified number of entries are +# visible (unless a fully collapsed tree already exceeds this amount). +# So setting the number of entries 1 will produce a full collapsed tree by +# default. 0 is a special value representing an infinite number of entries +# and will result in a full expanded tree by default. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you may also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to +# the MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. However, it is strongly recommended to install a local +# copy of MathJax from http://www.mathjax.org before deployment. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. For each +# tag file the location of the external documentation should be added. The +# format of a tag file without this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths +# or URLs. Note that each tag file must have a unique name (where the name does +# NOT include the path). If a tag file is not located in the directory in which +# doxygen is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside +# the class node. If there are many fields or methods and many nodes the +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS +# threshold limits the number of items for each type to make the size more +# managable. Set this to 0 for no limit. Note that the threshold may be +# exceeded by 50% before the limit is enforced. + +UML_LIMIT_NUM_FIELDS = 10 + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/extern/shiny/Docs/GettingStarted.dox b/extern/shiny/Docs/GettingStarted.dox new file mode 100644 index 000000000..b9cf58e23 --- /dev/null +++ b/extern/shiny/Docs/GettingStarted.dox @@ -0,0 +1,65 @@ +/*! + \page getting-started Getting started + + \section download Download the source + + \code + git clone git@github.com:scrawl/shiny.git + \endcode + + \section building Build the source + + The source files you want to build are: + - Main/*.cpp + - Preprocessor/*.cpp (unless you are using the system install of boost::wave, more below) + - Platforms/Ogre/*.cpp + + You can either build the sources as a static library, or simply add the sources to the source tree of your project. + + If you use CMake, you might find the included CMakeLists.txt useful. It builds static libraries with the names "shiny" and "shiny.OgrePlatform". + + \note The CMakeLists.txt is not intended as a stand-alone build system! Instead, you should include this from the main CMakeLists of your project. + + Make sure to link against OGRE and the boost filesystem library. + + If your boost version is older than 1.49, you must set the SHINY_USE_WAVE_SYSTEM_INSTALL variable and additionally link against the boost wave library. + + \code + set(SHINY_USE_WAVE_SYSTEM_INSTALL "TRUE") + \endcode + + \section code Basic initialisation code + + Add the following code to your application: + + \code{cpp} + + #include + #include + + .... + + sh::OgrePlatform* platform = new sh::OgrePlatform( + "General", // OGRE Resource group to use for creating materials. + myApplication.getDataPath() + "/" + "materials" // Path to look for materials and shaders. NOTE: This does NOT use the Ogre resource system, so you have to specify an absolute path. + ); + + sh::Factory* factory = new sh::Factory(platform); + + // Set a language. Valid options: CG, HLSL, GLSL + factory->setCurrentLanguage(sh::Language_GLSL); + + factory->loadAllFiles(); + + .... + your application runs here + .... + + // don't forget to delete on exit + delete factory; + + \endcode + + That's it! Now you can start defining materials. Refer to the page \ref defining-materials-shaders . + +*/ diff --git a/extern/shiny/Docs/Lod.dox b/extern/shiny/Docs/Lod.dox new file mode 100644 index 000000000..37d004638 --- /dev/null +++ b/extern/shiny/Docs/Lod.dox @@ -0,0 +1,49 @@ +/*! + + \page lod Material LOD + + \section howitworks How it works + + When Ogre requests a technique for a specific LOD index, the Factory selects the appropriate LOD configuration which then temporarily overrides the global settings in the shaders. We can use this to disable shader features one by one at a lower LOD, resulting in simpler and faster techniques for distant objects. + + \section howtouseit How to use it + + - Create a file with the extension '.lod'. There you can specify shader features to disable at a specific LOD level. Higher LOD index refers to a lower LOD. Example contents: + + \code + lod_configuration 1 + { + specular_mapping false + } + + lod_configuration 2 + { + specular_mapping false + normal_mapping false + } + + lod_configuration 3 + { + terrain_composite_map true + specular_mapping false + normal_mapping false + } + \endcode + + \note You can also add LOD configurations by calling \a sh::Factory::registerLodConfiguration. + + \note Do not use an index of 0. LOD 0 refers to the highest LOD, and you will never want to disable features at the highest LOD level. + + + - In your materials, specify the distances at which a lower LOD kicks in. Note that the actual distance might also be affected by the viewport and current entity LOD bias. In this example, the first LOD level (lod index 1) would normally be applied at a distance of 100 units, the next after 300, and the last after 1000 units. + + \code + material sample_material + { + lod_values 100 300 1000 + + ... your passes, texture units etc ... + } + \endcode + +*/ diff --git a/extern/shiny/Docs/Macros.dox b/extern/shiny/Docs/Macros.dox new file mode 100644 index 000000000..0578c447f --- /dev/null +++ b/extern/shiny/Docs/Macros.dox @@ -0,0 +1,270 @@ +/*! + \page macros Shader Macros + + \tableofcontents + + \section Shader Language + + These macros are automatically defined, depending on the shader language that has been set by the application using sh::Factory::setCurrentLanguage. + + - SH_GLSL + - SH_HLSL + - SH_CG + + Example: + + \code + #if SH_GLSL == 1 + // glsl porting code + #endif + + #if SH_CG == 1 || SH_HLSL == 1 + // cg / hlsl porting code (similiar syntax) + #endif + \endcode + + \note It is encouraged to use the shipped porting header (extra/core.h) by #include-ing it in your shaders. If you do that, you should not have to use the above macros directly. + + \section vertex-fragment Vertex / fragment shader + + These macros are automatically defined, depending on the type of shader that is currently being compiled. + + - SH_VERTEX_SHADER + - SH_FRAGMENT_SHADER + + If you use the same source file for both vertex and fragment shader, then it is advised to use these macros for blending out the unused source. This will reduce your compile time. + + \section passthrough Vertex -> Fragment passthrough + + In shader development, a common task is to pass variables from the vertex to the fragment shader. This is no problem if you have a deterministic shader source (i.e. no #ifdefs). + + However, as soon as you begin to have lots of permutations of the same shader source, a problem arises. All current GPUs have a limit of 8 vertex to fragment passthroughs (with 4 components each, for example a float4). + + A common optimization is to put several individual float values together in a float4 (so-called "Packing"). But if your shader has lots of permutations and the passthrough elements you actually need are not known beforehand, it can be very tedious to pack manually. With the following macros, packing can become easier. + + \subsection shAllocatePassthrough shAllocatePassthrough + + Usage: \@shAllocatePassthrough(num_components, name) + + Example: + \code + #if FRAGMENT_NEED_DEPTH + @shAllocatePassthrough(1, depth) + #endif + \endcode + + This is the first thing you should do before using any of the macros below. + + \subsection shPassthroughVertexOutputs shPassthroughVertexOutputs + + Usage: \@shPassthroughVertexOutputs + + Use this in the inputs/outputs section of your vertex shader, in order to declare all the outputs that are needed for packing the variables that you want passed to the fragment. + + \subsection shPassthroughFragmentInputs shPassthroughFragmentInputs + + Usage: \@shPassthroughFragmentInputs + + Use this in the inputs/outputs section of your fragment shader, in order to declare all the inputs that are needed for receiving the variables that you want passed to the fragment. + + \subsection shPassthroughAssign shPassthroughAssign + + Usage: \@shPassthroughAssign(name, value) + + Use this in the vertex shader for assigning a value to the variable you want passed to the fragment. + + Example: + \code + #if FRAGMENT_NEED_DEPTH + @shPassthroughAssign(depth, shOutputPosition.z); + #endif + + \endcode + + \subsection shPassthroughReceive shPassthroughReceive + + Usage: \@shPassthroughReceive(name) + + Use this in the fragment shader to receive the passed value. + + Example: + + \code + #if FRAGMENT_NEED_DEPTH + float depth = @shPassthroughReceive(depth); + #endif + \endcode + + \section texUnits Texture units + + \subsection shUseSampler shUseSampler + + Usage: \@shUseSampler(samplerName) + + Requests the texture unit with name \a samplerName to be available for use in this pass. + + Why is this necessary? If you have a derived material that does not use all of the texture units that its parent defines (for example, if an optional asset such as a normal map is not available), there would be no way to know which texture units are actually needed and which can be skipped in the creation process (those that are never referenced in the shader). + + \section properties Property retrieval / binding + + \subsection shUniformProperty shUniformProperty + + Usage: \@shUniformProperty<4f|3f|2f|1f|int> (uniformName, property) + + Binds the value of \a property (from the shader_properties of the pass this shader belongs to) to the uniform with name \a uniformName. + + The following variants are available, depending on the type of your uniform variable: + - \@shUniformProperty4f + - \@shUniformProperty3f + - \@shUniformProperty2f + - \@shUniformProperty1f + - \@shUniformPropertyInt + + Example: \@shUniformProperty1f (uFresnelScale, fresnelScale) + + \subsection shPropertyBool shPropertyBool + + Retrieve a boolean property of the pass that this shader belongs to, gets replaced with either 0 or 1. + + Usage: \@shPropertyBool(propertyName) + + Example: + \code + #if @shPropertyBool(has_normal_map) + ... + #endif + \endcode + + \subsection shPropertyNotBool shPropertyNotBool + + Same as shPropertyBool, but inverts the result (i.e. when shPropertyBool would return 0, this returns 1 and vice versa) + + \subsection shPropertyString shPropertyString + + Retrieve a string property of the pass that this shader belongs to + + Usage: \@shPropertyString(propertyName) + + \subsection shPropertyEqual shPropertyEqual + + Check if the value of a property equals a specific value, gets replaced with either 0 or 1. This is useful because the preprocessor cannot compare strings, only numbers. + + Usage: \@shPropertyEqual(propertyName, value) + + Example: + \code + #if @shPropertyEqual(lighting_mode, phong) + ... + #endif + \endcode + + \section globalSettings Global settings + + \subsection shGlobalSettingBool shGlobalSettingBool + + Retrieves the boolean value of a specific global setting, gets replaced with either 0 or 1. The value can be set using sh::Factory::setGlobalSetting. + + Usage: \@shGlobalSettingBool(settingName) + + \subsection shGlobalSettingEqual shGlobalSettingEqual + + Check if the value of a global setting equals a specific value, gets replaced with either 0 or 1. This is useful because the preprocessor cannot compare strings, only numbers. + + Usage: \@shGlobalSettingEqual(settingName, value) + + \subsection shGlobalSettingString shGlobalSettingString + + Gets replaced with the current value of a given global setting. The value can be set using sh::Factory::setGlobalSetting. + + Usage: \@shGlobalSettingString(settingName) + + \section sharedParams Shared parameters + + \subsection shSharedParameter shSharedParameter + + Allows you to bind a custom value to a uniform parameter. + + Usage: \@shSharedParameter(sharedParameterName) + + Example: \@shSharedParameter(pssmSplitPoints) - now the uniform parameter 'pssmSplitPoints' can be altered in all shaders that use it by executing sh::Factory::setSharedParameter("pssmSplitPoints", value) + + \note You may use the same shared parameter in as many shaders as you want. But don't forget to add the \@shSharedParameter macro to every shader that uses this shared parameter. + + \section autoconstants Auto constants + + \subsection shAutoConstant shAutoConstant + + Usage: \@shAutoConstant(uniformName, autoConstantName, [extraData]) + + Example: \@shAutoConstant(uModelViewMatrix, worldviewproj_matrix) + + Example: \@shAutoConstant(uLightPosition4, light_position, 4) + + Binds auto constant with name \a autoConstantName to the uniform \a uniformName. Optionally, you may specify extra data (for example the light index), as required by some auto constants. + + The auto constant names are the same as Ogre's. Read the section "3.1.9 Using Vertex/Geometry/Fragment Programs in a Pass" of the Ogre manual for a list of all auto constant names. + + \section misc Misc + + \subsection shForeach shForeach + + Usage: \@shForeach(n) + + Repeats the content of this foreach block \a n times. The end of the block is marked via \@shEndForeach, and the current iteration number can be retrieved via \@shIterator. + + \note Nested foreach blocks are currently \a not supported. + + \note For technical reasons, you can only use constant numbers, properties (\@shPropertyString) or global settings (\@shGlobalSettingString) as \a n parameter. + + Example: + + \code + @shForeach(3) + this is iteration number @shIterator + @shEndForeach + + Gets replaced with: + + this is iteration number 0 + this is iteration number 1 + this is iteration number 2 + \endcode + + Optionally, you can pass a constant offset to \@shIterator. Example: + + \code + @shForeach(3) + this is iteration number @shIterator(7) + @shEndForeach + + Gets replaced with: + + this is iteration number 7 + this is iteration number 8 + this is iteration number 9 + \endcode + + \subsection shCounter shCounter + + Gets replaced after the preprocessing step with the number that equals the n-th occurence of counters of the same ID. + + Usage: \@shCounter(ID) + + Example: + \code + @shCounter(0) + @shCounter(0) + @shCounter(1) + @shCounter(0) + \endcode + + Gets replaced with: + + \code + 0 + 1 + 0 + 2 + \endcode + +*/ diff --git a/extern/shiny/Docs/Mainpage.dox b/extern/shiny/Docs/Mainpage.dox new file mode 100644 index 000000000..fb8f596dc --- /dev/null +++ b/extern/shiny/Docs/Mainpage.dox @@ -0,0 +1,13 @@ +/*! + + \mainpage + + - \ref getting-started + - \ref defining-materials-shaders + - \ref macros + - \ref configurations + - \ref lod + + - sh::Factory - the main interface class + +*/ diff --git a/extern/shiny/Docs/Materials.dox b/extern/shiny/Docs/Materials.dox new file mode 100644 index 000000000..2dae60560 --- /dev/null +++ b/extern/shiny/Docs/Materials.dox @@ -0,0 +1,128 @@ +/*! + + \page defining-materials-shaders Defining materials and shaders + + \section first-material Your first material + + Create a file called "myFirstMaterial.mat" and place it in the path you have used in your initialisation code (see \ref getting-started). Paste the following: + + \code + + material my_first_material + { + diffuse 1.0 1.0 1.0 1.0 + specular 0.4 0.4 0.4 32 + ambient 1.0 1.0 1.0 + emissive 0.0 0.0 0.0 + diffuseMap black.png + + pass + { + diffuse $diffuse + specular $specular + ambient $ambient + emissive $emissive + + texture_unit diffuseMap + { + texture $diffuseMap + create_in_ffp true // use this texture unit for fixed function pipeline + } + } + } + + material material1 + { + parent my_first_material + diffuseMap texture1.png + } + + material material2 + { + parent my_first_material + diffuseMap texture2.png + } + + \endcode + + \section first-shader The first shader + + Change the 'pass' section to include some shaders: + + \code + pass + { + vertex_program my_first_shader_vertex + fragment_program my_first_shader_fragment + ... + } + \endcode + + \note This does \a not refer to a single shader with a fixed source code, but in fact will automatically create a new \a instance of this shader (if necessary), which can have its own uniform variables, compile-time macros and much more! + + Next, we're going to define our shaders. Paste this in a new file called 'myfirstshader.shaderset' + + \code + shader_set my_first_shader_vertex + { + source example.shader + type vertex + profiles_cg vs_2_0 arbvp1 + profiles_hlsl vs_2_0 + } + + shader_set my_first_shader_fragment + { + source example.shader + type fragment + profiles_cg ps_2_x ps_2_0 ps arbfp1 + profiles_hlsl ps_2_0 + } + \endcode + + Some notes: + - 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' + + \code + #include "core.h" + + #ifdef SH_VERTEX_SHADER + + SH_BEGIN_PROGRAM + shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix) + shInput(float2, uv0) + shOutput(float2, UV) + SH_START_PROGRAM + { + shOutputPosition = shMatrixMult(wvp, shInputPosition); + UV = uv0; + } + + #else + + SH_BEGIN_PROGRAM + // NOTE: It is important that the sampler name here (diffuseMap) matches + // the name of the texture unit in the material. This is necessary because the system + // skips texture units that are never "referenced" in the shader. This can be the case + // when your base material has optional assets (for example a normal map) that are not + // used by some derived materials. + shSampler2D(diffuseMap) + shInput(float2, UV) + SH_START_PROGRAM + { + shOutputColour(0) = shSample(diffuseMap, UV); + } + + #endif + + \endcode + + There you have it! This shader will compile in several languages thanks to the porting defines in "core.h". If you need more defines, feel free to add them and don't forget to send them to me! + + For a full list of macros available when writing your shaders, refer to the page \ref macros + + In the future, some more in-depth shader examples might follow. +*/ diff --git a/extern/shiny/Extra/core.h b/extern/shiny/Extra/core.h new file mode 100644 index 000000000..cba716777 --- /dev/null +++ b/extern/shiny/Extra/core.h @@ -0,0 +1,168 @@ +#if SH_HLSL == 1 || SH_CG == 1 + + #define shTexture2D sampler2D + #define shSample(tex, coord) tex2D(tex, coord) + #define shCubicSample(tex, coord) texCUBE(tex, coord) + #define shLerp(a, b, t) lerp(a, b, t) + #define shSaturate(a) saturate(a) + + #define shSampler2D(name) , uniform sampler2D name : register(s@shCounter(0)) @shUseSampler(name) + + #define shSamplerCube(name) , uniform samplerCUBE name : register(s@shCounter(0)) @shUseSampler(name) + + #define shMatrixMult(m, v) mul(m, v) + + #define shUniform(type, name) , uniform type name + + #define shTangentInput(type) , in type tangent : TANGENT + #define shVertexInput(type, name) , in type name : TEXCOORD@shCounter(1) + #define shInput(type, name) , in type name : TEXCOORD@shCounter(1) + #define shOutput(type, name) , out type name : TEXCOORD@shCounter(2) + + #define shNormalInput(type) , in type normal : NORMAL + + #define shColourInput(type) , in type colour : COLOR + + #ifdef SH_VERTEX_SHADER + + #define shOutputPosition oPosition + #define shInputPosition iPosition + + + #define SH_BEGIN_PROGRAM \ + void main( \ + float4 iPosition : POSITION \ + , out float4 oPosition : POSITION + + #define SH_START_PROGRAM \ + ) \ + + #endif + + #ifdef SH_FRAGMENT_SHADER + + #define shOutputColour(num) oColor##num + + #define shDeclareMrtOutput(num) , out float4 oColor##num : COLOR##num + + #define SH_BEGIN_PROGRAM \ + void main( \ + out float4 oColor0 : COLOR + + #define SH_START_PROGRAM \ + ) \ + + #endif + +#endif + +#if SH_GLSL == 1 + + @version 120 + + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define int2 ivec2 + #define int3 ivec3 + #define int4 ivec4 + #define shTexture2D sampler2D + #define shSample(tex, coord) texture2D(tex, coord) + #define shCubicSample(tex, coord) textureCube(tex, coord) + #define shLerp(a, b, t) mix(a, b, t) + #define shSaturate(a) clamp(a, 0.0, 1.0) + + #define shUniform(type, name) uniform type name; + + #define shSampler2D(name) uniform sampler2D name; @shUseSampler(name) + + #define shSamplerCube(name) uniform samplerCube name; @shUseSampler(name) + + #define shMatrixMult(m, v) (m * v) + + #define shOutputPosition gl_Position + + #define float4x4 mat4 + #define float3x3 mat3 + + // GLSL 1.3 + #if 0 + + // automatically recognized by ogre when the input name equals this + #define shInputPosition vertex + + #define shOutputColour(num) oColor##num + + #define shTangentInput(type) in type tangent; + #define shVertexInput(type, name) in type name; + #define shInput(type, name) in type name; + #define shOutput(type, name) out type name; + + // automatically recognized by ogre when the input name equals this + #define shNormalInput(type) in type normal; + #define shColourInput(type) in type colour; + + #ifdef SH_VERTEX_SHADER + + #define SH_BEGIN_PROGRAM \ + in float4 vertex; + #define SH_START_PROGRAM \ + void main(void) + + #endif + + #ifdef SH_FRAGMENT_SHADER + + #define shDeclareMrtOutput(num) out vec4 oColor##num; + + #define SH_BEGIN_PROGRAM \ + out float4 oColor0; + #define SH_START_PROGRAM \ + void main(void) + + + #endif + + #endif + + // GLSL 1.2 + + #if 1 + + // automatically recognized by ogre when the input name equals this + #define shInputPosition vertex + + #define shOutputColour(num) gl_FragData[num] + + #define shTangentInput(type) attribute type tangent; + #define shVertexInput(type, name) attribute type name; + #define shInput(type, name) varying type name; + #define shOutput(type, name) varying type name; + + // automatically recognized by ogre when the input name equals this + #define shNormalInput(type) attribute type normal; + #define shColourInput(type) attribute type colour; + + #ifdef SH_VERTEX_SHADER + + #define SH_BEGIN_PROGRAM \ + attribute vec4 vertex; + #define SH_START_PROGRAM \ + void main(void) + + #endif + + #ifdef SH_FRAGMENT_SHADER + + #define shDeclareMrtOutput(num) + + #define SH_BEGIN_PROGRAM + + #define SH_START_PROGRAM \ + void main(void) + + + #endif + + #endif +#endif diff --git a/extern/shiny/License.txt b/extern/shiny/License.txt new file mode 100644 index 000000000..d89bcf3ad --- /dev/null +++ b/extern/shiny/License.txt @@ -0,0 +1,9 @@ +Copyright (c) 2012 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + diff --git a/extern/shiny/Main/Factory.cpp b/extern/shiny/Main/Factory.cpp new file mode 100644 index 000000000..678ee25c9 --- /dev/null +++ b/extern/shiny/Main/Factory.cpp @@ -0,0 +1,583 @@ +#include "Factory.hpp" + +#include +#include + +#include +#include +#include + +#include "Platform.hpp" +#include "ScriptLoader.hpp" +#include "ShaderSet.hpp" +#include "MaterialInstanceTextureUnit.hpp" + +namespace sh +{ + Factory* Factory::sThis = 0; + + Factory& Factory::getInstance() + { + assert (sThis); + return *sThis; + } + + Factory* Factory::getInstancePtr() + { + return sThis; + } + + Factory::Factory (Platform* platform) + : mPlatform(platform) + , mShadersEnabled(true) + , mShaderDebugOutputEnabled(false) + , mCurrentLanguage(Language_None) + , mListener(NULL) + , mCurrentConfiguration(NULL) + , mCurrentLodConfiguration(NULL) + , mReadMicrocodeCache(false) + , mWriteMicrocodeCache(false) + , mReadSourceCache(false) + , mWriteSourceCache(false) + { + assert (!sThis); + sThis = this; + + mPlatform->setFactory(this); + } + + void Factory::loadAllFiles() + { + assert(mCurrentLanguage != Language_None); + + bool anyShaderDirty = false; + + if (boost::filesystem::exists (mPlatform->getCacheFolder () + "/lastModified.txt")) + { + std::ifstream file; + file.open(std::string(mPlatform->getCacheFolder () + "/lastModified.txt").c_str()); + + std::string line; + while (getline(file, line)) + { + std::string sourceFile = line; + + if (!getline(file, line)) + assert(0); + + int modified = boost::lexical_cast(line); + + mShadersLastModified[sourceFile] = modified; + } + } + + // load configurations + { + ScriptLoader shaderSetLoader(".configuration"); + ScriptLoader::loadAllFiles (&shaderSetLoader, mPlatform->getBasePath()); + std::map nodes = shaderSetLoader.getAllConfigScripts(); + for (std::map ::const_iterator it = nodes.begin(); + it != nodes.end(); ++it) + { + if (!(it->second->getName() == "configuration")) + { + std::cerr << "sh::Factory: Warning: Unsupported root node type \"" << it->second->getName() << "\" for file type .configuration" << std::endl; + break; + } + + PropertySetGet newConfiguration; + newConfiguration.setParent(&mGlobalSettings); + + std::vector props = it->second->getChildren(); + for (std::vector::const_iterator propIt = props.begin(); propIt != props.end(); ++propIt) + { + std::string name = (*propIt)->getName(); + std::string val = (*propIt)->getValue(); + + newConfiguration.setProperty (name, makeProperty(val)); + } + + mConfigurations[it->first] = newConfiguration; + } + } + + // load lod configurations + { + ScriptLoader lodLoader(".lod"); + ScriptLoader::loadAllFiles (&lodLoader, mPlatform->getBasePath()); + std::map nodes = lodLoader.getAllConfigScripts(); + for (std::map ::const_iterator it = nodes.begin(); + it != nodes.end(); ++it) + { + if (!(it->second->getName() == "lod_configuration")) + { + std::cerr << "sh::Factory: Warning: Unsupported root node type \"" << it->second->getName() << "\" for file type .lod" << std::endl; + break; + } + + if (it->first == "0") + { + throw std::runtime_error("lod level 0 (max lod) can't have a configuration"); + } + + PropertySetGet newLod; + + std::vector props = it->second->getChildren(); + for (std::vector::const_iterator propIt = props.begin(); propIt != props.end(); ++propIt) + { + std::string name = (*propIt)->getName(); + std::string val = (*propIt)->getValue(); + + newLod.setProperty (name, makeProperty(val)); + } + + mLodConfigurations[boost::lexical_cast(it->first)] = newLod; + } + } + + // load shader sets + { + ScriptLoader shaderSetLoader(".shaderset"); + ScriptLoader::loadAllFiles (&shaderSetLoader, mPlatform->getBasePath()); + std::map nodes = shaderSetLoader.getAllConfigScripts(); + for (std::map ::const_iterator it = nodes.begin(); + it != nodes.end(); ++it) + { + if (!(it->second->getName() == "shader_set")) + { + std::cerr << "sh::Factory: Warning: Unsupported root node type \"" << it->second->getName() << "\" for file type .shaderset" << std::endl; + break; + } + + if (!it->second->findChild("profiles_cg")) + throw std::runtime_error ("missing \"profiles_cg\" field for \"" + it->first + "\""); + if (!it->second->findChild("profiles_hlsl")) + throw std::runtime_error ("missing \"profiles_hlsl\" field for \"" + it->first + "\""); + if (!it->second->findChild("source")) + throw std::runtime_error ("missing \"source\" field for \"" + it->first + "\""); + if (!it->second->findChild("type")) + throw std::runtime_error ("missing \"type\" field for \"" + it->first + "\""); + + std::vector profiles_cg; + boost::split (profiles_cg, it->second->findChild("profiles_cg")->getValue(), boost::is_any_of(" ")); + std::string cg_profile; + for (std::vector::iterator it2 = profiles_cg.begin(); it2 != profiles_cg.end(); ++it2) + { + if (mPlatform->isProfileSupported(*it2)) + { + cg_profile = *it2; + break; + } + } + + std::vector profiles_hlsl; + boost::split (profiles_hlsl, it->second->findChild("profiles_hlsl")->getValue(), boost::is_any_of(" ")); + std::string hlsl_profile; + for (std::vector::iterator it2 = profiles_hlsl.begin(); it2 != profiles_hlsl.end(); ++it2) + { + if (mPlatform->isProfileSupported(*it2)) + { + hlsl_profile = *it2; + break; + } + } + + std::string sourceFile = mPlatform->getBasePath() + "/" + it->second->findChild("source")->getValue(); + + ShaderSet newSet (it->second->findChild("type")->getValue(), cg_profile, hlsl_profile, + sourceFile, + mPlatform->getBasePath(), + it->first, + &mGlobalSettings); + + int lastModified = boost::filesystem::last_write_time (boost::filesystem::path(sourceFile)); + if (mShadersLastModified.find(sourceFile) != mShadersLastModified.end() + && mShadersLastModified[sourceFile] != lastModified) + { + newSet.markDirty (); + anyShaderDirty = true; + } + + mShadersLastModified[sourceFile] = lastModified; + + mShaderSets.insert(std::make_pair(it->first, newSet)); + } + } + + // load materials + { + ScriptLoader materialLoader(".mat"); + ScriptLoader::loadAllFiles (&materialLoader, mPlatform->getBasePath()); + + std::map nodes = materialLoader.getAllConfigScripts(); + for (std::map ::const_iterator it = nodes.begin(); + it != nodes.end(); ++it) + { + if (!(it->second->getName() == "material")) + { + std::cerr << "sh::Factory: Warning: Unsupported root node type \"" << it->second->getName() << "\" for file type .mat" << std::endl; + break; + } + + MaterialInstance newInstance(it->first, this); + newInstance.create(mPlatform); + if (!mShadersEnabled) + newInstance.setShadersEnabled (false); + + newInstance.setSourceFile (it->second->m_fileName); + + std::vector props = it->second->getChildren(); + for (std::vector::const_iterator propIt = props.begin(); propIt != props.end(); ++propIt) + { + std::string name = (*propIt)->getName(); + + std::string val = (*propIt)->getValue(); + + if (name == "pass") + { + MaterialInstancePass* newPass = newInstance.createPass(); + std::vector props2 = (*propIt)->getChildren(); + for (std::vector::const_iterator propIt2 = props2.begin(); propIt2 != props2.end(); ++propIt2) + { + std::string name2 = (*propIt2)->getName(); + std::string val2 = (*propIt2)->getValue(); + + if (name2 == "shader_properties") + { + std::vector shaderProps = (*propIt2)->getChildren(); + for (std::vector::const_iterator shaderPropIt = shaderProps.begin(); shaderPropIt != shaderProps.end(); ++shaderPropIt) + { + std::string val = (*shaderPropIt)->getValue(); + newPass->mShaderProperties.setProperty((*shaderPropIt)->getName(), makeProperty(val)); + } + } + else if (name2 == "texture_unit") + { + MaterialInstanceTextureUnit* newTex = newPass->createTextureUnit(val2); + std::vector texProps = (*propIt2)->getChildren(); + for (std::vector::const_iterator texPropIt = texProps.begin(); texPropIt != texProps.end(); ++texPropIt) + { + std::string val = (*texPropIt)->getValue(); + newTex->setProperty((*texPropIt)->getName(), makeProperty(val)); + } + } + else + newPass->setProperty((*propIt2)->getName(), makeProperty(val2)); + } + } + else if (name == "parent") + newInstance.setParentInstance(val); + else + newInstance.setProperty((*propIt)->getName(), makeProperty(val)); + } + + if (newInstance.hasProperty("create_configuration")) + { + std::string config = retrieveValue(newInstance.getProperty("create_configuration"), NULL).get(); + newInstance.createForConfiguration (config, 0); + } + + mMaterials.insert (std::make_pair(it->first, newInstance)); + } + + // now that all materials are loaded, replace the parent names with the actual pointers to parent + for (MaterialMap::iterator it = mMaterials.begin(); it != mMaterials.end(); ++it) + { + std::string parent = it->second.getParentInstance(); + if (parent != "") + { + if (mMaterials.find (it->second.getParentInstance()) == mMaterials.end()) + throw std::runtime_error ("Unable to find parent for material instance \"" + it->first + "\""); + it->second.setParent(&mMaterials.find(parent)->second); + } + } + } + + if (mPlatform->supportsShaderSerialization () && mReadMicrocodeCache && !anyShaderDirty) + { + std::string file = mPlatform->getCacheFolder () + "/shShaderCache.txt"; + if (boost::filesystem::exists(file)) + { + mPlatform->deserializeShaders (file); + } + } + } + + Factory::~Factory () + { + if (mPlatform->supportsShaderSerialization () && mWriteMicrocodeCache) + { + std::string file = mPlatform->getCacheFolder () + "/shShaderCache.txt"; + mPlatform->serializeShaders (file); + } + + if (mReadSourceCache) + { + // save the last modified time of shader sources + std::ofstream file; + file.open(std::string(mPlatform->getCacheFolder () + "/lastModified.txt").c_str()); + + for (LastModifiedMap::const_iterator it = mShadersLastModified.begin(); it != mShadersLastModified.end(); ++it) + { + file << it->first << "\n" << it->second << std::endl; + } + + file.close(); + } + + delete mPlatform; + sThis = 0; + } + + MaterialInstance* Factory::searchInstance (const std::string& name) + { + if (mMaterials.find(name) != mMaterials.end()) + return &mMaterials.find(name)->second; + + return NULL; + } + + MaterialInstance* Factory::findInstance (const std::string& name) + { + assert (mMaterials.find(name) != mMaterials.end()); + return &mMaterials.find(name)->second; + } + + MaterialInstance* Factory::requestMaterial (const std::string& name, const std::string& configuration, unsigned short lodIndex) + { + MaterialInstance* m = searchInstance (name); + + if (configuration != "Default" && mConfigurations.find(configuration) == mConfigurations.end()) + return NULL; + + if (m) + { + // make sure all lod techniques below (higher lod) exist + int i = lodIndex; + while (i>0) + { + --i; + m->createForConfiguration (configuration, i); + + if (mListener) + mListener->materialCreated (m, configuration, i); + } + + m->createForConfiguration (configuration, lodIndex); + if (mListener) + mListener->materialCreated (m, configuration, lodIndex); + } + return m; + } + + MaterialInstance* Factory::createMaterialInstance (const std::string& name, const std::string& parentInstance) + { + if (parentInstance != "" && mMaterials.find(parentInstance) == mMaterials.end()) + throw std::runtime_error ("trying to clone material that does not exist"); + + MaterialInstance newInstance(name, this); + + if (!mShadersEnabled) + newInstance.setShadersEnabled(false); + + if (parentInstance != "") + newInstance.setParent (&mMaterials.find(parentInstance)->second); + + newInstance.create(mPlatform); + + mMaterials.insert (std::make_pair(name, newInstance)); + + return &mMaterials.find(name)->second; + } + + void Factory::destroyMaterialInstance (const std::string& name) + { + if (mMaterials.find(name) != mMaterials.end()) + mMaterials.erase(name); + } + + void Factory::setShadersEnabled (bool enabled) + { + mShadersEnabled = enabled; + for (MaterialMap::iterator it = mMaterials.begin(); it != mMaterials.end(); ++it) + { + it->second.setShadersEnabled(enabled); + } + } + + void Factory::setGlobalSetting (const std::string& name, const std::string& value) + { + bool changed = true; + if (mGlobalSettings.hasProperty(name)) + changed = (retrieveValue(mGlobalSettings.getProperty(name), NULL).get() != value); + + mGlobalSettings.setProperty (name, makeProperty(new StringValue(value))); + + if (changed) + { + for (MaterialMap::iterator it = mMaterials.begin(); it != mMaterials.end(); ++it) + { + it->second.destroyAll(); + } + } + } + + void Factory::setSharedParameter (const std::string& name, PropertyValuePtr value) + { + mPlatform->setSharedParameter(name, value); + } + + ShaderSet* Factory::getShaderSet (const std::string& name) + { + return &mShaderSets.find(name)->second; + } + + Platform* Factory::getPlatform () + { + return mPlatform; + } + + Language Factory::getCurrentLanguage () + { + return mCurrentLanguage; + } + + void Factory::setCurrentLanguage (Language lang) + { + bool changed = (mCurrentLanguage != lang); + mCurrentLanguage = lang; + + if (changed) + { + for (MaterialMap::iterator it = mMaterials.begin(); it != mMaterials.end(); ++it) + { + it->second.destroyAll(); + } + } + } + + MaterialInstance* Factory::getMaterialInstance (const std::string& name) + { + return findInstance(name); + } + + void Factory::setTextureAlias (const std::string& alias, const std::string& realName) + { + mTextureAliases[alias] = realName; + + // update the already existing texture units + for (std::map::iterator it = mTextureAliasInstances.begin(); it != mTextureAliasInstances.end(); ++it) + { + if (it->second == alias) + { + it->first->setTextureName(realName); + } + } + } + + std::string Factory::retrieveTextureAlias (const std::string& name) + { + if (mTextureAliases.find(name) != mTextureAliases.end()) + return mTextureAliases[name]; + else + return ""; + } + + PropertySetGet* Factory::getConfiguration (const std::string& name) + { + return &mConfigurations[name]; + } + + void Factory::registerConfiguration (const std::string& name, PropertySetGet configuration) + { + mConfigurations[name] = configuration; + mConfigurations[name].setParent (&mGlobalSettings); + } + + void Factory::registerLodConfiguration (int index, PropertySetGet configuration) + { + mLodConfigurations[index] = configuration; + } + + void Factory::setMaterialListener (MaterialListener* listener) + { + mListener = listener; + } + + void Factory::addTextureAliasInstance (const std::string& name, TextureUnitState* t) + { + mTextureAliasInstances[t] = name; + } + + void Factory::removeTextureAliasInstances (TextureUnitState* t) + { + mTextureAliasInstances.erase(t); + } + + void Factory::setActiveConfiguration (const std::string& configuration) + { + if (configuration == "Default") + mCurrentConfiguration = 0; + else + { + assert (mConfigurations.find(configuration) != mConfigurations.end()); + mCurrentConfiguration = &mConfigurations[configuration]; + } + } + + void Factory::setActiveLodLevel (int level) + { + if (level == 0) + mCurrentLodConfiguration = 0; + else + { + assert (mLodConfigurations.find(level) != mLodConfigurations.end()); + mCurrentLodConfiguration = &mLodConfigurations[level]; + } + } + + void Factory::setShaderDebugOutputEnabled (bool enabled) + { + mShaderDebugOutputEnabled = enabled; + } + + PropertySetGet* Factory::getCurrentGlobalSettings() + { + PropertySetGet* p = &mGlobalSettings; + + // current global settings are affected by active configuration & active lod configuration + + if (mCurrentConfiguration) + { + p = mCurrentConfiguration; + } + + if (mCurrentLodConfiguration) + { + mCurrentLodConfiguration->setParent(p); + p = mCurrentLodConfiguration; + } + + return p; + } + + void Factory::saveMaterials (const std::string& filename) + { + std::ofstream file; + file.open (filename.c_str ()); + + for (MaterialMap::iterator it = mMaterials.begin(); it != mMaterials.end(); ++it) + { + it->second.save(file); + } + + file.close(); + } + + void Factory::_ensureMaterial(const std::string& name, const std::string& configuration) + { + MaterialInstance* m = searchInstance (name); + assert(m); + m->createForConfiguration (configuration, 0); + } +} diff --git a/extern/shiny/Main/Factory.hpp b/extern/shiny/Main/Factory.hpp new file mode 100644 index 000000000..799dd71eb --- /dev/null +++ b/extern/shiny/Main/Factory.hpp @@ -0,0 +1,207 @@ +#ifndef SH_FACTORY_H +#define SH_FACTORY_H + +#include +#include + +#include "MaterialInstance.hpp" +#include "ShaderSet.hpp" +#include "Language.hpp" + +namespace sh +{ + class Platform; + + typedef std::map MaterialMap; + typedef std::map ShaderSetMap; + typedef std::map ConfigurationMap; + typedef std::map LodConfigurationMap; + typedef std::map LastModifiedMap; + + typedef std::map TextureAliasMap; + + /** + * @brief + * Allows you to be notified when a certain material was just created. Useful for changing material properties that you can't + * do in a .mat script (for example a series of animated textures) \n + * When receiving the event, you can get the platform material by calling m->getMaterial() + * and casting that to the platform specific material (e.g. for Ogre, sh::OgreMaterial) + */ + class MaterialListener + { + public: + virtual void materialCreated (MaterialInstance* m, const std::string& configuration, unsigned short lodIndex) = 0; + }; + + /** + * @brief + * The main interface class + */ + class Factory + { + public: + Factory(Platform* platform); + ///< @note Ownership of \a platform is transferred to this class, so you don't have to delete it. + + ~Factory(); + + /** + * Create a MaterialInstance, optionally copying all properties from \a parentInstance + * @param name name of the new instance + * @param name of the parent (optional) + * @return newly created instance + */ + MaterialInstance* createMaterialInstance (const std::string& name, const std::string& parentInstance = ""); + + /// @note It is safe to call this if the instance does not exist + void destroyMaterialInstance (const std::string& name); + + /// Use this to enable or disable shaders on-the-fly + void setShadersEnabled (bool enabled); + + /// write generated shaders to current directory, useful for debugging + void setShaderDebugOutputEnabled (bool enabled); + + /// Use this to manage user settings. \n + /// Global settings can be retrieved in shaders through a macro. \n + /// When a global setting is changed, the shaders that depend on them are recompiled automatically. + void setGlobalSetting (const std::string& name, const std::string& value); + + /// Adjusts the given shared parameter. \n + /// Internally, this will change all uniform parameters of this name marked with the macro \@shSharedParameter \n + /// @param name of the shared parameter + /// @param value of the parameter, use sh::makeProperty to construct this value + void setSharedParameter (const std::string& name, PropertyValuePtr value); + + Language getCurrentLanguage (); + + /// Switch between different shader languages (cg, glsl, hlsl) + void setCurrentLanguage (Language lang); + + /// Get a MaterialInstance by name + MaterialInstance* getMaterialInstance (const std::string& name); + + /// Register a configuration, which can then be used by switching the active material scheme + void registerConfiguration (const std::string& name, PropertySetGet configuration); + + /// Register a lod configuration, which can then be used by setting up lod distance values for the material \n + /// 0 refers to highest lod, so use 1 or higher as index parameter + void registerLodConfiguration (int index, PropertySetGet configuration); + + /// Set an alias name for a texture, the real name can then be retrieved with the "texture_alias" + /// property in a texture unit - this is useful if you don't know the name of your texture beforehand. \n + /// Example: \n + /// - In the material definition: texture_alias ReflectionMap \n + /// - At runtime: factory->setTextureAlias("ReflectionMap", "rtt_654654"); \n + /// You can call factory->setTextureAlias as many times as you want, and if the material was already created, its texture will be updated! + void setTextureAlias (const std::string& alias, const std::string& realName); + + /// Retrieve the real texture name for a texture alias (the real name is set by the user) + std::string retrieveTextureAlias (const std::string& name); + + /// Attach a listener for material created events + void setMaterialListener (MaterialListener* listener); + + /// Call this after you have set up basic stuff, like the shader language. + void loadAllFiles (); + + /// Controls writing of generated shader source code to the cache folder, so that the + /// (rather expensive) preprocessing step can be skipped on the next run. See Factory::setReadSourceCache \n + /// \note The default is off (no cache writing) + void setWriteSourceCache(bool write) { mWriteSourceCache = write; } + + /// Controls reading of generated shader sources from the cache folder + /// \note The default is off (no cache reading) + /// \note Even if microcode caching is enabled, generating (or caching) the source is still required due to the macros. + void setReadSourceCache(bool read) { mReadSourceCache = read; } + + /// Controls writing the microcode of the generated shaders to the cache folder. Microcode is machine independent + /// and loads very fast compared to regular compilation. Note that the availability of this feature depends on the \a Platform. + /// \note The default is off (no cache writing) + void setWriteMicrocodeCache(bool write) { mWriteMicrocodeCache = write; } + + /// Controls reading of shader microcode from the cache folder. Microcode is machine independent + /// and loads very fast compared to regular compilation. Note that the availability of this feature depends on the \a Platform. + /// \note The default is off (no cache reading) + void setReadMicrocodeCache(bool read) { mReadMicrocodeCache = read; } + + /// Saves all the materials that were initially loaded from the file with this name + void saveMaterials (const std::string& filename); + + static Factory& getInstance(); + ///< Return instance of this class. + + static Factory* getInstancePtr(); + + /// Make sure a material technique is loaded.\n + /// You will probably never have to use this. + void _ensureMaterial(const std::string& name, const std::string& configuration); + + private: + + MaterialInstance* requestMaterial (const std::string& name, const std::string& configuration, unsigned short lodIndex); + ShaderSet* getShaderSet (const std::string& name); + PropertySetGet* getConfiguration (const std::string& name); + Platform* getPlatform (); + + PropertySetGet* getCurrentGlobalSettings(); + + void addTextureAliasInstance (const std::string& name, TextureUnitState* t); + void removeTextureAliasInstances (TextureUnitState* t); + + std::string getCacheFolder () { return mPlatform->getCacheFolder (); } + bool getReadSourceCache() { return mReadSourceCache; } + bool getWriteSourceCache() { return mReadSourceCache; } + public: + bool getWriteMicrocodeCache() { return mWriteMicrocodeCache; } // Fixme + + private: + void setActiveConfiguration (const std::string& configuration); + void setActiveLodLevel (int level); + + bool getShaderDebugOutputEnabled() { return mShaderDebugOutputEnabled; } + + std::map mTextureAliasInstances; + + friend class Platform; + friend class MaterialInstance; + friend class ShaderInstance; + friend class ShaderSet; + friend class TextureUnitState; + + private: + static Factory* sThis; + + bool mShadersEnabled; + bool mShaderDebugOutputEnabled; + + bool mReadMicrocodeCache; + bool mWriteMicrocodeCache; + bool mReadSourceCache; + bool mWriteSourceCache; + + MaterialMap mMaterials; + ShaderSetMap mShaderSets; + ConfigurationMap mConfigurations; + LodConfigurationMap mLodConfigurations; + LastModifiedMap mShadersLastModified; + + PropertySetGet mGlobalSettings; + + PropertySetGet* mCurrentConfiguration; + PropertySetGet* mCurrentLodConfiguration; + + TextureAliasMap mTextureAliases; + + Language mCurrentLanguage; + + MaterialListener* mListener; + + Platform* mPlatform; + + MaterialInstance* findInstance (const std::string& name); + MaterialInstance* searchInstance (const std::string& name); + }; +} + +#endif diff --git a/extern/shiny/Main/Language.hpp b/extern/shiny/Main/Language.hpp new file mode 100644 index 000000000..20bf8ed61 --- /dev/null +++ b/extern/shiny/Main/Language.hpp @@ -0,0 +1,16 @@ +#ifndef SH_LANGUAGE_H +#define SH_LANGUAGE_H + +namespace sh +{ + enum Language + { + Language_CG, + Language_HLSL, + Language_GLSL, + Language_Count, + Language_None + }; +} + +#endif diff --git a/extern/shiny/Main/MaterialInstance.cpp b/extern/shiny/Main/MaterialInstance.cpp new file mode 100644 index 000000000..3abc781f6 --- /dev/null +++ b/extern/shiny/Main/MaterialInstance.cpp @@ -0,0 +1,218 @@ +#include "MaterialInstance.hpp" + +#include + +#include "Factory.hpp" +#include "ShaderSet.hpp" + +namespace sh +{ + MaterialInstance::MaterialInstance (const std::string& name, Factory* f) + : mName(name) + , mShadersEnabled(true) + , mFactory(f) + , mListener(NULL) + { + } + + MaterialInstance::~MaterialInstance () + { + } + + void MaterialInstance::setParentInstance (const std::string& name) + { + mParentInstance = name; + } + + std::string MaterialInstance::getParentInstance () + { + return mParentInstance; + } + + void MaterialInstance::create (Platform* platform) + { + mMaterial = platform->createMaterial(mName); + + if (hasProperty ("shadow_caster_material")) + mMaterial->setShadowCasterMaterial (retrieveValue(getProperty("shadow_caster_material"), NULL).get()); + + if (hasProperty ("lod_values")) + mMaterial->setLodLevels (retrieveValue(getProperty("lod_values"), NULL).get()); + } + + void MaterialInstance::destroyAll () + { + if (hasProperty("create_configuration")) + return; + mMaterial->removeAll(); + mTexUnits.clear(); + } + + void MaterialInstance::setProperty (const std::string& name, PropertyValuePtr value) + { + PropertySetGet::setProperty (name, value); + destroyAll(); // trigger updates + } + + void MaterialInstance::createForConfiguration (const std::string& configuration, unsigned short lodIndex) + { + bool res = mMaterial->createConfiguration(configuration, lodIndex); + if (!res) + return; // listener was false positive + + if (mListener) + mListener->requestedConfiguration (this, configuration); + + mFactory->setActiveConfiguration (configuration); + mFactory->setActiveLodLevel (lodIndex); + + bool allowFixedFunction = true; + if (!mShadersEnabled && hasProperty("allow_fixed_function")) + { + allowFixedFunction = retrieveValue(getProperty("allow_fixed_function"), NULL).get(); + } + + // get passes of the top-most parent + PassVector passes = getPasses(); + if (passes.size() == 0) + throw std::runtime_error ("material \"" + mName + "\" does not have any passes"); + + for (PassVector::iterator it = passes.begin(); it != passes.end(); ++it) + { + boost::shared_ptr pass = mMaterial->createPass (configuration, lodIndex); + it->copyAll (pass.get(), this); + + // texture samplers used in the shaders + std::vector usedTextureSamplersVertex; + std::vector usedTextureSamplersFragment; + + PropertySetGet* context = this; + + // create or retrieve shaders + bool hasVertex = it->hasProperty("vertex_program"); + bool hasFragment = it->hasProperty("fragment_program"); + if (mShadersEnabled || !allowFixedFunction) + { + it->setContext(context); + it->mShaderProperties.setContext(context); + if (hasVertex) + { + ShaderSet* vertex = mFactory->getShaderSet(retrieveValue(it->getProperty("vertex_program"), context).get()); + ShaderInstance* v = vertex->getInstance(&it->mShaderProperties); + if (v) + { + pass->assignProgram (GPT_Vertex, v->getName()); + v->setUniformParameters (pass, &it->mShaderProperties); + + std::vector sharedParams = v->getSharedParameters (); + for (std::vector::iterator it = sharedParams.begin(); it != sharedParams.end(); ++it) + { + pass->addSharedParameter (GPT_Vertex, *it); + } + + std::vector vector = v->getUsedSamplers (); + usedTextureSamplersVertex.insert(usedTextureSamplersVertex.end(), vector.begin(), vector.end()); + } + } + if (hasFragment) + { + ShaderSet* fragment = mFactory->getShaderSet(retrieveValue(it->getProperty("fragment_program"), context).get()); + ShaderInstance* f = fragment->getInstance(&it->mShaderProperties); + if (f) + { + pass->assignProgram (GPT_Fragment, f->getName()); + f->setUniformParameters (pass, &it->mShaderProperties); + + std::vector sharedParams = f->getSharedParameters (); + for (std::vector::iterator it = sharedParams.begin(); it != sharedParams.end(); ++it) + { + pass->addSharedParameter (GPT_Fragment, *it); + } + + std::vector vector = f->getUsedSamplers (); + usedTextureSamplersFragment.insert(usedTextureSamplersFragment.end(), vector.begin(), vector.end()); + } + } + } + + // create texture units + std::vector texUnits = it->getTexUnits(); + int i=0; + for (std::vector::iterator texIt = texUnits.begin(); texIt != texUnits.end(); ++texIt ) + { + // only create those that are needed by the shader, OR those marked to be created in fixed function pipeline if shaders are disabled + bool foundVertex = std::find(usedTextureSamplersVertex.begin(), usedTextureSamplersVertex.end(), texIt->getName()) != usedTextureSamplersVertex.end(); + bool foundFragment = std::find(usedTextureSamplersFragment.begin(), usedTextureSamplersFragment.end(), texIt->getName()) != usedTextureSamplersFragment.end(); + if ( (foundVertex || foundFragment) + || (((!mShadersEnabled || (!hasVertex || !hasFragment)) && allowFixedFunction) && texIt->hasProperty("create_in_ffp") && retrieveValue(texIt->getProperty("create_in_ffp"), this).get())) + { + boost::shared_ptr texUnit = pass->createTextureUnitState (); + texIt->copyAll (texUnit.get(), context); + + mTexUnits.push_back(texUnit); + + // set texture unit indices (required by GLSL) + if (mShadersEnabled && ((hasVertex && foundVertex) || (hasFragment && foundFragment)) && mFactory->getCurrentLanguage () == Language_GLSL) + { + pass->setTextureUnitIndex (foundVertex ? GPT_Vertex : GPT_Fragment, texIt->getName(), i); + + ++i; + } + } + } + } + + if (mListener) + mListener->createdConfiguration (this, configuration); + } + + Material* MaterialInstance::getMaterial () + { + return mMaterial.get(); + } + + MaterialInstancePass* MaterialInstance::createPass () + { + mPasses.push_back (MaterialInstancePass()); + mPasses.back().setContext(this); + return &mPasses.back(); + } + + PassVector MaterialInstance::getPasses() + { + if (mParent) + return static_cast(mParent)->getPasses(); + else + return mPasses; + } + + void MaterialInstance::setShadersEnabled (bool enabled) + { + if (enabled == mShadersEnabled) + return; + mShadersEnabled = enabled; + + // trigger updates + if (mMaterial.get()) + destroyAll(); + } + + void MaterialInstance::save (std::ofstream& stream) + { + stream << "material " << mName << "\n" + << "{\n"; + + if (mParent) + { + stream << "\t" << static_cast(mParent)->getName() << "\n"; + } + + const PropertyMap& properties = listProperties (); + for (PropertyMap::const_iterator it = properties.begin(); it != properties.end(); ++it) + { + stream << "\t" << it->first << " " << retrieveValue(getProperty(it->first), NULL).get() << "\n"; + } + + stream << "}\n"; + } +} diff --git a/extern/shiny/Main/MaterialInstance.hpp b/extern/shiny/Main/MaterialInstance.hpp new file mode 100644 index 000000000..000f9d60c --- /dev/null +++ b/extern/shiny/Main/MaterialInstance.hpp @@ -0,0 +1,104 @@ +#ifndef SH_MATERIALINSTANCE_H +#define SH_MATERIALINSTANCE_H + +#include +#include + +#include "PropertyBase.hpp" +#include "Platform.hpp" +#include "MaterialInstancePass.hpp" + +namespace sh +{ + class Factory; + + typedef std::vector PassVector; + + /** + * @brief + * Allows you to be notified when a certain configuration for a material was just about to be created. \n + * Useful for adjusting some properties prior to the material being created (Or you could also re-create + * the whole material from scratch, i.e. use this as a method to create this material entirely in code) + */ + class MaterialInstanceListener + { + public: + virtual void requestedConfiguration (MaterialInstance* m, const std::string& configuration) = 0; ///< called before creating + virtual void createdConfiguration (MaterialInstance* m, const std::string& configuration) = 0; ///< called after creating + }; + + /** + * @brief + * A specific material instance, which has all required properties set + * (for example the diffuse & normal map, ambient/diffuse/specular values). \n + * Depending on these properties, the system will automatically select a shader permutation + * that suits these and create the backend materials / passes (provided by the \a Platform class). + */ + class MaterialInstance : public PropertySetGet + { + public: + MaterialInstance (const std::string& name, Factory* f); + virtual ~MaterialInstance (); + + MaterialInstancePass* createPass (); + PassVector getPasses(); ///< gets the passes of the top-most parent + + /// @attention Because the backend material passes are created on demand, the returned material here might not contain anything yet! + /// The only place where you should use this method, is for the MaterialInstance given by the MaterialListener::materialCreated event! + Material* getMaterial(); + + /// attach a \a MaterialInstanceListener to this specific material (as opposed to \a MaterialListener, which listens to all materials) + void setListener (MaterialInstanceListener* l) { mListener = l; } + + std::string getName() { return mName; } + + virtual void setProperty (const std::string& name, PropertyValuePtr value); + + private: + void setParentInstance (const std::string& name); + std::string getParentInstance (); + + void create (Platform* platform); + void createForConfiguration (const std::string& configuration, unsigned short lodIndex); + + void destroyAll (); + + void setShadersEnabled (bool enabled); + + void setSourceFile(const std::string& sourceFile) { mSourceFile = sourceFile; } + + std::string getSourceFile() { return mSourceFile; } + ///< get the name of the file this material was read from, or empty if it was created dynamically by code + + void save (std::ofstream& stream); + ///< this will only save the properties, not the passes and texture units, and as such + /// is only intended to be used for derived materials + + friend class Factory; + + + private: + std::string mParentInstance; + ///< this is only used during the file-loading phase. an instance could be loaded before its parent is loaded, + /// so initially only the parent's name is written to this member. + /// once all instances are loaded, the actual mParent pointer (from PropertySetGet class) can be set + + std::vector< boost::shared_ptr > mTexUnits; + + MaterialInstanceListener* mListener; + + PassVector mPasses; + + std::string mName; + + std::string mSourceFile; + + boost::shared_ptr mMaterial; + + bool mShadersEnabled; + + Factory* mFactory; + }; +} + +#endif diff --git a/extern/shiny/Main/MaterialInstancePass.cpp b/extern/shiny/Main/MaterialInstancePass.cpp new file mode 100644 index 000000000..b14476f4e --- /dev/null +++ b/extern/shiny/Main/MaterialInstancePass.cpp @@ -0,0 +1,16 @@ +#include "MaterialInstancePass.hpp" + +namespace sh +{ + + MaterialInstanceTextureUnit* MaterialInstancePass::createTextureUnit (const std::string& name) + { + mTexUnits.push_back(MaterialInstanceTextureUnit(name)); + return &mTexUnits.back(); + } + + std::vector MaterialInstancePass::getTexUnits () + { + return mTexUnits; + } +} diff --git a/extern/shiny/Main/MaterialInstancePass.hpp b/extern/shiny/Main/MaterialInstancePass.hpp new file mode 100644 index 000000000..7d7330f70 --- /dev/null +++ b/extern/shiny/Main/MaterialInstancePass.hpp @@ -0,0 +1,29 @@ +#ifndef SH_MATERIALINSTANCEPASS_H +#define SH_MATERIALINSTANCEPASS_H + +#include + +#include "PropertyBase.hpp" +#include "MaterialInstanceTextureUnit.hpp" + +namespace sh +{ + /** + * @brief + * Holds properties of a single texture unit in a \a MaterialInstancePass. \n + * No inheritance here for now. + */ + class MaterialInstancePass : public PropertySetGet + { + public: + MaterialInstanceTextureUnit* createTextureUnit (const std::string& name); + + PropertySetGet mShaderProperties; + + std::vector getTexUnits (); + private: + std::vector mTexUnits; + }; +} + +#endif diff --git a/extern/shiny/Main/MaterialInstanceTextureUnit.cpp b/extern/shiny/Main/MaterialInstanceTextureUnit.cpp new file mode 100644 index 000000000..0e3078af3 --- /dev/null +++ b/extern/shiny/Main/MaterialInstanceTextureUnit.cpp @@ -0,0 +1,14 @@ +#include "MaterialInstanceTextureUnit.hpp" + +namespace sh +{ + MaterialInstanceTextureUnit::MaterialInstanceTextureUnit (const std::string& name) + : mName(name) + { + } + + std::string MaterialInstanceTextureUnit::getName() const + { + return mName; + } +} diff --git a/extern/shiny/Main/MaterialInstanceTextureUnit.hpp b/extern/shiny/Main/MaterialInstanceTextureUnit.hpp new file mode 100644 index 000000000..ae9f54fd2 --- /dev/null +++ b/extern/shiny/Main/MaterialInstanceTextureUnit.hpp @@ -0,0 +1,26 @@ +#ifndef SH_MATERIALINSTANCETEXTUREUNIT_H +#define SH_MATERIALINSTANCETEXTUREUNIT_H + +#include "PropertyBase.hpp" + +namespace sh +{ + /** + * @brief + * A single texture unit state that belongs to a \a MaterialInstancePass \n + * this is not the real "backend" \a TextureUnitState (provided by \a Platform), + * it is merely a placeholder for properties. \n + * @note The backend \a TextureUnitState will only be created if this texture unit is + * actually used (i.e. referenced in the shader, or marked with property create_in_ffp = true). + */ + class MaterialInstanceTextureUnit : public PropertySetGet + { + public: + MaterialInstanceTextureUnit (const std::string& name); + std::string getName() const; + private: + std::string mName; + }; +} + +#endif diff --git a/extern/shiny/Main/Platform.cpp b/extern/shiny/Main/Platform.cpp new file mode 100644 index 000000000..94b4f872a --- /dev/null +++ b/extern/shiny/Main/Platform.cpp @@ -0,0 +1,94 @@ +#include "Platform.hpp" + +#include + +#include "Factory.hpp" + +namespace sh +{ + Platform::Platform (const std::string& basePath) + : mBasePath(basePath) + , mCacheFolder("./") + , mShaderCachingEnabled(false) + { + } + + Platform::~Platform () + { + } + + void Platform::setFactory (Factory* factory) + { + mFactory = factory; + } + + std::string Platform::getBasePath () + { + return mBasePath; + } + + bool Platform::supportsMaterialQueuedListener () + { + return false; + } + + bool Platform::supportsShaderSerialization () + { + return false; + } + + MaterialInstance* Platform::fireMaterialRequested (const std::string& name, const std::string& configuration, unsigned short lodIndex) + { + return mFactory->requestMaterial (name, configuration, lodIndex); + } + + void Platform::serializeShaders (const std::string& file) + { + throw std::runtime_error ("Shader serialization not supported by this platform"); + } + + void Platform::deserializeShaders (const std::string& file) + { + throw std::runtime_error ("Shader serialization not supported by this platform"); + } + + void Platform::setCacheFolder (const std::string& folder) + { + mCacheFolder = folder; + } + + void Platform::setShaderCachingEnabled (bool enabled) + { + mShaderCachingEnabled = enabled; + } + + std::string Platform::getCacheFolder() const + { + return mCacheFolder; + } + + // ------------------------------------------------------------------------------ + + bool TextureUnitState::setPropertyOverride (const std::string& name, PropertyValuePtr& value, PropertySetGet *context) + { + if (name == "texture_alias") + { + std::string aliasName = retrieveValue(value, context).get(); + + Factory::getInstance().addTextureAliasInstance (aliasName, this); + + setTextureName (Factory::getInstance().retrieveTextureAlias (aliasName)); + + return true; + } + else + return false; + } + + TextureUnitState::~TextureUnitState() + { + Factory* f = Factory::getInstancePtr (); + if (f) + f->removeTextureAliasInstances (this); + } +} diff --git a/extern/shiny/Main/Platform.hpp b/extern/shiny/Main/Platform.hpp new file mode 100644 index 000000000..1b095e957 --- /dev/null +++ b/extern/shiny/Main/Platform.hpp @@ -0,0 +1,145 @@ +#ifndef SH_PLATFORM_H +#define SH_PLATFORM_H + +#include + +#include + +#include "Language.hpp" +#include "PropertyBase.hpp" + +namespace sh +{ + class Factory; + class MaterialInstance; + + enum GpuProgramType + { + GPT_Vertex, + GPT_Fragment + // GPT_Geometry + }; + + // These classes are supposed to be filled by the platform implementation + class GpuProgram + { + public: + virtual bool getSupported () = 0; ///< @return true if the compilation was successful + + /// @param name name of the uniform in the shader + /// @param autoConstantName name of the auto constant (for example world_viewproj_matrix) + /// @param extraInfo if any extra info is needed (e.g. light index), put it here + virtual void setAutoConstant (const std::string& name, const std::string& autoConstantName, const std::string& extraInfo = "") = 0; + }; + + class TextureUnitState : public PropertySet + { + public: + virtual ~TextureUnitState(); + + virtual void setTextureName (const std::string& textureName) = 0; + + protected: + virtual bool setPropertyOverride (const std::string& name, PropertyValuePtr& value, PropertySetGet *context); + }; + + class Pass : public PropertySet + { + public: + virtual boost::shared_ptr createTextureUnitState () = 0; + virtual void assignProgram (GpuProgramType type, const std::string& name) = 0; + + /// @param type gpu program type + /// @param name name of the uniform in the shader + /// @param vt type of value, e.g. vector4 + /// @param value value to set + /// @param context used for retrieving linked values + virtual void setGpuConstant (int type, const std::string& name, ValueType vt, PropertyValuePtr value, PropertySetGet* context) = 0; + + virtual void setTextureUnitIndex (int programType, const std::string& name, int index) = 0; + + virtual void addSharedParameter (int type, const std::string& name) = 0; + }; + + class Material : public PropertySet + { + public: + virtual boost::shared_ptr createPass (const std::string& configuration, unsigned short lodIndex) = 0; + virtual bool createConfiguration (const std::string& name, unsigned short lodIndex) = 0; ///< @return false if already exists + virtual void removeAll () = 0; ///< remove all configurations + + virtual void setLodLevels (const std::string& lodLevels) = 0; + + virtual void setShadowCasterMaterial (const std::string& name) = 0; + }; + + class Platform + { + public: + Platform (const std::string& basePath); + virtual ~Platform (); + + void setShaderCachingEnabled (bool enabled); + + /// set the folder to use for shader caching + void setCacheFolder (const std::string& folder); + + private: + virtual boost::shared_ptr createMaterial (const std::string& name) = 0; + + virtual boost::shared_ptr createGpuProgram ( + GpuProgramType type, + const std::string& compileArguments, + const std::string& name, const std::string& profile, + const std::string& source, Language lang) = 0; + + virtual void setSharedParameter (const std::string& name, PropertyValuePtr value) = 0; + + virtual bool isProfileSupported (const std::string& profile) = 0; + + virtual void serializeShaders (const std::string& file); + virtual void deserializeShaders (const std::string& file); + + std::string getCacheFolder () const; + + friend class Factory; + friend class MaterialInstance; + friend class ShaderInstance; + + protected: + /** + * this will be \a true if the platform supports serialization (writing shader microcode + * to disk) and deserialization (create gpu program from saved microcode) + */ + virtual bool supportsShaderSerialization (); + + /** + * this will be \a true if the platform supports a listener that notifies the system + * whenever a material is requested for rendering. if this is supported, shaders can be + * compiled on-demand when needed (and not earlier) + * @todo the Factory is not designed yet to handle the case where this method returns false + */ + virtual bool supportsMaterialQueuedListener (); + + /** + * fire event: material requested for rendering + * @param name material name + * @param configuration requested configuration + */ + MaterialInstance* fireMaterialRequested (const std::string& name, const std::string& configuration, unsigned short lodIndex); + + std::string mCacheFolder; + Factory* mFactory; + + protected: + bool mShaderCachingEnabled; + + private: + void setFactory (Factory* factory); + + std::string mBasePath; + std::string getBasePath(); + }; +} + +#endif diff --git a/extern/shiny/Main/Preprocessor.cpp b/extern/shiny/Main/Preprocessor.cpp new file mode 100644 index 000000000..1a97668bc --- /dev/null +++ b/extern/shiny/Main/Preprocessor.cpp @@ -0,0 +1,99 @@ +#include "Preprocessor.hpp" + +#include +#include +#include + +namespace sh +{ + std::string Preprocessor::preprocess (std::string source, const std::string& includePath, std::vector definitions, const std::string& name) + { + std::stringstream returnString; + + // current file position is saved for exception handling + boost::wave::util::file_position_type current_position; + + try + { + // This token type is one of the central types used throughout the library. + // It is a template parameter to some of the public classes and instances + // of this type are returned from the iterators. + typedef boost::wave::cpplexer::lex_token<> token_type; + + // The template boost::wave::cpplexer::lex_iterator<> is the lexer type to + // to use as the token source for the preprocessing engine. It is + // parametrized with the token type. + typedef boost::wave::cpplexer::lex_iterator lex_iterator_type; + + // This is the resulting context type. The first template parameter should + // match the iterator type used during construction of the context + // instance (see below). It is the type of the underlying input stream. + typedef boost::wave::context + context_type; + + // The preprocessor iterator shouldn't be constructed directly. It is + // generated through a wave::context<> object. This wave:context<> object + // is additionally 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 range of context_type::iterator_type + // instances. + context_type ctx (source.begin(), source.end(), name.c_str()); + ctx.add_include_path(includePath.c_str()); + for (std::vector::iterator it = definitions.begin(); it != definitions.end(); ++it) + { + ctx.add_macro_definition(*it); + } + + // Get the preprocessor iterators and use them to generate the token + // sequence. + context_type::iterator_type first = ctx.begin(); + context_type::iterator_type last = ctx.end(); + + // The input stream is preprocessed for you while iterating over the range + // [first, last). The dereferenced iterator returns tokens holding + // information about the preprocessed input stream, such as token type, + // token value, and position. + while (first != last) + { + current_position = (*first).get_position(); + returnString << (*first).get_value(); + ++first; + } + } + catch (boost::wave::cpp_exception const& e) + { + // some preprocessing error + std::stringstream error; + error + << e.file_name() << "(" << e.line_no() << "): " + << e.description(); + throw std::runtime_error(error.str()); + } + catch (std::exception const& e) + { + // use last recognized token to retrieve the error position + std::stringstream error; + error + << current_position.get_file() + << "(" << current_position.get_line() << "): " + << "exception caught: " << e.what(); + throw std::runtime_error(error.str()); + } + catch (...) + { + // use last recognized token to retrieve the error position + std::stringstream error; + error + << current_position.get_file() + << "(" << current_position.get_line() << "): " + << "unexpected exception caught."; + throw std::runtime_error(error.str()); + } + + return returnString.str(); + } +} diff --git a/extern/shiny/Main/Preprocessor.hpp b/extern/shiny/Main/Preprocessor.hpp new file mode 100644 index 000000000..7ee30ae7f --- /dev/null +++ b/extern/shiny/Main/Preprocessor.hpp @@ -0,0 +1,69 @@ +#ifndef SH_PREPROCESSOR_H +#define SH_PREPROCESSOR_H + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +namespace sh +{ + /** + * @brief A simple interface for the boost::wave preprocessor + */ + class Preprocessor + { + public: + /** + * @brief Run a shader source string through the preprocessor + * @param source source string + * @param includePath path to search for includes (that are included with #include) + * @param definitions macros to predefine (vector of strings of the format MACRO=value, or just MACRO to define it as 1) + * @param name name to use for error messages + * @return processed string + */ + static std::string preprocess (std::string source, const std::string& includePath, std::vector definitions, const std::string& name); + }; + + + + class emit_custom_line_directives_hooks + : public boost::wave::context_policies::default_preprocessing_hooks + { + public: + + template + bool + emit_line_directive(ContextT const& ctx, ContainerT &pending, + typename ContextT::token_type const& act_token) + { + // emit a #line directive showing the relative filename instead + typename ContextT::position_type pos = act_token.get_position(); + unsigned int column = 1; + + typedef typename ContextT::token_type result_type; + + // no line directives for now + pos.set_column(column); + pending.push_back(result_type(boost::wave::T_GENERATEDNEWLINE, "\n", pos)); + + return true; + } + }; + + +} + +#endif diff --git a/extern/shiny/Main/PropertyBase.cpp b/extern/shiny/Main/PropertyBase.cpp new file mode 100644 index 000000000..0c39e5c1e --- /dev/null +++ b/extern/shiny/Main/PropertyBase.cpp @@ -0,0 +1,268 @@ +#include "PropertyBase.hpp" + +#include +#include + +#include +#include + +namespace sh +{ + + IntValue::IntValue(int in) + : mValue(in) + { + } + + IntValue::IntValue(const std::string& in) + { + mValue = boost::lexical_cast(in); + } + + std::string IntValue::serialize() + { + return boost::lexical_cast(mValue); + } + + // ------------------------------------------------------------------------------ + + BooleanValue::BooleanValue (bool in) + : mValue(in) + { + } + + BooleanValue::BooleanValue (const std::string& in) + { + if (in == "true") + mValue = true; + else if (in == "false") + mValue = false; + else + { + std::cerr << "sh::BooleanValue: Warning: Unrecognized value \"" << in << "\" for property value of type BooleanValue" << std::endl; + mValue = false; + } + } + + std::string BooleanValue::serialize () + { + if (mValue) + return "true"; + else + return "false"; + } + + // ------------------------------------------------------------------------------ + + StringValue::StringValue (const std::string& in) + { + mStringValue = in; + } + + std::string StringValue::serialize() + { + return mStringValue; + } + + // ------------------------------------------------------------------------------ + + LinkedValue::LinkedValue (const std::string& in) + { + mStringValue = in; + mStringValue.erase(0, 1); + } + + std::string LinkedValue::serialize() + { + throw std::runtime_error ("can't directly get a linked value"); + } + + std::string LinkedValue::get(PropertySetGet* context) const + { + PropertyValuePtr p = context->getProperty(mStringValue); + return retrieveValue(p, NULL).get(); + } + + // ------------------------------------------------------------------------------ + + FloatValue::FloatValue (float in) + { + mValue = in; + } + + FloatValue::FloatValue (const std::string& in) + { + mValue = boost::lexical_cast(in); + } + + std::string FloatValue::serialize () + { + return boost::lexical_cast(mValue); + } + + // ------------------------------------------------------------------------------ + + Vector2::Vector2 (float x, float y) + : mX(x) + , mY(y) + { + } + + Vector2::Vector2 (const std::string& in) + { + std::vector tokens; + boost::split(tokens, in, boost::is_any_of(" ")); + assert ((tokens.size() == 2) && "Invalid Vector2 conversion"); + mX = boost::lexical_cast (tokens[0]); + mY = boost::lexical_cast (tokens[1]); + } + + std::string Vector2::serialize () + { + return boost::lexical_cast(mX) + " " + + boost::lexical_cast(mY); + } + + // ------------------------------------------------------------------------------ + + Vector3::Vector3 (float x, float y, float z) + : mX(x) + , mY(y) + , mZ(z) + { + } + + Vector3::Vector3 (const std::string& in) + { + std::vector tokens; + boost::split(tokens, in, boost::is_any_of(" ")); + assert ((tokens.size() == 3) && "Invalid Vector3 conversion"); + mX = boost::lexical_cast (tokens[0]); + mY = boost::lexical_cast (tokens[1]); + mZ = boost::lexical_cast (tokens[2]); + } + + std::string Vector3::serialize () + { + return boost::lexical_cast(mX) + " " + + boost::lexical_cast(mY) + " " + + boost::lexical_cast(mZ); + } + + // ------------------------------------------------------------------------------ + + Vector4::Vector4 (float x, float y, float z, float w) + : mX(x) + , mY(y) + , mZ(z) + , mW(w) + { + } + + Vector4::Vector4 (const std::string& in) + { + std::vector tokens; + boost::split(tokens, in, boost::is_any_of(" ")); + assert ((tokens.size() == 4) && "Invalid Vector4 conversion"); + mX = boost::lexical_cast (tokens[0]); + mY = boost::lexical_cast (tokens[1]); + mZ = boost::lexical_cast (tokens[2]); + mW = boost::lexical_cast (tokens[3]); + } + + std::string Vector4::serialize () + { + return boost::lexical_cast(mX) + " " + + boost::lexical_cast(mY) + " " + + boost::lexical_cast(mZ) + " " + + boost::lexical_cast(mW); + } + + // ------------------------------------------------------------------------------ + + void PropertySet::setProperty (const std::string& name, PropertyValuePtr &value, PropertySetGet* context) + { + if (!setPropertyOverride (name, value, context)) + std::cerr << "sh::PropertySet: Warning: No match for property with name '" << name << "'" << std::endl; + } + + bool PropertySet::setPropertyOverride (const std::string& name, PropertyValuePtr &value, PropertySetGet* context) + { + // if we got here, none of the sub-classes was able to make use of the property + return false; + } + + // ------------------------------------------------------------------------------ + + PropertySetGet::PropertySetGet (PropertySetGet* parent) + : mParent(parent) + , mContext(NULL) + { + } + + PropertySetGet::PropertySetGet () + : mParent(NULL) + , mContext(NULL) + { + } + + void PropertySetGet::setParent (PropertySetGet* parent) + { + mParent = parent; + } + + void PropertySetGet::setContext (PropertySetGet* context) + { + mContext = context; + } + + PropertySetGet* PropertySetGet::getContext() + { + return mContext; + } + + void PropertySetGet::setProperty (const std::string& name, PropertyValuePtr value) + { + mProperties [name] = value; + } + + PropertyValuePtr& PropertySetGet::getProperty (const std::string& name) + { + bool found = (mProperties.find(name) != mProperties.end()); + + if (!found) + { + if (!mParent) + throw std::runtime_error ("Trying to retrieve property \"" + name + "\" that does not exist"); + else + return mParent->getProperty (name); + } + else + return mProperties[name]; + } + + bool PropertySetGet::hasProperty (const std::string& name) + { + bool found = (mProperties.find(name) != mProperties.end()); + + if (!found) + { + if (!mParent) + return false; + else + return mParent->hasProperty (name); + } + else + return true; + } + + void PropertySetGet::copyAll (PropertySet* target, PropertySetGet* context) + { + if (mParent) + mParent->copyAll (target, context); + for (PropertyMap::iterator it = mProperties.begin(); it != mProperties.end(); ++it) + { + target->setProperty(it->first, it->second, context); + } + } +} diff --git a/extern/shiny/Main/PropertyBase.hpp b/extern/shiny/Main/PropertyBase.hpp new file mode 100644 index 000000000..240acce81 --- /dev/null +++ b/extern/shiny/Main/PropertyBase.hpp @@ -0,0 +1,235 @@ +#ifndef SH_PROPERTYBASE_H +#define SH_PROPERTYBASE_H + +#include +#include + +#include + +namespace sh +{ + class StringValue; + class PropertySetGet; + class LinkedValue; + + enum ValueType + { + VT_String, + VT_Int, + VT_Float, + VT_Vector2, + VT_Vector3, + VT_Vector4 + }; + + class PropertyValue + { + public: + PropertyValue() {} + + virtual ~PropertyValue() {} + + std::string _getStringValue() { return mStringValue; } + + virtual std::string serialize() = 0; + + protected: + std::string mStringValue; ///< this will possibly not contain anything in the specialised classes + }; + typedef boost::shared_ptr PropertyValuePtr; + + class StringValue : public PropertyValue + { + public: + StringValue (const std::string& in); + std::string get() const { return mStringValue; } + + virtual std::string serialize(); + }; + + /** + * @brief Used for retrieving a named property from a context + */ + class LinkedValue : public PropertyValue + { + public: + LinkedValue (const std::string& in); + + std::string get(PropertySetGet* context) const; + + virtual std::string serialize(); + }; + + class FloatValue : public PropertyValue + { + public: + FloatValue (float in); + FloatValue (const std::string& in); + float get() const { return mValue; } + + virtual std::string serialize(); + private: + float mValue; + }; + + class IntValue : public PropertyValue + { + public: + IntValue (int in); + IntValue (const std::string& in); + int get() const { return mValue; } + + virtual std::string serialize(); + private: + int mValue; + }; + + class BooleanValue : public PropertyValue + { + public: + BooleanValue (bool in); + BooleanValue (const std::string& in); + bool get() const { return mValue; } + + virtual std::string serialize(); + private: + bool mValue; + }; + + class Vector2 : public PropertyValue + { + public: + Vector2 (float x, float y); + Vector2 (const std::string& in); + + float mX, mY; + + virtual std::string serialize(); + }; + + class Vector3 : public PropertyValue + { + public: + Vector3 (float x, float y, float z); + Vector3 (const std::string& in); + + float mX, mY, mZ; + + virtual std::string serialize(); + }; + + class Vector4 : public PropertyValue + { + public: + Vector4 (float x, float y, float z, float w); + Vector4 (const std::string& in); + + float mX, mY, mZ, mW; + + virtual std::string serialize(); + }; + + /// \brief base class that allows setting properties with any kind of value-type + class PropertySet + { + public: + void setProperty (const std::string& name, PropertyValuePtr& value, PropertySetGet* context); + + protected: + virtual bool setPropertyOverride (const std::string& name, PropertyValuePtr& value, PropertySetGet* context); + ///< @return \a true if the specified property was found, or false otherwise + }; + + typedef std::map PropertyMap; + + /// \brief base class that allows setting properties with any kind of value-type and retrieving them + class PropertySetGet + { + public: + PropertySetGet (PropertySetGet* parent); + PropertySetGet (); + + virtual ~PropertySetGet() {} + + void copyAll (PropertySet* target, PropertySetGet* context); ///< call setProperty for each property/value pair stored in \a this + + void setParent (PropertySetGet* parent); + void setContext (PropertySetGet* context); + PropertySetGet* getContext(); + + virtual void setProperty (const std::string& name, PropertyValuePtr value); + PropertyValuePtr& getProperty (const std::string& name); + + const PropertyMap& listProperties() { return mProperties; } + + bool hasProperty (const std::string& name); + + private: + PropertyMap mProperties; + + protected: + PropertySetGet* mParent; + ///< the parent can provide properties as well (when they are retrieved via getProperty) \n + /// multiple levels of inheritance are also supported \n + /// children can override properties of their parents + + PropertySetGet* mContext; + ///< used to retrieve linked property values + }; + + template + static T retrieveValue (boost::shared_ptr& value, PropertySetGet* context) + { + if (typeid(*value).name() == typeid(LinkedValue).name()) + { + std::string v = static_cast(value.get())->get(context); + PropertyValuePtr newVal = PropertyValuePtr (new StringValue(v)); + return retrieveValue(newVal, NULL); + } + if (typeid(T).name() == typeid(*value).name()) + { + // requested type is the same as source type, only have to cast it + return *static_cast(value.get()); + } + + if ((typeid(T).name() == typeid(StringValue).name()) + && typeid(*value).name() != typeid(StringValue).name()) + { + // if string type is requested and value is not string, use serialize method to convert to string + T* ptr = new T (value->serialize()); // note that T is always StringValue here, but we can't use it here + value = boost::shared_ptr (static_cast(ptr)); + return *ptr; + } + + { + // remaining case: deserialization from string by passing the string to constructor of class T + T* ptr = new T(value->_getStringValue()); + PropertyValuePtr newVal (static_cast(ptr)); + value = newVal; + return *ptr; + } + } + ///< + /// @brief alternate version that supports linked values (use of $variables in parent material) + /// @note \a value is changed in-place to the converted object + /// @return converted object \n + + /// Create a property from a string + inline PropertyValuePtr makeProperty (const std::string& prop) + { + if (prop.size() > 1 && prop[0] == '$') + return PropertyValuePtr (static_cast(new LinkedValue(prop))); + else + return PropertyValuePtr (static_cast (new StringValue(prop))); + } + + template + /// Create a property of any type + /// Example: sh::makeProperty\ (new sh::Vector4(1, 1, 1, 1)) + inline PropertyValuePtr makeProperty (T* p) + { + return PropertyValuePtr ( static_cast(p) ); + } +} + +#endif diff --git a/extern/shiny/Main/ScriptLoader.cpp b/extern/shiny/Main/ScriptLoader.cpp new file mode 100644 index 000000000..a8971dc87 --- /dev/null +++ b/extern/shiny/Main/ScriptLoader.cpp @@ -0,0 +1,401 @@ +#include "ScriptLoader.hpp" + +#include +#include +#include +#include + +#include + +namespace sh +{ + void ScriptLoader::loadAllFiles(ScriptLoader* c, const std::string& path) + { + for ( boost::filesystem::recursive_directory_iterator end, dir(path); dir != end; ++dir ) + { + boost::filesystem::path p(*dir); + if(p.extension() == c->m_fileEnding) + { + c->m_currentFileName = (*dir).path().string(); + std::ifstream in((*dir).path().string().c_str(), std::ios::binary); + c->parseScript(in); + } + } + } + + ScriptLoader::ScriptLoader(const std::string& fileEnding) + { + m_fileEnding = fileEnding; + } + + ScriptLoader::~ScriptLoader() + { + clearScriptList(); + } + + void ScriptLoader::clearScriptList() + { + std::map ::iterator i; + for (i = m_scriptList.begin(); i != m_scriptList.end(); i++) + { + delete i->second; + } + m_scriptList.clear(); + } + + ScriptNode *ScriptLoader::getConfigScript(const std::string &name) + { + std::map ::iterator i; + + std::string key = name; + i = m_scriptList.find(key); + + //If found.. + if (i != m_scriptList.end()) + { + return i->second; + } + else + { + return NULL; + } + } + + std::map ScriptLoader::getAllConfigScripts () + { + return m_scriptList; + } + + void ScriptLoader::parseScript(std::ifstream &stream) + { + //Get first token + _nextToken(stream); + if (tok == TOKEN_EOF) + { + stream.close(); + return; + } + + //Parse the script + _parseNodes(stream, 0); + + stream.close(); + } + + void ScriptLoader::_nextToken(std::ifstream &stream) + { + //EOF token + if (!stream.good()) + { + tok = TOKEN_EOF; + return; + } + + //(Get next character) + int ch = stream.get(); + + while ((ch == ' ' || ch == 9) && !stream.eof()) + { //Skip leading spaces / tabs + ch = stream.get(); + } + + if (!stream.good()) + { + tok = TOKEN_EOF; + return; + } + + //Newline token + if (ch == '\r' || ch == '\n') + { + do + { + ch = stream.get(); + } while ((ch == '\r' || ch == '\n') && !stream.eof()); + + stream.unget(); + + tok = TOKEN_NewLine; + return; + } + + //Open brace token + else if (ch == '{') + { + tok = TOKEN_OpenBrace; + return; + } + + //Close brace token + else if (ch == '}') + { + tok = TOKEN_CloseBrace; + return; + } + + //Text token + if (ch < 32 || ch > 122) //Verify valid char + { + throw std::runtime_error("Parse Error: Invalid character, ConfigLoader::load()"); + } + + tokVal = ""; + tok = TOKEN_Text; + do + { + //Skip comments + if (ch == '/') + { + int ch2 = stream.peek(); + + //C++ style comment (//) + if (ch2 == '/') + { + stream.get(); + do + { + ch = stream.get(); + } while (ch != '\r' && ch != '\n' && !stream.eof()); + + tok = TOKEN_NewLine; + return; + } + } + + //Add valid char to tokVal + tokVal += (char)ch; + + //Next char + ch = stream.get(); + + } while (ch > 32 && ch <= 122 && !stream.eof()); + + stream.unget(); + + return; + } + + void ScriptLoader::_skipNewLines(std::ifstream &stream) + { + while (tok == TOKEN_NewLine) + { + _nextToken(stream); + } + } + + void ScriptLoader::_parseNodes(std::ifstream &stream, ScriptNode *parent) + { + typedef std::pair ScriptItem; + + while (true) + { + switch (tok) + { + //Node + case TOKEN_Text: + { + //Add the new node + ScriptNode *newNode; + if (parent) + { + newNode = parent->addChild(tokVal); + } + else + { + newNode = new ScriptNode(0, tokVal); + } + + //Get values + _nextToken(stream); + std::string valueStr; + int i=0; + while (tok == TOKEN_Text) + { + if (i == 0) + valueStr += tokVal; + else + valueStr += " " + tokVal; + _nextToken(stream); + ++i; + } + newNode->setValue(valueStr); + + //Add root nodes to scriptList + if (!parent) + { + std::string key; + + if (newNode->getValue() == "") + throw std::runtime_error("Root node must have a name (\"" + newNode->getName() + "\")"); + key = newNode->getValue(); + + m_scriptList.insert(ScriptItem(key, newNode)); + } + + _skipNewLines(stream); + + //Add any sub-nodes + if (tok == TOKEN_OpenBrace) + { + //Parse nodes + _nextToken(stream); + _parseNodes(stream, newNode); + //Check for matching closing brace + if (tok != TOKEN_CloseBrace) + { + throw std::runtime_error("Parse Error: Expecting closing brace"); + } + _nextToken(stream); + _skipNewLines(stream); + } + + newNode->m_fileName = m_currentFileName; + + break; + } + + //Out of place brace + case TOKEN_OpenBrace: + throw std::runtime_error("Parse Error: Opening brace out of plane"); + break; + + //Return if end of nodes have been reached + case TOKEN_CloseBrace: + return; + + //Return if reached end of file + case TOKEN_EOF: + return; + + case TOKEN_NewLine: + _nextToken(stream); + break; + } + }; + } + + ScriptNode::ScriptNode(ScriptNode *parent, const std::string &name) + { + m_name = name; + m_parent = parent; + _removeSelf = true; //For proper destruction + m_lastChildFound = -1; + + //Add self to parent's child list (unless this is the root node being created) + if (parent != NULL) + { + m_parent->m_children.push_back(this); + _iter = --(m_parent->m_children.end()); + } + } + + ScriptNode::~ScriptNode() + { + //Delete all children + std::vector::iterator i; + for (i = m_children.begin(); i != m_children.end(); i++) + { + ScriptNode *node = *i; + node->_removeSelf = false; + delete node; + } + m_children.clear(); + + //Remove self from parent's child list + if (_removeSelf && m_parent != NULL) + { + m_parent->m_children.erase(_iter); + } + } + + ScriptNode *ScriptNode::addChild(const std::string &name, bool replaceExisting) + { + if (replaceExisting) + { + ScriptNode *node = findChild(name, false); + if (node) + { + return node; + } + } + return new ScriptNode(this, name); + } + + ScriptNode *ScriptNode::findChild(const std::string &name, bool recursive) + { + int indx, prevC, nextC; + int childCount = (int)m_children.size(); + + if (m_lastChildFound != -1) + { + //If possible, try checking the nodes neighboring the last successful search + //(often nodes searched for in sequence, so this will boost search speeds). + prevC = m_lastChildFound-1; if (prevC < 0) prevC = 0; else if (prevC >= childCount) prevC = childCount-1; + nextC = m_lastChildFound+1; if (nextC < 0) nextC = 0; else if (nextC >= childCount) nextC = childCount-1; + for (indx = prevC; indx <= nextC; ++indx) + { + ScriptNode *node = m_children[indx]; + if (node->m_name == name) + { + m_lastChildFound = indx; + return node; + } + } + + //If not found that way, search for the node from start to finish, avoiding the + //already searched area above. + for (indx = nextC + 1; indx < childCount; ++indx) + { + ScriptNode *node = m_children[indx]; + if (node->m_name == name) { + m_lastChildFound = indx; + return node; + } + } + for (indx = 0; indx < prevC; ++indx) + { + ScriptNode *node = m_children[indx]; + if (node->m_name == name) { + m_lastChildFound = indx; + return node; + } + } + } + else + { + //Search for the node from start to finish + for (indx = 0; indx < childCount; ++indx){ + ScriptNode *node = m_children[indx]; + if (node->m_name == name) { + m_lastChildFound = indx; + return node; + } + } + } + + //If not found, search child nodes (if recursive == true) + if (recursive) + { + for (indx = 0; indx < childCount; ++indx) + { + m_children[indx]->findChild(name, recursive); + } + } + + //Not found anywhere + return NULL; + } + + void ScriptNode::setParent(ScriptNode *newParent) + { + //Remove self from current parent + m_parent->m_children.erase(_iter); + + //Set new parent + m_parent = newParent; + + //Add self to new parent + m_parent->m_children.push_back(this); + _iter = --(m_parent->m_children.end()); + } +} diff --git a/extern/shiny/Main/ScriptLoader.hpp b/extern/shiny/Main/ScriptLoader.hpp new file mode 100644 index 000000000..caf743bd2 --- /dev/null +++ b/extern/shiny/Main/ScriptLoader.hpp @@ -0,0 +1,134 @@ +#ifndef SH_CONFIG_LOADER_H__ +#define SH_CONFIG_LOADER_H__ + +#include +#include +#include +#include + +namespace sh +{ + class ScriptNode; + + /** + * @brief The base class of loaders that read Ogre style script files to get configuration and settings. + * Heavily inspired by: http://www.ogre3d.org/tikiwiki/All-purpose+script+parser + * ( "Non-ogre version") + */ + class ScriptLoader + { + public: + static void loadAllFiles(ScriptLoader* c, const std::string& path); + + ScriptLoader(const std::string& fileEnding); + virtual ~ScriptLoader(); + + std::string m_fileEnding; + + // For a line like + // entity animals/dog + // { + // ... + // } + // The type is "entity" and the name is "animals/dog" + // Or if animal/dog was not there then name is "" + ScriptNode *getConfigScript (const std::string &name); + + std::map getAllConfigScripts (); + + void parseScript(std::ifstream &stream); + + std::string m_currentFileName; + + protected: + + float m_LoadOrder; + // like "*.object" + + std::map m_scriptList; + + enum Token + { + TOKEN_Text, + TOKEN_NewLine, + TOKEN_OpenBrace, + TOKEN_CloseBrace, + TOKEN_EOF + }; + + Token tok, lastTok; + std::string tokVal; + + void _parseNodes(std::ifstream &stream, ScriptNode *parent); + void _nextToken(std::ifstream &stream); + void _skipNewLines(std::ifstream &stream); + + void clearScriptList(); + }; + + class ScriptNode + { + public: + ScriptNode(ScriptNode *parent, const std::string &name = "untitled"); + ~ScriptNode(); + + inline void setName(const std::string &name) + { + this->m_name = name; + } + + inline std::string &getName() + { + return m_name; + } + + inline void setValue(const std::string &value) + { + m_value = value; + } + + inline std::string &getValue() + { + return m_value; + } + + ScriptNode *addChild(const std::string &name = "untitled", bool replaceExisting = false); + ScriptNode *findChild(const std::string &name, bool recursive = false); + + inline std::vector &getChildren() + { + return m_children; + } + + inline ScriptNode *getChild(unsigned int index = 0) + { + assert(index < m_children.size()); + return m_children[index]; + } + + void setParent(ScriptNode *newParent); + + inline ScriptNode *getParent() + { + return m_parent; + } + + std::string m_fileName; + + + private: + std::string m_name; + std::string m_value; + std::vector m_children; + ScriptNode *m_parent; + + + int m_lastChildFound; //The last child node's index found with a call to findChild() + + std::vector::iterator _iter; + bool _removeSelf; + }; + +} + +#endif diff --git a/extern/shiny/Main/ShaderInstance.cpp b/extern/shiny/Main/ShaderInstance.cpp new file mode 100644 index 000000000..07ef8dfe2 --- /dev/null +++ b/extern/shiny/Main/ShaderInstance.cpp @@ -0,0 +1,707 @@ +#include "ShaderInstance.hpp" + +#include +#include +#include + +#include +#include +#include + +#include + +#include "Preprocessor.hpp" +#include "Factory.hpp" +#include "ShaderSet.hpp" + +namespace +{ + std::string convertLang (sh::Language lang) + { + if (lang == sh::Language_CG) + return "SH_CG"; + else if (lang == sh::Language_HLSL) + return "SH_HLSL"; + else //if (lang == sh::Language_GLSL) + return "SH_GLSL"; + } + + char getComponent(int num) + { + if (num == 0) + return 'x'; + else if (num == 1) + return 'y'; + else if (num == 2) + return 'z'; + else if (num == 3) + return 'w'; + else + throw std::runtime_error("invalid component"); + } + + std::string getFloat(sh::Language lang, int num_components) + { + if (lang == sh::Language_CG || lang == sh::Language_HLSL) + return (num_components == 1) ? "float" : "float" + boost::lexical_cast(num_components); + else + return (num_components == 1) ? "float" : "vec" + boost::lexical_cast(num_components); + } + + bool isCmd (const std::string& source, size_t pos, const std::string& cmd) + { + return (source.size() >= pos + cmd.size() && source.substr(pos, cmd.size()) == cmd); + } + + void writeDebugFile (const std::string& content, const std::string& filename) + { + boost::filesystem::path full_path(boost::filesystem::current_path()); + std::ofstream of ((full_path / filename ).string().c_str() , std::ios_base::out); + of.write(content.c_str(), content.size()); + of.close(); + } +} + +namespace sh +{ + std::string Passthrough::expand_assign(std::string toAssign) + { + std::string res; + + int i = 0; + int current_passthrough = passthrough_number; + int current_component_left = component_start; + int current_component_right = 0; + int components_left = num_components; + int components_at_once; + while (i < num_components) + { + if (components_left + current_component_left <= 4) + components_at_once = components_left; + else + components_at_once = 4 - current_component_left; + + std::string componentStr = "."; + for (int j = 0; j < components_at_once; ++j) + componentStr += getComponent(j + current_component_left); + std::string componentStr2 = "."; + for (int j = 0; j < components_at_once; ++j) + componentStr2 += getComponent(j + current_component_right); + if (num_components == 1) + { + componentStr2 = ""; + } + res += "passthrough" + boost::lexical_cast(current_passthrough) + componentStr + " = " + toAssign + componentStr2; + + current_component_left += components_at_once; + current_component_right += components_at_once; + components_left -= components_at_once; + + i += components_at_once; + + if (components_left == 0) + { + // finished + return res; + } + else + { + // add semicolon to every instruction but the last + res += "; "; + } + + if (current_component_left == 4) + { + current_passthrough++; + current_component_left = 0; + } + } + throw std::runtime_error("expand_assign error"); // this should never happen, but gets us rid of the "control reaches end of non-void function" warning + } + + std::string Passthrough::expand_receive() + { + std::string res; + + res += getFloat(lang, num_components) + "("; + + int i = 0; + int current_passthrough = passthrough_number; + int current_component = component_start; + int components_left = num_components; + while (i < num_components) + { + int components_at_once = std::min(components_left, 4 - current_component); + + std::string componentStr; + for (int j = 0; j < components_at_once; ++j) + componentStr += getComponent(j + current_component); + + res += "passthrough" + boost::lexical_cast(current_passthrough) + "." + componentStr; + + current_component += components_at_once; + + components_left -= components_at_once; + + i += components_at_once; + + if (components_left == 0) + { + // finished + return res + ")"; +; + } + else + { + // add comma to every variable but the last + res += ", "; + } + + if (current_component == 4) + { + current_passthrough++; + current_component = 0; + } + } + + throw std::runtime_error("expand_receive error"); // this should never happen, but gets us rid of the "control reaches end of non-void function" warning + } + + // ------------------------------------------------------------------------------ + + void ShaderInstance::parse (std::string& source, PropertySetGet* properties) + { + size_t pos = 0; + while (true) + { + pos = source.find("@", pos); + if (pos == std::string::npos) + break; + + if (isCmd(source, pos, "@shProperty")) + { + std::vector args = extractMacroArguments (pos, source); + + size_t start = source.find("(", pos); + size_t end = source.find(")", pos); + std::string cmd = source.substr(pos+1, start-(pos+1)); + + std::string replaceValue; + if (cmd == "shPropertyBool") + { + std::string propertyName = args[0]; + PropertyValuePtr value = properties->getProperty(propertyName); + bool val = retrieveValue(value, properties->getContext()).get(); + replaceValue = val ? "1" : "0"; + } + else if (cmd == "shPropertyNotBool") // same as above, but inverts the result + { + std::string propertyName = args[0]; + PropertyValuePtr value = properties->getProperty(propertyName); + bool val = retrieveValue(value, properties->getContext()).get(); + replaceValue = val ? "0" : "1"; + } + else if (cmd == "shPropertyString") + { + std::string propertyName = args[0]; + PropertyValuePtr value = properties->getProperty(propertyName); + replaceValue = retrieveValue(value, properties->getContext()).get(); + } + else if (cmd == "shPropertyEqual") + { + std::string propertyName = args[0]; + std::string comparedAgainst = args[1]; + std::string value = retrieveValue(properties->getProperty(propertyName), properties->getContext()).get(); + replaceValue = (value == comparedAgainst) ? "1" : "0"; + } + else + throw std::runtime_error ("unknown command \"" + cmd + "\""); + source.replace(pos, (end+1)-pos, replaceValue); + } + else if (isCmd(source, pos, "@shGlobalSetting")) + { + std::vector args = extractMacroArguments (pos, source); + + std::string cmd = source.substr(pos+1, source.find("(", pos)-(pos+1)); + std::string replaceValue; + if (cmd == "shGlobalSettingBool") + { + std::string settingName = args[0]; + std::string value = retrieveValue(mParent->getCurrentGlobalSettings()->getProperty(settingName), NULL).get(); + replaceValue = (value == "true" || value == "1") ? "1" : "0"; + } + else if (cmd == "shGlobalSettingEqual") + { + std::string settingName = args[0]; + std::string comparedAgainst = args[1]; + std::string value = retrieveValue(mParent->getCurrentGlobalSettings()->getProperty(settingName), NULL).get(); + replaceValue = (value == comparedAgainst) ? "1" : "0"; + } + else if (cmd == "shGlobalSettingString") + { + std::string settingName = args[0]; + replaceValue = retrieveValue(mParent->getCurrentGlobalSettings()->getProperty(settingName), NULL).get(); + } + else + throw std::runtime_error ("unknown command \"" + cmd + "\""); + + source.replace(pos, (source.find(")", pos)+1)-pos, replaceValue); + } + else if (isCmd(source, pos, "@shForeach")) + { + + assert(source.find("@shEndForeach", pos) != std::string::npos); + size_t block_end = source.find("@shEndForeach", pos); + + // get the argument for parsing + size_t start = source.find("(", pos); + size_t end = start; + int brace_depth = 1; + while (brace_depth > 0) + { + ++end; + if (source[end] == '(') + ++brace_depth; + else if (source[end] == ')') + --brace_depth; + } + std::string arg = source.substr(start+1, end-(start+1)); + parse(arg, properties); + + int num = boost::lexical_cast(arg); + + // get the content of the inner block + std::string content = source.substr(end+1, block_end - (end+1)); + + // replace both outer and inner block with content of inner block num times + std::string replaceStr; + for (int i=0; i 0) + { + ++_end; + if (addStr[_end] == '(') + ++_brace_depth; + else if (addStr[_end] == ')') + --_brace_depth; + } + std::string arg = addStr.substr(_start+1, _end-(_start+1)); + parse(arg, properties); + + int offset = boost::lexical_cast (arg); + addStr.replace(pos2, (_end+1)-pos2, boost::lexical_cast(i+offset)); + } + else + { + addStr.replace(pos2, std::string("@shIterator").length(), boost::lexical_cast(i)); + } + } + + replaceStr += addStr; + } + source.replace(pos, (block_end+std::string("@shEndForeach").length())-pos, replaceStr); + } + else if (source.size() > pos+1) + ++pos; // skip + } + + } + + ShaderInstance::ShaderInstance (ShaderSet* parent, const std::string& name, PropertySetGet* properties) + : mName(name) + , mParent(parent) + , mSupported(true) + , mCurrentPassthrough(0) + , mCurrentComponent(0) + { + std::string source = mParent->getSource(); + int type = mParent->getType(); + std::string basePath = mParent->getBasePath(); + size_t pos; + + bool readCache = Factory::getInstance ().getReadSourceCache () && boost::filesystem::exists( + Factory::getInstance ().getCacheFolder () + "/" + mName) + && !mParent->isDirty (); + bool writeCache = Factory::getInstance ().getWriteSourceCache (); + + + if (readCache) + { + std::ifstream ifs( std::string(Factory::getInstance ().getCacheFolder () + "/" + mName).c_str() ); + std::stringstream ss; + ss << ifs.rdbuf(); + source = ss.str(); + } + else + { + std::vector definitions; + + if (mParent->getType() == GPT_Vertex) + definitions.push_back("SH_VERTEX_SHADER"); + else + definitions.push_back("SH_FRAGMENT_SHADER"); + definitions.push_back(convertLang(Factory::getInstance().getCurrentLanguage())); + + parse(source, properties); + + if (Factory::getInstance ().getShaderDebugOutputEnabled ()) + writeDebugFile(source, name + ".pre"); + else + { + #ifdef SHINY_WRITE_SHADER_DEBUG + writeDebugFile(source, name + ".pre"); + #endif + } + + // why do we need our own preprocessor? there are several custom commands available in the shader files + // (for example for binding uniforms to properties or auto constants) - more below. it is important that these + // commands are _only executed if the specific code path actually "survives" the compilation. + // thus, we run the code through a preprocessor first to remove the parts that are unused because of + // unmet #if conditions (or other preprocessor directives). + source = Preprocessor::preprocess(source, basePath, definitions, name); + + // parse counter + std::map counters; + while (true) + { + pos = source.find("@shCounter"); + if (pos == std::string::npos) + break; + + size_t end = source.find(")", pos); + + std::vector args = extractMacroArguments (pos, source); + assert(args.size()); + + int index = boost::lexical_cast(args[0]); + + if (counters.find(index) == counters.end()) + counters[index] = 0; + + source.replace(pos, (end+1)-pos, boost::lexical_cast(counters[index]++)); + } + + // parse passthrough declarations + while (true) + { + pos = source.find("@shAllocatePassthrough"); + if (pos == std::string::npos) + break; + + if (mCurrentPassthrough > 7) + throw std::runtime_error ("too many passthrough's requested (max 8)"); + + std::vector args = extractMacroArguments (pos, source); + assert(args.size() == 2); + + size_t end = source.find(")", pos); + + Passthrough passthrough; + + passthrough.num_components = boost::lexical_cast(args[0]); + assert (passthrough.num_components != 0); + + std::string passthroughName = args[1]; + passthrough.lang = Factory::getInstance().getCurrentLanguage (); + passthrough.component_start = mCurrentComponent; + passthrough.passthrough_number = mCurrentPassthrough; + + mPassthroughMap[passthroughName] = passthrough; + + mCurrentComponent += passthrough.num_components; + if (mCurrentComponent > 3) + { + mCurrentComponent -= 4; + ++mCurrentPassthrough; + } + + source.erase(pos, (end+1)-pos); + } + + // passthrough assign + while (true) + { + pos = source.find("@shPassthroughAssign"); + if (pos == std::string::npos) + break; + + std::vector args = extractMacroArguments (pos, source); + assert(args.size() == 2); + + size_t end = source.find(")", pos); + + std::string passthroughName = args[0]; + std::string assignTo = args[1]; + + assert(mPassthroughMap.find(passthroughName) != mPassthroughMap.end()); + Passthrough& p = mPassthroughMap[passthroughName]; + + source.replace(pos, (end+1)-pos, p.expand_assign(assignTo)); + } + + // passthrough receive + while (true) + { + pos = source.find("@shPassthroughReceive"); + if (pos == std::string::npos) + break; + + std::vector args = extractMacroArguments (pos, source); + assert(args.size() == 1); + + size_t end = source.find(")", pos); + std::string passthroughName = args[0]; + + assert(mPassthroughMap.find(passthroughName) != mPassthroughMap.end()); + Passthrough& p = mPassthroughMap[passthroughName]; + + source.replace(pos, (end+1)-pos, p.expand_receive()); + } + + // passthrough vertex outputs + while (true) + { + pos = source.find("@shPassthroughVertexOutputs"); + if (pos == std::string::npos) + break; + + std::string result; + for (int i = 0; i < mCurrentPassthrough+1; ++i) + { + // not using newlines here, otherwise the line numbers reported by compiler would be messed up.. + if (Factory::getInstance().getCurrentLanguage () == Language_CG || Factory::getInstance().getCurrentLanguage () == Language_HLSL) + result += ", out float4 passthrough" + boost::lexical_cast(i) + " : TEXCOORD" + boost::lexical_cast(i); + + /* + else + result += "out vec4 passthrough" + boost::lexical_cast(i) + "; "; + */ + else + result += "varying vec4 passthrough" + boost::lexical_cast(i) + "; "; + } + + source.replace(pos, std::string("@shPassthroughVertexOutputs").length(), result); + } + + // passthrough fragment inputs + while (true) + { + pos = source.find("@shPassthroughFragmentInputs"); + if (pos == std::string::npos) + break; + + std::string result; + for (int i = 0; i < mCurrentPassthrough+1; ++i) + { + // not using newlines here, otherwise the line numbers reported by compiler would be messed up.. + if (Factory::getInstance().getCurrentLanguage () == Language_CG || Factory::getInstance().getCurrentLanguage () == Language_HLSL) + result += ", in float4 passthrough" + boost::lexical_cast(i) + " : TEXCOORD" + boost::lexical_cast(i); + /* + else + result += "in vec4 passthrough" + boost::lexical_cast(i) + "; "; + */ + else + result += "varying vec4 passthrough" + boost::lexical_cast(i) + "; "; + } + + source.replace(pos, std::string("@shPassthroughFragmentInputs").length(), result); + } + } + + // save to cache _here_ - we want to preserve some macros + if (writeCache && !readCache) + { + std::ofstream of (std::string(Factory::getInstance ().getCacheFolder () + "/" + mName).c_str(), std::ios_base::out); + of.write(source.c_str(), source.size()); + of.close(); + } + + + // parse shared parameters + while (true) + { + pos = source.find("@shSharedParameter"); + if (pos == std::string::npos) + break; + + std::vector args = extractMacroArguments (pos, source); + assert(args.size()); + + size_t end = source.find(")", pos); + + mSharedParameters.push_back(args[0]); + + source.erase(pos, (end+1)-pos); + } + + // parse auto constants + typedef std::map< std::string, std::pair > AutoConstantMap; + AutoConstantMap autoConstants; + while (true) + { + pos = source.find("@shAutoConstant"); + if (pos == std::string::npos) + break; + + std::vector args = extractMacroArguments (pos, source); + assert(args.size() >= 2); + + size_t end = source.find(")", pos); + + std::string autoConstantName, uniformName; + std::string extraData; + + uniformName = args[0]; + autoConstantName = args[1]; + if (args.size() > 2) + extraData = args[2]; + + autoConstants[uniformName] = std::make_pair(autoConstantName, extraData); + + source.erase(pos, (end+1)-pos); + } + + // parse uniform properties + while (true) + { + pos = source.find("@shUniformProperty"); + if (pos == std::string::npos) + break; + + std::vector args = extractMacroArguments (pos, source); + assert(args.size() == 2); + + size_t start = source.find("(", pos); + size_t end = source.find(")", pos); + std::string cmd = source.substr(pos, start-pos); + + ValueType vt; + if (cmd == "@shUniformProperty4f") + vt = VT_Vector4; + else if (cmd == "@shUniformProperty3f") + vt = VT_Vector3; + else if (cmd == "@shUniformProperty2f") + vt = VT_Vector2; + else if (cmd == "@shUniformProperty1f") + vt = VT_Float; + else if (cmd == "@shUniformPropertyInt") + vt = VT_Int; + else + throw std::runtime_error ("unsupported command \"" + cmd + "\""); + + + std::string propertyName, uniformName; + uniformName = args[0]; + propertyName = args[1]; + mUniformProperties[uniformName] = std::make_pair(propertyName, vt); + + source.erase(pos, (end+1)-pos); + } + + // parse texture samplers used + while (true) + { + pos = source.find("@shUseSampler"); + if (pos == std::string::npos) + break; + + size_t end = source.find(")", pos); + + mUsedSamplers.push_back(extractMacroArguments (pos, source)[0]); + source.erase(pos, (end+1)-pos); + } + + // convert any left-over @'s to # + boost::algorithm::replace_all(source, "@", "#"); + + Platform* platform = Factory::getInstance().getPlatform(); + + std::string profile; + if (Factory::getInstance ().getCurrentLanguage () == Language_CG) + profile = mParent->getCgProfile (); + else if (Factory::getInstance ().getCurrentLanguage () == Language_HLSL) + profile = mParent->getHlslProfile (); + + + if (type == GPT_Vertex) + mProgram = boost::shared_ptr(platform->createGpuProgram(GPT_Vertex, "", mName, profile, source, Factory::getInstance().getCurrentLanguage())); + else if (type == GPT_Fragment) + mProgram = boost::shared_ptr(platform->createGpuProgram(GPT_Fragment, "", mName, profile, source, Factory::getInstance().getCurrentLanguage())); + + + if (Factory::getInstance ().getShaderDebugOutputEnabled ()) + writeDebugFile(source, name); + else + { +#ifdef SHINY_WRITE_SHADER_DEBUG + writeDebugFile(source, name); +#endif + } + + if (!mProgram->getSupported()) + { + std::cerr << " Full source code below: \n" << source << std::endl; + mSupported = false; + return; + } + + // set auto constants + for (AutoConstantMap::iterator it = autoConstants.begin(); it != autoConstants.end(); ++it) + { + mProgram->setAutoConstant(it->first, it->second.first, it->second.second); + } + } + + std::string ShaderInstance::getName () + { + return mName; + } + + bool ShaderInstance::getSupported () const + { + return mSupported; + } + + std::vector ShaderInstance::getUsedSamplers() + { + return mUsedSamplers; + } + + void ShaderInstance::setUniformParameters (boost::shared_ptr pass, PropertySetGet* properties) + { + for (UniformMap::iterator it = mUniformProperties.begin(); it != mUniformProperties.end(); ++it) + { + pass->setGpuConstant(mParent->getType(), it->first, it->second.second, properties->getProperty(it->second.first), properties->getContext()); + } + } + + std::vector ShaderInstance::extractMacroArguments (size_t pos, const std::string& source) + { + size_t start = source.find("(", pos); + size_t end = source.find(")", pos); + std::string args = source.substr(start+1, end-(start+1)); + std::vector results; + boost::algorithm::split(results, args, boost::is_any_of(",")); + std::for_each(results.begin(), results.end(), + boost::bind(&boost::trim, + _1, std::locale() )); + return results; + } +} diff --git a/extern/shiny/Main/ShaderInstance.hpp b/extern/shiny/Main/ShaderInstance.hpp new file mode 100644 index 000000000..76326ce0c --- /dev/null +++ b/extern/shiny/Main/ShaderInstance.hpp @@ -0,0 +1,71 @@ +#ifndef SH_SHADERINSTANCE_H +#define SH_SHADERINSTANCE_H + +#include + +#include "Platform.hpp" + +namespace sh +{ + class ShaderSet; + + typedef std::map< std::string, std::pair > UniformMap; + + struct Passthrough + { + Language lang; ///< language to generate for + + int num_components; ///< e.g. 4 for a float4 + + int passthrough_number; + int component_start; ///< 0 = x + + std::string expand_assign(std::string assignTo); + std::string expand_receive(); + }; + typedef std::map PassthroughMap; + + /** + * @brief A specific instance of a \a ShaderSet with a deterministic shader source + */ + class ShaderInstance + { + public: + ShaderInstance (ShaderSet* parent, const std::string& name, PropertySetGet* properties); + + std::string getName(); + + bool getSupported () const; + + std::vector getUsedSamplers(); + std::vector getSharedParameters() { return mSharedParameters; } + + void setUniformParameters (boost::shared_ptr pass, PropertySetGet* properties); + + private: + boost::shared_ptr mProgram; + std::string mName; + ShaderSet* mParent; + bool mSupported; ///< shader compilation was sucessful? + + std::vector mUsedSamplers; + ///< names of the texture samplers that are used by this shader + + std::vector mSharedParameters; + + UniformMap mUniformProperties; + ///< uniforms that this depends on, and their property names / value-types + /// @note this lists shared uniform parameters as well + + int mCurrentPassthrough; ///< 0 - x + int mCurrentComponent; ///< 0:x, 1:y, 2:z, 3:w + + PassthroughMap mPassthroughMap; + + std::vector extractMacroArguments (size_t pos, const std::string& source); ///< take a macro invocation and return vector of arguments + + void parse (std::string& source, PropertySetGet* properties); + }; +} + +#endif diff --git a/extern/shiny/Main/ShaderSet.cpp b/extern/shiny/Main/ShaderSet.cpp new file mode 100644 index 000000000..2702ece19 --- /dev/null +++ b/extern/shiny/Main/ShaderSet.cpp @@ -0,0 +1,172 @@ +#include "ShaderSet.hpp" + +#include +#include + +#include +#include +#include + +#include "Factory.hpp" + +namespace sh +{ + ShaderSet::ShaderSet (const std::string& type, const std::string& cgProfile, const std::string& hlslProfile, const std::string& sourceFile, const std::string& basePath, + const std::string& name, PropertySetGet* globalSettingsPtr) + : mBasePath(basePath) + , mName(name) + , mCgProfile(cgProfile) + , mHlslProfile(hlslProfile) + , mIsDirty(false) + { + if (type == "vertex") + mType = GPT_Vertex; + else // if (type == "fragment") + mType = GPT_Fragment; + + std::ifstream stream(sourceFile.c_str(), std::ifstream::in); + std::stringstream buffer; + + buffer << stream.rdbuf(); + stream.close(); + mSource = buffer.str(); + parse(); + } + + void ShaderSet::parse() + { + std::string currentToken; + bool tokenIsRecognized = false; + bool isInBraces = false; + for (std::string::const_iterator it = mSource.begin(); it != mSource.end(); ++it) + { + char c = *it; + if (((c == ' ') && !isInBraces) || (c == '\n') || + ( ((c == '(') || (c == ')')) + && !tokenIsRecognized)) + { + if (tokenIsRecognized) + { + if (boost::starts_with(currentToken, "@shGlobalSetting")) + { + assert ((currentToken.find('(') != std::string::npos) && (currentToken.find(')') != std::string::npos)); + size_t start = currentToken.find('(')+1; + mGlobalSettings.push_back(currentToken.substr(start, currentToken.find(')')-start)); + } + else if (boost::starts_with(currentToken, "@shPropertyEqual")) + { + assert ((currentToken.find('(') != std::string::npos) && (currentToken.find(')') != std::string::npos) + && (currentToken.find(',') != std::string::npos)); + size_t start = currentToken.find('(')+1; + size_t end = currentToken.find(','); + mProperties.push_back(currentToken.substr(start, end-start)); + } + else if (boost::starts_with(currentToken, "@shProperty")) + { + assert ((currentToken.find('(') != std::string::npos) && (currentToken.find(')') != std::string::npos)); + size_t start = currentToken.find('(')+1; + std::string propertyName = currentToken.substr(start, currentToken.find(')')-start); + // if the property name is constructed dynamically (e.g. through an iterator) then there is nothing we can do + if (propertyName.find("@") == std::string::npos) + mProperties.push_back(propertyName); + } + } + + currentToken = ""; + } + else + { + if (currentToken == "") + { + if (c == '@') + tokenIsRecognized = true; + else + tokenIsRecognized = false; + } + else + { + if (c == '@') + { + // ouch, there are nested macros + // ( for example @shForeach(@shPropertyString(foobar)) ) + currentToken = ""; + } + } + + if (c == '(' && tokenIsRecognized) + isInBraces = true; + else if (c == ')' && tokenIsRecognized) + isInBraces = false; + + currentToken += c; + + } + } + } + + ShaderInstance* ShaderSet::getInstance (PropertySetGet* properties) + { + size_t h = buildHash (properties); + if (std::find(mFailedToCompile.begin(), mFailedToCompile.end(), h) != mFailedToCompile.end()) + return NULL; + if (mInstances.find(h) == mInstances.end()) + { + ShaderInstance newInstance(this, mName + "_" + boost::lexical_cast(h), properties); + if (!newInstance.getSupported()) + { + mFailedToCompile.push_back(h); + return NULL; + } + mInstances.insert(std::make_pair(h, newInstance)); + } + return &mInstances.find(h)->second; + } + + size_t ShaderSet::buildHash (PropertySetGet* properties) + { + size_t seed = 0; + PropertySetGet* currentGlobalSettings = getCurrentGlobalSettings (); + + for (std::vector::iterator it = mProperties.begin(); it != mProperties.end(); ++it) + { + std::string v = retrieveValue(properties->getProperty(*it), properties->getContext()).get(); + boost::hash_combine(seed, v); + } + for (std::vector ::iterator it = mGlobalSettings.begin(); it != mGlobalSettings.end(); ++it) + { + boost::hash_combine(seed, retrieveValue(currentGlobalSettings->getProperty(*it), NULL).get()); + } + boost::hash_combine(seed, static_cast(Factory::getInstance().getCurrentLanguage())); + return seed; + } + + PropertySetGet* ShaderSet::getCurrentGlobalSettings() const + { + return Factory::getInstance ().getCurrentGlobalSettings (); + } + + std::string ShaderSet::getBasePath() const + { + return mBasePath; + } + + std::string ShaderSet::getSource() const + { + return mSource; + } + + std::string ShaderSet::getCgProfile() const + { + return mCgProfile; + } + + std::string ShaderSet::getHlslProfile() const + { + return mHlslProfile; + } + + int ShaderSet::getType() const + { + return mType; + } +} diff --git a/extern/shiny/Main/ShaderSet.hpp b/extern/shiny/Main/ShaderSet.hpp new file mode 100644 index 000000000..776750598 --- /dev/null +++ b/extern/shiny/Main/ShaderSet.hpp @@ -0,0 +1,71 @@ +#ifndef SH_SHADERSET_H +#define SH_SHADERSET_H + +#include +#include +#include + +#include "ShaderInstance.hpp" + +namespace sh +{ + class PropertySetGet; + + typedef std::map ShaderInstanceMap; + + /** + * @brief Contains possible shader permutations of a single uber-shader (represented by one source file) + */ + class ShaderSet + { + public: + ShaderSet (const std::string& type, const std::string& cgProfile, const std::string& hlslProfile, const std::string& sourceFile, const std::string& basePath, + const std::string& name, PropertySetGet* globalSettingsPtr); + + /// Retrieve a shader instance for the given properties. \n + /// If a \a ShaderInstance with the same properties exists already, simply returns this instance. \n + /// Otherwise, creates a new \a ShaderInstance (i.e. compiles a new shader). \n + /// Might also return NULL if the shader failed to compile. \n + /// @note Only the properties that actually affect the shader source are taken into consideration here, + /// so it does not matter if you pass any extra properties that the shader does not care about. + ShaderInstance* getInstance (PropertySetGet* properties); + + void markDirty() { mIsDirty = true; } + ///< Signals that the cache is out of date, and thus should not be used this time + + private: + PropertySetGet* getCurrentGlobalSettings() const; + std::string getBasePath() const; + std::string getSource() const; + std::string getCgProfile() const; + std::string getHlslProfile() const; + int getType() const; + + bool isDirty() { return mIsDirty; } + + friend class ShaderInstance; + + bool mIsDirty; + + private: + GpuProgramType mType; + std::string mSource; + std::string mBasePath; + std::string mCgProfile; + std::string mHlslProfile; + std::string mName; + + std::vector mFailedToCompile; + + std::vector mGlobalSettings; ///< names of the global settings that affect the shader source + std::vector mProperties; ///< names of the per-material properties that affect the shader source + + ShaderInstanceMap mInstances; ///< maps permutation ID (generated from the properties) to \a ShaderInstance + + void parse(); ///< find out which properties and global settings affect the shader source + + size_t buildHash (PropertySetGet* properties); + }; +} + +#endif diff --git a/extern/shiny/Platforms/Ogre/OgreGpuProgram.cpp b/extern/shiny/Platforms/Ogre/OgreGpuProgram.cpp new file mode 100644 index 000000000..fe5aa2fe7 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreGpuProgram.cpp @@ -0,0 +1,70 @@ +#include + +#include "OgreGpuProgram.hpp" + +#include + +#include +#include +#include + +namespace sh +{ + OgreGpuProgram::OgreGpuProgram( + GpuProgramType type, + const std::string& compileArguments, + const std::string& name, const std::string& profile, + const std::string& source, const std::string& lang, + const std::string& resourceGroup) + : GpuProgram() + { + Ogre::HighLevelGpuProgramManager& mgr = Ogre::HighLevelGpuProgramManager::getSingleton(); + assert (mgr.getByName(name).isNull() && "Vertex program already exists"); + + Ogre::GpuProgramType t; + if (type == GPT_Vertex) + t = Ogre::GPT_VERTEX_PROGRAM; + else + t = Ogre::GPT_FRAGMENT_PROGRAM; + + mProgram = mgr.createProgram(name, resourceGroup, lang, t); + if (lang != "glsl") + mProgram->setParameter("entry_point", "main"); + + if (lang == "hlsl") + mProgram->setParameter("target", profile); + else if (lang == "cg") + mProgram->setParameter("profiles", profile); + + mProgram->setSource(source); + mProgram->load(); + + if (mProgram.isNull() || !mProgram->isSupported()) + std::cerr << "Failed to compile shader \"" << name << "\". Consider the OGRE log for more information." << std::endl; + } + + bool OgreGpuProgram::getSupported() + { + return (!mProgram.isNull() && mProgram->isSupported()); + } + + void OgreGpuProgram::setAutoConstant (const std::string& name, const std::string& autoConstantName, const std::string& extraInfo) + { + assert (!mProgram.isNull() && mProgram->isSupported()); + const Ogre::GpuProgramParameters::AutoConstantDefinition* d = Ogre::GpuProgramParameters::getAutoConstantDefinition(autoConstantName); + + if (!d) + throw std::runtime_error ("can't find auto constant with name \"" + autoConstantName + "\""); + Ogre::GpuProgramParameters::AutoConstantType t = d->acType; + + // this simplifies debugging for CG a lot. + mProgram->getDefaultParameters()->setIgnoreMissingParams(true); + + if (d->dataType == Ogre::GpuProgramParameters::ACDT_NONE) + mProgram->getDefaultParameters()->setNamedAutoConstant (name, t, 0); + else if (d->dataType == Ogre::GpuProgramParameters::ACDT_INT) + mProgram->getDefaultParameters()->setNamedAutoConstant (name, t, extraInfo == "" ? 0 : boost::lexical_cast(extraInfo)); + else if (d->dataType == Ogre::GpuProgramParameters::ACDT_REAL) + mProgram->getDefaultParameters()->setNamedAutoConstantReal (name, t, extraInfo == "" ? 0.f : boost::lexical_cast(extraInfo)); + } +} diff --git a/extern/shiny/Platforms/Ogre/OgreGpuProgram.hpp b/extern/shiny/Platforms/Ogre/OgreGpuProgram.hpp new file mode 100644 index 000000000..42673ed9b --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreGpuProgram.hpp @@ -0,0 +1,31 @@ +#ifndef SH_OGREGPUPROGRAM_H +#define SH_OGREGPUPROGRAM_H + +#include + +#include + +#include "../../Main/Platform.hpp" + +namespace sh +{ + class OgreGpuProgram : public GpuProgram + { + public: + OgreGpuProgram ( + GpuProgramType type, + const std::string& compileArguments, + const std::string& name, const std::string& profile, + const std::string& source, const std::string& lang, + const std::string& resourceGroup); + + virtual bool getSupported(); + + virtual void setAutoConstant (const std::string& name, const std::string& autoConstantName, const std::string& extraInfo = ""); + + private: + Ogre::HighLevelGpuProgramPtr mProgram; + }; +} + +#endif diff --git a/extern/shiny/Platforms/Ogre/OgreMaterial.cpp b/extern/shiny/Platforms/Ogre/OgreMaterial.cpp new file mode 100644 index 000000000..4a550b8bf --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreMaterial.cpp @@ -0,0 +1,99 @@ +#include "OgreMaterial.hpp" + +#include +#include +#include + +#include "OgrePass.hpp" +#include "OgreMaterialSerializer.hpp" +#include "OgrePlatform.hpp" + +namespace sh +{ + static const std::string sDefaultTechniqueName = "SH_DefaultTechnique"; + + OgreMaterial::OgreMaterial (const std::string& name, const std::string& resourceGroup) + : Material() + { + assert (Ogre::MaterialManager::getSingleton().getByName(name).isNull() && "Material already exists"); + mMaterial = Ogre::MaterialManager::getSingleton().create (name, resourceGroup); + mMaterial->removeAllTechniques(); + mMaterial->createTechnique()->setSchemeName (sDefaultTechniqueName); + mMaterial->compile(); + } + + OgreMaterial::~OgreMaterial() + { + Ogre::MaterialManager::getSingleton().remove(mMaterial->getName()); + } + + boost::shared_ptr OgreMaterial::createPass (const std::string& configuration, unsigned short lodIndex) + { + return boost::shared_ptr (new OgrePass (this, configuration, lodIndex)); + } + + void OgreMaterial::removeAll () + { + mMaterial->removeAllTechniques(); + mMaterial->createTechnique()->setSchemeName (sDefaultTechniqueName); + mMaterial->compile(); + } + + void OgreMaterial::setLodLevels (const std::string& lodLevels) + { + OgreMaterialSerializer& s = OgrePlatform::getSerializer(); + + s.setMaterialProperty ("lod_values", lodLevels, mMaterial); + } + + bool OgreMaterial::createConfiguration (const std::string& name, unsigned short lodIndex) + { + for (int i=0; igetNumTechniques(); ++i) + { + if (mMaterial->getTechnique(i)->getSchemeName() == name && mMaterial->getTechnique(i)->getLodIndex() == lodIndex) + return false; + } + + Ogre::Technique* t = mMaterial->createTechnique(); + t->setSchemeName (name); + t->setLodIndex (lodIndex); + if (mShadowCasterMaterial != "") + t->setShadowCasterMaterial(mShadowCasterMaterial); + + mMaterial->compile(); + + return true; + } + + Ogre::MaterialPtr OgreMaterial::getOgreMaterial () + { + return mMaterial; + } + + Ogre::Technique* OgreMaterial::getOgreTechniqueForConfiguration (const std::string& configurationName, unsigned short lodIndex) + { + for (int i=0; igetNumTechniques(); ++i) + { + if (mMaterial->getTechnique(i)->getSchemeName() == configurationName && mMaterial->getTechnique(i)->getLodIndex() == lodIndex) + { + return mMaterial->getTechnique(i); + } + } + + // Prepare and throw error message + std::stringstream message; + message << "Could not find configurationName '" << configurationName + << "' and lodIndex " << lodIndex; + + throw std::runtime_error(message.str()); + } + + void OgreMaterial::setShadowCasterMaterial (const std::string& name) + { + mShadowCasterMaterial = name; + for (int i=0; igetNumTechniques(); ++i) + { + mMaterial->getTechnique(i)->setShadowCasterMaterial(mShadowCasterMaterial); + } + } +} diff --git a/extern/shiny/Platforms/Ogre/OgreMaterial.hpp b/extern/shiny/Platforms/Ogre/OgreMaterial.hpp new file mode 100644 index 000000000..bec23f0b6 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreMaterial.hpp @@ -0,0 +1,38 @@ +#ifndef SH_OGREMATERIAL_H +#define SH_OGREMATERIAL_H + +#include + +#include + +#include "../../Main/Platform.hpp" + +namespace sh +{ + class OgreMaterial : public Material + { + public: + OgreMaterial (const std::string& name, const std::string& resourceGroup); + virtual ~OgreMaterial(); + + virtual boost::shared_ptr createPass (const std::string& configuration, unsigned short lodIndex); + virtual bool createConfiguration (const std::string& name, unsigned short lodIndex); + + virtual void removeAll (); + + Ogre::MaterialPtr getOgreMaterial(); + + virtual void setLodLevels (const std::string& lodLevels); + + Ogre::Technique* getOgreTechniqueForConfiguration (const std::string& configurationName, unsigned short lodIndex = 0); + + virtual void setShadowCasterMaterial (const std::string& name); + + private: + Ogre::MaterialPtr mMaterial; + + std::string mShadowCasterMaterial; + }; +} + +#endif diff --git a/extern/shiny/Platforms/Ogre/OgreMaterialSerializer.cpp b/extern/shiny/Platforms/Ogre/OgreMaterialSerializer.cpp new file mode 100644 index 000000000..9f57c7b44 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreMaterialSerializer.cpp @@ -0,0 +1,67 @@ +#include "OgreMaterialSerializer.hpp" + +namespace sh +{ + void OgreMaterialSerializer::reset() + { + mScriptContext.section = Ogre::MSS_NONE; + mScriptContext.material.setNull(); + mScriptContext.technique = 0; + mScriptContext.pass = 0; + mScriptContext.textureUnit = 0; + mScriptContext.program.setNull(); + mScriptContext.lineNo = 0; + mScriptContext.filename.clear(); + mScriptContext.techLev = -1; + mScriptContext.passLev = -1; + mScriptContext.stateLev = -1; + } + + bool OgreMaterialSerializer::setPassProperty (const std::string& param, std::string value, Ogre::Pass* pass) + { + reset(); + + mScriptContext.section = Ogre::MSS_PASS; + mScriptContext.pass = pass; + + if (mPassAttribParsers.find (param) == mPassAttribParsers.end()) + return false; + else + { + mPassAttribParsers.find(param)->second(value, mScriptContext); + return true; + } + } + + bool OgreMaterialSerializer::setTextureUnitProperty (const std::string& param, std::string value, Ogre::TextureUnitState* t) + { + reset(); + + mScriptContext.section = Ogre::MSS_TEXTUREUNIT; + mScriptContext.textureUnit = t; + + if (mTextureUnitAttribParsers.find (param) == mTextureUnitAttribParsers.end()) + return false; + else + { + mTextureUnitAttribParsers.find(param)->second(value, mScriptContext); + return true; + } + } + + bool OgreMaterialSerializer::setMaterialProperty (const std::string& param, std::string value, Ogre::MaterialPtr m) + { + reset(); + + mScriptContext.section = Ogre::MSS_MATERIAL; + mScriptContext.material = m; + + if (mMaterialAttribParsers.find (param) == mMaterialAttribParsers.end()) + return false; + else + { + mMaterialAttribParsers.find(param)->second(value, mScriptContext); + return true; + } + } +} diff --git a/extern/shiny/Platforms/Ogre/OgreMaterialSerializer.hpp b/extern/shiny/Platforms/Ogre/OgreMaterialSerializer.hpp new file mode 100644 index 000000000..acfc5a362 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreMaterialSerializer.hpp @@ -0,0 +1,29 @@ +#ifndef SH_OGREMATERIALSERIALIZER_H +#define SH_OGREMATERIALSERIALIZER_H + +#include + +namespace Ogre +{ + class Pass; +} + +namespace sh +{ + /** + * @brief This class allows me to let Ogre handle the pass & texture unit properties + */ + class OgreMaterialSerializer : public Ogre::MaterialSerializer + { + public: + bool setPassProperty (const std::string& param, std::string value, Ogre::Pass* pass); + bool setTextureUnitProperty (const std::string& param, std::string value, Ogre::TextureUnitState* t); + bool setMaterialProperty (const std::string& param, std::string value, Ogre::MaterialPtr m); + + private: + void reset(); + }; + +} + +#endif diff --git a/extern/shiny/Platforms/Ogre/OgrePass.cpp b/extern/shiny/Platforms/Ogre/OgrePass.cpp new file mode 100644 index 000000000..8cfaae078 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgrePass.cpp @@ -0,0 +1,128 @@ +#include + +#include "OgrePass.hpp" + +#include +#include + +#include "OgreTextureUnitState.hpp" +#include "OgreGpuProgram.hpp" +#include "OgreMaterial.hpp" +#include "OgreMaterialSerializer.hpp" +#include "OgrePlatform.hpp" + +namespace sh +{ + OgrePass::OgrePass (OgreMaterial* parent, const std::string& configuration, unsigned short lodIndex) + : Pass() + { + Ogre::Technique* t = parent->getOgreTechniqueForConfiguration(configuration, lodIndex); + mPass = t->createPass(); + } + + boost::shared_ptr OgrePass::createTextureUnitState () + { + return boost::shared_ptr (new OgreTextureUnitState (this)); + } + + void OgrePass::assignProgram (GpuProgramType type, const std::string& name) + { + if (type == GPT_Vertex) + mPass->setVertexProgram (name); + else if (type == GPT_Fragment) + mPass->setFragmentProgram (name); + else + throw std::runtime_error("unsupported GpuProgramType"); + } + + Ogre::Pass* OgrePass::getOgrePass () + { + return mPass; + } + + bool OgrePass::setPropertyOverride (const std::string &name, PropertyValuePtr& value, PropertySetGet* context) + { + if (((typeid(*value) == typeid(StringValue)) || typeid(*value) == typeid(LinkedValue)) + && retrieveValue(value, context).get() == "default") + return true; + + if (name == "vertex_program") + return true; // handled already + else if (name == "fragment_program") + return true; // handled already + else if (name == "ffp_vertex_colour_ambient") + { + bool enabled = retrieveValue(value, context).get(); + // fixed-function vertex colour tracking + mPass->setVertexColourTracking(enabled ? Ogre::TVC_AMBIENT : Ogre::TVC_NONE); + return true; + } + else + { + OgreMaterialSerializer& s = OgrePlatform::getSerializer(); + + return s.setPassProperty (name, retrieveValue(value, context).get(), mPass); + } + } + + void OgrePass::setGpuConstant (int type, const std::string& name, ValueType vt, PropertyValuePtr value, PropertySetGet* context) + { + Ogre::GpuProgramParametersSharedPtr params; + if (type == GPT_Vertex) + { + if (!mPass->hasVertexProgram ()) + return; + params = mPass->getVertexProgramParameters(); + } + else if (type == GPT_Fragment) + { + if (!mPass->hasFragmentProgram ()) + return; + params = mPass->getFragmentProgramParameters(); + } + + if (vt == VT_Float) + params->setNamedConstant (name, retrieveValue(value, context).get()); + else if (vt == VT_Int) + params->setNamedConstant (name, retrieveValue(value, context).get()); + else if (vt == VT_Vector4) + { + Vector4 v = retrieveValue(value, context); + params->setNamedConstant (name, Ogre::Vector4(v.mX, v.mY, v.mZ, v.mW)); + } + else if (vt == VT_Vector3) + { + Vector3 v = retrieveValue(value, context); + params->setNamedConstant (name, Ogre::Vector4(v.mX, v.mY, v.mZ, 1.0)); + } + else if (vt == VT_Vector2) + { + Vector2 v = retrieveValue(value, context); + params->setNamedConstant (name, Ogre::Vector4(v.mX, v.mY, 1.0, 1.0)); + } + else + throw std::runtime_error ("unsupported constant type"); + } + + void OgrePass::addSharedParameter (int type, const std::string& name) + { + Ogre::GpuProgramParametersSharedPtr params; + if (type == GPT_Vertex) + params = mPass->getVertexProgramParameters(); + else if (type == GPT_Fragment) + params = mPass->getFragmentProgramParameters(); + + params->addSharedParameters (name); + } + + void OgrePass::setTextureUnitIndex (int programType, const std::string& name, int index) + { + Ogre::GpuProgramParametersSharedPtr params; + if (programType == GPT_Vertex) + params = mPass->getVertexProgramParameters(); + else if (programType == GPT_Fragment) + params = mPass->getFragmentProgramParameters(); + + params->setNamedConstant(name, index); + } +} diff --git a/extern/shiny/Platforms/Ogre/OgrePass.hpp b/extern/shiny/Platforms/Ogre/OgrePass.hpp new file mode 100644 index 000000000..da67a1a2a --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgrePass.hpp @@ -0,0 +1,35 @@ +#ifndef SH_OGREPASS_H +#define SH_OGREPASS_H + +#include + +#include "../../Main/Platform.hpp" + +namespace sh +{ + class OgreMaterial; + + class OgrePass : public Pass + { + public: + OgrePass (OgreMaterial* parent, const std::string& configuration, unsigned short lodIndex); + + virtual boost::shared_ptr createTextureUnitState (); + virtual void assignProgram (GpuProgramType type, const std::string& name); + + Ogre::Pass* getOgrePass(); + + virtual void setGpuConstant (int type, const std::string& name, ValueType vt, PropertyValuePtr value, PropertySetGet* context); + + virtual void addSharedParameter (int type, const std::string& name); + virtual void setTextureUnitIndex (int programType, const std::string& name, int index); + + private: + Ogre::Pass* mPass; + + protected: + virtual bool setPropertyOverride (const std::string &name, PropertyValuePtr& value, PropertySetGet* context); + }; +} + +#endif diff --git a/extern/shiny/Platforms/Ogre/OgrePlatform.cpp b/extern/shiny/Platforms/Ogre/OgrePlatform.cpp new file mode 100644 index 000000000..357949402 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgrePlatform.cpp @@ -0,0 +1,174 @@ +#include + +#include "OgrePlatform.hpp" + +#include +#include +#include + +#include "OgreMaterial.hpp" +#include "OgreGpuProgram.hpp" +#include "OgreMaterialSerializer.hpp" + +#include "../../Main/MaterialInstance.hpp" +#include "../../Main/Factory.hpp" + +namespace +{ + std::string convertLang (sh::Language lang) + { + if (lang == sh::Language_CG) + return "cg"; + else if (lang == sh::Language_HLSL) + return "hlsl"; + else if (lang == sh::Language_GLSL) + return "glsl"; + throw std::runtime_error ("invalid language, valid are: cg, hlsl, glsl"); + } +} + +namespace sh +{ + OgreMaterialSerializer* OgrePlatform::sSerializer = 0; + + OgrePlatform::OgrePlatform(const std::string& resourceGroupName, const std::string& basePath) + : Platform(basePath) + , mResourceGroup(resourceGroupName) + { + Ogre::MaterialManager::getSingleton().addListener(this); + + if (supportsShaderSerialization()) + Ogre::GpuProgramManager::getSingletonPtr()->setSaveMicrocodesToCache(true); + + sSerializer = new OgreMaterialSerializer(); + } + + OgreMaterialSerializer& OgrePlatform::getSerializer() + { + assert(sSerializer); + return *sSerializer; + } + + OgrePlatform::~OgrePlatform () + { + delete sSerializer; + } + + bool OgrePlatform::isProfileSupported (const std::string& profile) + { + return Ogre::GpuProgramManager::getSingleton().isSyntaxSupported(profile); + } + + bool OgrePlatform::supportsShaderSerialization () + { + // Not very reliable in OpenGL mode (requires extension), and somehow doesn't work on linux even if the extension is present + return Ogre::Root::getSingleton ().getRenderSystem ()->getName ().find("OpenGL") == std::string::npos; + } + + bool OgrePlatform::supportsMaterialQueuedListener () + { + return true; + } + + boost::shared_ptr OgrePlatform::createMaterial (const std::string& name) + { + OgreMaterial* material = new OgreMaterial(name, mResourceGroup); + return boost::shared_ptr (material); + } + + boost::shared_ptr OgrePlatform::createGpuProgram ( + GpuProgramType type, + const std::string& compileArguments, + const std::string& name, const std::string& profile, + const std::string& source, Language lang) + { + OgreGpuProgram* prog = new OgreGpuProgram (type, compileArguments, name, profile, source, convertLang(lang), mResourceGroup); + return boost::shared_ptr (static_cast(prog)); + } + + Ogre::Technique* OgrePlatform::handleSchemeNotFound ( + unsigned short schemeIndex, const Ogre::String &schemeName, Ogre::Material *originalMaterial, + unsigned short lodIndex, const Ogre::Renderable *rend) + { + MaterialInstance* m = fireMaterialRequested(originalMaterial->getName(), schemeName, lodIndex); + if (m) + { + OgreMaterial* _m = static_cast(m->getMaterial()); + return _m->getOgreTechniqueForConfiguration (schemeName, lodIndex); + } + else + return 0; // material does not belong to us + } + + void OgrePlatform::serializeShaders (const std::string& file) + { + std::fstream output; + output.open(file.c_str(), std::ios::out | std::ios::binary); + Ogre::DataStreamPtr shaderCache (OGRE_NEW Ogre::FileStreamDataStream(file, &output, false)); + Ogre::GpuProgramManager::getSingleton().saveMicrocodeCache(shaderCache); + } + + void OgrePlatform::deserializeShaders (const std::string& file) + { + std::ifstream inp; + inp.open(file.c_str(), std::ios::in | std::ios::binary); + Ogre::DataStreamPtr shaderCache(OGRE_NEW Ogre::FileStreamDataStream(file, &inp, false)); + Ogre::GpuProgramManager::getSingleton().loadMicrocodeCache(shaderCache); + } + + void OgrePlatform::setSharedParameter (const std::string& name, PropertyValuePtr value) + { + Ogre::GpuSharedParametersPtr params; + if (mSharedParameters.find(name) == mSharedParameters.end()) + { + params = Ogre::GpuProgramManager::getSingleton().createSharedParameters(name); + Ogre::GpuConstantType type; + if (typeid(*value) == typeid(Vector4)) + type = Ogre::GCT_FLOAT4; + else if (typeid(*value) == typeid(Vector3)) + type = Ogre::GCT_FLOAT3; + else if (typeid(*value) == typeid(Vector2)) + type = Ogre::GCT_FLOAT2; + else if (typeid(*value) == typeid(FloatValue)) + type = Ogre::GCT_FLOAT1; + else if (typeid(*value) == typeid(IntValue)) + type = Ogre::GCT_INT1; + else + assert(0); + params->addConstantDefinition(name, type); + mSharedParameters[name] = params; + } + else + params = mSharedParameters.find(name)->second; + + Ogre::Vector4 v (1.0, 1.0, 1.0, 1.0); + if (typeid(*value) == typeid(Vector4)) + { + Vector4 vec = retrieveValue(value, NULL); + v.x = vec.mX; + v.y = vec.mY; + v.z = vec.mZ; + v.w = vec.mW; + } + else if (typeid(*value) == typeid(Vector3)) + { + Vector3 vec = retrieveValue(value, NULL); + v.x = vec.mX; + v.y = vec.mY; + v.z = vec.mZ; + } + else if (typeid(*value) == typeid(Vector2)) + { + Vector2 vec = retrieveValue(value, NULL); + v.x = vec.mX; + v.y = vec.mY; + } + else if (typeid(*value) == typeid(FloatValue)) + v.x = retrieveValue(value, NULL).get(); + else if (typeid(*value) == typeid(IntValue)) + v.x = static_cast(retrieveValue(value, NULL).get()); + else + throw std::runtime_error ("unsupported property type for shared parameter \"" + name + "\""); + params->setNamedConstant(name, v); + } +} diff --git a/extern/shiny/Platforms/Ogre/OgrePlatform.hpp b/extern/shiny/Platforms/Ogre/OgrePlatform.hpp new file mode 100644 index 000000000..d115c46bb --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgrePlatform.hpp @@ -0,0 +1,72 @@ +#ifndef SH_OGREPLATFORM_H +#define SH_OGREPLATFORM_H + +/** + * @addtogroup Platforms + * @{ + */ + +/** + * @addtogroup Ogre + * A set of classes to interact with Ogre's material system + * @{ + */ + +#include "../../Main/Platform.hpp" + +#include +#include + +namespace sh +{ + class OgreMaterialSerializer; + + class OgrePlatform : public Platform, public Ogre::MaterialManager::Listener + { + public: + OgrePlatform (const std::string& resourceGroupName, const std::string& basePath); + virtual ~OgrePlatform (); + + virtual Ogre::Technique* handleSchemeNotFound ( + unsigned short schemeIndex, const Ogre::String &schemeName, Ogre::Material *originalMaterial, + unsigned short lodIndex, const Ogre::Renderable *rend); + + static OgreMaterialSerializer& getSerializer(); + + private: + virtual bool isProfileSupported (const std::string& profile); + + virtual void serializeShaders (const std::string& file); + virtual void deserializeShaders (const std::string& file); + + virtual boost::shared_ptr createMaterial (const std::string& name); + + virtual boost::shared_ptr createGpuProgram ( + GpuProgramType type, + const std::string& compileArguments, + const std::string& name, const std::string& profile, + const std::string& source, Language lang); + + virtual void setSharedParameter (const std::string& name, PropertyValuePtr value); + + friend class ShaderInstance; + friend class Factory; + + protected: + virtual bool supportsShaderSerialization (); + virtual bool supportsMaterialQueuedListener (); + + std::string mResourceGroup; + + static OgreMaterialSerializer* sSerializer; + + std::map mSharedParameters; + }; +} + +/** + * @} + * @} + */ + +#endif diff --git a/extern/shiny/Platforms/Ogre/OgreTextureUnitState.cpp b/extern/shiny/Platforms/Ogre/OgreTextureUnitState.cpp new file mode 100644 index 000000000..0938cf667 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreTextureUnitState.cpp @@ -0,0 +1,40 @@ +#include "OgreTextureUnitState.hpp" + +#include "OgrePass.hpp" +#include "OgrePlatform.hpp" +#include "OgreMaterialSerializer.hpp" + +namespace sh +{ + OgreTextureUnitState::OgreTextureUnitState (OgrePass* parent) + : TextureUnitState() + { + mTextureUnitState = parent->getOgrePass()->createTextureUnitState(""); + } + + bool OgreTextureUnitState::setPropertyOverride (const std::string &name, PropertyValuePtr& value, PropertySetGet* context) + { + OgreMaterialSerializer& s = OgrePlatform::getSerializer(); + + if (name == "texture_alias") + { + // texture alias in this library refers to something else than in ogre + // delegate up + return TextureUnitState::setPropertyOverride (name, value, context); + } + else if (name == "direct_texture") + { + setTextureName (retrieveValue(value, context).get()); + return true; + } + else if (name == "create_in_ffp") + return true; // handled elsewhere + + return s.setTextureUnitProperty (name, retrieveValue(value, context).get(), mTextureUnitState); + } + + void OgreTextureUnitState::setTextureName (const std::string& textureName) + { + mTextureUnitState->setTextureName(textureName); + } +} diff --git a/extern/shiny/Platforms/Ogre/OgreTextureUnitState.hpp b/extern/shiny/Platforms/Ogre/OgreTextureUnitState.hpp new file mode 100644 index 000000000..d36f4b945 --- /dev/null +++ b/extern/shiny/Platforms/Ogre/OgreTextureUnitState.hpp @@ -0,0 +1,27 @@ +#ifndef SH_OGRETEXTUREUNITSTATE_H +#define SH_OGRETEXTUREUNITSTATE_H + +#include + +#include "../../Main/Platform.hpp" + +namespace sh +{ + class OgrePass; + + class OgreTextureUnitState : public TextureUnitState + { + public: + OgreTextureUnitState (OgrePass* parent); + + virtual void setTextureName (const std::string& textureName); + + private: + Ogre::TextureUnitState* mTextureUnitState; + + protected: + virtual bool setPropertyOverride (const std::string &name, PropertyValuePtr& value, PropertySetGet* context); + }; +} + +#endif diff --git a/extern/shiny/Preprocessor/aq.cpp b/extern/shiny/Preprocessor/aq.cpp new file mode 100644 index 000000000..b81d5b332 --- /dev/null +++ b/extern/shiny/Preprocessor/aq.cpp @@ -0,0 +1,236 @@ +/*============================================================================= + 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 + +#include +#include + +#include // configuration data +#include + +#include + +// 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 + diff --git a/extern/shiny/Preprocessor/cpp_re.cpp b/extern/shiny/Preprocessor/cpp_re.cpp new file mode 100644 index 000000000..69d77c372 --- /dev/null +++ b/extern/shiny/Preprocessor/cpp_re.cpp @@ -0,0 +1,442 @@ +/*============================================================================= + 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 + +#include +#include +#include +#include +#include +#include +#include + +#include // configuration data + +#if defined(BOOST_HAS_UNISTD_H) +#include +#else +#include +#endif + +#include +#include + +#include +#include +#include +#include +#include + +// 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 + +/////////////////////////////////////////////////////////////////////////////// +#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 + diff --git a/extern/shiny/Preprocessor/cpp_re.inc b/extern/shiny/Preprocessor/cpp_re.inc new file mode 100644 index 000000000..afb7fc189 --- /dev/null +++ b/extern/shiny/Preprocessor/cpp_re.inc @@ -0,0 +1,9044 @@ +/* Generated by re2c 0.13.5 on Sun Jan 09 15:38:23 2011 */ +#line 1 "cpp.re" +/*============================================================================= + 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) + + This is a lexer conforming to the Standard with a few exceptions. + So it does allow the '$' to be part of identifiers. If you need strict + Standards conforming behaviour, please include the lexer definition + provided in the file strict_cpp.re. + + TODO: + handle errors better. +=============================================================================*/ + +#line 40 "cpp.re" + + + +#line 25 "cpp_re.inc" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + static const unsigned char yybm[] = { + /* table 1 .. 8: 0 */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 60, 32, 60, 60, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 60, 60, 52, 60, 60, 60, 60, 56, + 60, 60, 156, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 44, 57, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 58, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + /* table 9 .. 12: 256 */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 80, 0, 80, 80, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 80, 64, 0, 64, 96, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 64, 64, 64, 64, 64, 0, + 64, 224, 224, 224, 224, 224, 224, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 64, 0, 64, 64, 96, + 64, 224, 224, 224, 224, 224, 224, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + }; + + if ((YYLIMIT - YYCURSOR) < 17) YYFILL(17); + yych = *YYCURSOR; + switch (yych) { + case 0x00: goto yy90; + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: goto yy93; + case '\t': + case '\v': + case '\f': goto yy84; + case '\n': goto yy87; + case '\r': goto yy89; + case ' ': goto yy86; + case '!': goto yy68; + case '"': goto yy79; + case '#': goto yy45; + case '$': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'S': + case 'T': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case 'h': + case 'j': + case 'k': + case 'q': + case 'y': + case 'z': goto yy82; + case '%': goto yy37; + case '&': goto yy62; + case '\'': goto yy77; + case '(': goto yy47; + case ')': goto yy49; + case '*': goto yy57; + case '+': goto yy53; + case ',': goto yy74; + case '-': goto yy55; + case '.': goto yy4; + case '/': goto yy2; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy6; + case ':': goto yy43; + case ';': goto yy51; + case '<': goto yy33; + case '=': goto yy70; + case '>': goto yy72; + case '?': goto yy31; + case 'L': goto yy76; + case 'R': goto yy80; + case 'U': goto yy81; + case '[': goto yy39; + case '\\': goto yy83; + case ']': goto yy41; + case '^': goto yy59; + case '_': goto yy28; + case 'a': goto yy8; + case 'b': goto yy10; + case 'c': goto yy11; + case 'd': goto yy12; + case 'e': goto yy13; + case 'f': goto yy14; + case 'g': goto yy15; + case 'i': goto yy16; + case 'l': goto yy17; + case 'm': goto yy18; + case 'n': goto yy19; + case 'o': goto yy20; + case 'p': goto yy21; + case 'r': goto yy22; + case 's': goto yy23; + case 't': goto yy24; + case 'u': goto yy25; + case 'v': goto yy26; + case 'w': goto yy27; + case 'x': goto yy61; + case '{': goto yy29; + case '|': goto yy64; + case '}': goto yy35; + case '~': goto yy66; + default: goto yy92; + } +yy2: + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '.') { + if (yych == '*') goto yy998; + } else { + if (yych <= '/') goto yy996; + if (yych == '=') goto yy994; + } +#line 188 "cpp.re" + { BOOST_WAVE_RET(T_DIVIDE); } +#line 238 "cpp_re.inc" +yy4: + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '-') { + if (yych == '*') goto yy988; + } else { + if (yych <= '.') goto yy990; + if (yych <= '/') goto yy5; + if (yych <= '9') goto yy991; + } +yy5: +#line 174 "cpp.re" + { BOOST_WAVE_RET(T_DOT); } +#line 252 "cpp_re.inc" +yy6: + ++YYCURSOR; +yy7: +#line 45 "cpp.re" + { goto pp_number; } +#line 258 "cpp_re.inc" +yy8: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case 'l': goto yy964; + case 'n': goto yy965; + case 's': goto yy966; + case 'u': goto yy967; + default: goto yy109; + } +yy9: +#line 290 "cpp.re" + { BOOST_WAVE_RET(T_IDENTIFIER); } +#line 272 "cpp_re.inc" +yy10: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'n') { + if (yych == 'i') goto yy946; + goto yy109; + } else { + if (yych <= 'o') goto yy947; + if (yych == 'r') goto yy948; + goto yy109; + } +yy11: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case 'a': goto yy893; + case 'h': goto yy894; + case 'l': goto yy895; + case 'o': goto yy896; + default: goto yy109; + } +yy12: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'n') { + if (yych == 'e') goto yy855; + goto yy109; + } else { + if (yych <= 'o') goto yy856; + if (yych == 'y') goto yy858; + goto yy109; + } +yy13: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'm') { + if (yych == 'l') goto yy830; + goto yy109; + } else { + if (yych <= 'n') goto yy831; + if (yych == 'x') goto yy832; + goto yy109; + } +yy14: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case 'a': goto yy811; + case 'l': goto yy812; + case 'o': goto yy813; + case 'r': goto yy814; + default: goto yy109; + } +yy15: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy807; + goto yy109; +yy16: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'l') { + if (yych == 'f') goto yy791; + goto yy109; + } else { + if (yych <= 'm') goto yy793; + if (yych <= 'n') goto yy794; + goto yy109; + } +yy17: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy787; + goto yy109; +yy18: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'u') goto yy780; + goto yy109; +yy19: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'e') { + if (yych == 'a') goto yy747; + if (yych <= 'd') goto yy109; + goto yy748; + } else { + if (yych <= 'o') { + if (yych <= 'n') goto yy109; + goto yy749; + } else { + if (yych == 'u') goto yy750; + goto yy109; + } + } +yy20: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'p') goto yy733; + if (yych == 'r') goto yy734; + goto yy109; +yy21: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'r') goto yy712; + if (yych == 'u') goto yy713; + goto yy109; +yy22: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy684; + goto yy109; +yy23: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 's') { + if (yych <= 'g') goto yy109; + if (yych <= 'h') goto yy638; + if (yych <= 'i') goto yy639; + goto yy109; + } else { + if (yych <= 't') goto yy640; + if (yych == 'w') goto yy641; + goto yy109; + } +yy24: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'h') { + if (yych == 'e') goto yy591; + if (yych <= 'g') goto yy109; + goto yy592; + } else { + if (yych <= 'r') { + if (yych <= 'q') goto yy109; + goto yy593; + } else { + if (yych == 'y') goto yy594; + goto yy109; + } + } +yy25: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '8') { + if (yych <= '&') { + if (yych == '"') goto yy129; + goto yy109; + } else { + if (yych <= '\'') goto yy131; + if (yych <= '7') goto yy109; + goto yy573; + } + } else { + if (yych <= 'm') { + if (yych == 'R') goto yy128; + goto yy109; + } else { + if (yych <= 'n') goto yy574; + if (yych == 's') goto yy575; + goto yy109; + } + } +yy26: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy555; + if (yych == 'o') goto yy556; + goto yy109; +yy27: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'c') goto yy543; + if (yych == 'h') goto yy544; + goto yy109; +yy28: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case '_': goto yy454; + case 'a': goto yy455; + case 'b': goto yy456; + case 'c': goto yy457; + case 'd': goto yy458; + case 'f': goto yy459; + case 'i': goto yy460; + case 's': goto yy461; + default: goto yy109; + } +yy29: + ++YYCURSOR; +#line 138 "cpp.re" + { BOOST_WAVE_RET(T_LEFTBRACE); } +#line 466 "cpp_re.inc" +yy31: + yyaccept = 2; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '?') goto yy419; +yy32: +#line 163 "cpp.re" + { BOOST_WAVE_RET(T_QUESTION_MARK); } +#line 474 "cpp_re.inc" +yy33: + ++YYCURSOR; + if ((yych = *YYCURSOR) <= ':') { + if (yych == '%') goto yy415; + if (yych >= ':') goto yy413; + } else { + if (yych <= ';') goto yy34; + if (yych <= '<') goto yy411; + if (yych <= '=') goto yy409; + } +yy34: +#line 204 "cpp.re" + { BOOST_WAVE_RET(T_LESS); } +#line 488 "cpp_re.inc" +yy35: + ++YYCURSOR; +#line 141 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTBRACE); } +#line 493 "cpp_re.inc" +yy37: + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '<') { + if (yych == ':') goto yy400; + } else { + if (yych <= '=') goto yy402; + if (yych <= '>') goto yy404; + } +#line 189 "cpp.re" + { BOOST_WAVE_RET(T_PERCENT); } +#line 504 "cpp_re.inc" +yy39: + ++YYCURSOR; +#line 144 "cpp.re" + { BOOST_WAVE_RET(T_LEFTBRACKET); } +#line 509 "cpp_re.inc" +yy41: + ++YYCURSOR; +#line 147 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTBRACKET); } +#line 514 "cpp_re.inc" +yy43: + ++YYCURSOR; + if ((yych = *YYCURSOR) == ':') goto yy396; + if (yych == '>') goto yy398; +#line 161 "cpp.re" + { BOOST_WAVE_RET(T_COLON); } +#line 521 "cpp_re.inc" +yy45: + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'c') { + if (yych <= ' ') { + if (yych <= '\n') { + if (yych == '\t') goto yy273; + } else { + if (yych <= '\f') goto yy273; + if (yych >= ' ') goto yy273; + } + } else { + if (yych <= '.') { + if (yych == '#') goto yy284; + } else { + if (yych <= '/') goto yy273; + if (yych == '?') goto yy283; + } + } + } else { + if (yych <= 'p') { + if (yych <= 'i') { + if (yych <= 'e') goto yy273; + if (yych >= 'i') goto yy273; + } else { + if (yych == 'l') goto yy273; + if (yych >= 'p') goto yy273; + } + } else { + if (yych <= 't') { + if (yych == 'r') goto yy273; + } else { + if (yych == 'v') goto yy46; + if (yych <= 'w') goto yy273; + } + } + } +yy46: +#line 150 "cpp.re" + { BOOST_WAVE_RET(T_POUND); } +#line 562 "cpp_re.inc" +yy47: + ++YYCURSOR; +#line 158 "cpp.re" + { BOOST_WAVE_RET(T_LEFTPAREN); } +#line 567 "cpp_re.inc" +yy49: + ++YYCURSOR; +#line 159 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTPAREN); } +#line 572 "cpp_re.inc" +yy51: + ++YYCURSOR; +#line 160 "cpp.re" + { BOOST_WAVE_RET(T_SEMICOLON); } +#line 577 "cpp_re.inc" +yy53: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '+') goto yy268; + if (yych == '=') goto yy270; +#line 185 "cpp.re" + { BOOST_WAVE_RET(T_PLUS); } +#line 584 "cpp_re.inc" +yy55: + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '<') { + if (yych == '-') goto yy262; + } else { + if (yych <= '=') goto yy264; + if (yych <= '>') goto yy260; + } +#line 186 "cpp.re" + { BOOST_WAVE_RET(T_MINUS); } +#line 595 "cpp_re.inc" +yy57: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy258; +#line 187 "cpp.re" + { BOOST_WAVE_RET(T_STAR); } +#line 601 "cpp_re.inc" +yy59: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy256; +#line 190 "cpp.re" + { BOOST_WAVE_RET(T_XOR); } +#line 607 "cpp_re.inc" +yy61: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy249; + goto yy109; +yy62: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '&') goto yy245; + if (yych == '=') goto yy247; +#line 193 "cpp.re" + { BOOST_WAVE_RET(T_AND); } +#line 619 "cpp_re.inc" +yy64: + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '>') { + if (yych == '=') goto yy240; + } else { + if (yych <= '?') goto yy237; + if (yych == '|') goto yy238; + } +yy65: +#line 195 "cpp.re" + { BOOST_WAVE_RET(T_OR); } +#line 632 "cpp_re.inc" +yy66: + ++YYCURSOR; +#line 198 "cpp.re" + { BOOST_WAVE_RET(T_COMPL); } +#line 637 "cpp_re.inc" +yy68: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy235; +#line 201 "cpp.re" + { BOOST_WAVE_RET(T_NOT); } +#line 643 "cpp_re.inc" +yy70: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy233; +#line 203 "cpp.re" + { BOOST_WAVE_RET(T_ASSIGN); } +#line 649 "cpp_re.inc" +yy72: + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '<') goto yy73; + if (yych <= '=') goto yy227; + if (yych <= '>') goto yy229; +yy73: +#line 205 "cpp.re" + { BOOST_WAVE_RET(T_GREATER); } +#line 658 "cpp_re.inc" +yy74: + ++YYCURSOR; +#line 237 "cpp.re" + { BOOST_WAVE_RET(T_COMMA); } +#line 663 "cpp_re.inc" +yy76: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '?') { + if (yych <= '&') { + if (yych <= '"') { + if (yych <= '!') goto yy9; + goto yy137; + } else { + if (yych == '$') goto yy108; + goto yy9; + } + } else { + if (yych <= '/') { + if (yych <= '\'') goto yy226; + goto yy9; + } else { + if (yych <= '9') goto yy108; + if (yych <= '>') goto yy9; + goto yy111; + } + } + } else { + if (yych <= '[') { + if (yych <= 'Q') { + if (yych <= '@') goto yy9; + goto yy108; + } else { + if (yych <= 'R') goto yy225; + if (yych <= 'Z') goto yy108; + goto yy9; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy110; + if (yych <= '^') goto yy9; + goto yy108; + } else { + if (yych <= '`') goto yy9; + if (yych <= 'z') goto yy108; + goto yy9; + } + } + } +yy77: + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '\f') { + if (yych == '\t') goto yy182; + if (yych >= '\v') goto yy182; + } else { + if (yych <= 0x1F) goto yy78; + if (yych != '\'') goto yy182; + } +yy78: +#line 339 "cpp.re" + { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); } +#line 721 "cpp_re.inc" +yy79: + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '\n') { + if (yych == '\t') goto yy138; + goto yy78; + } else { + if (yych <= '\f') goto yy138; + if (yych <= 0x1F) goto yy78; + goto yy138; + } +yy80: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '"') goto yy135; + goto yy109; +yy81: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '&') { + if (yych == '"') goto yy129; + goto yy109; + } else { + if (yych <= '\'') goto yy131; + if (yych == 'R') goto yy128; + goto yy109; + } +yy82: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + goto yy109; +yy83: + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy100; + if (yych == 'u') goto yy98; + goto yy78; +yy84: + ++YYCURSOR; + yych = *YYCURSOR; + goto yy97; +yy85: +#line 319 "cpp.re" + { BOOST_WAVE_RET(T_SPACE); } +#line 766 "cpp_re.inc" +yy86: + yych = *++YYCURSOR; + goto yy97; +yy87: + ++YYCURSOR; +yy88: +#line 322 "cpp.re" + { + s->line++; + cursor.column = 1; + BOOST_WAVE_RET(T_NEWLINE); + } +#line 779 "cpp_re.inc" +yy89: + yych = *++YYCURSOR; + if (yych == '\n') goto yy95; + goto yy88; +yy90: + ++YYCURSOR; +#line 329 "cpp.re" + { + if (s->eof && cursor != s->eof) + { + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_error, + "invalid character '\\000' in input stream"); + } + BOOST_WAVE_RET(T_EOF); + } +#line 796 "cpp_re.inc" +yy92: + yych = *++YYCURSOR; + goto yy78; +yy93: + ++YYCURSOR; +#line 342 "cpp.re" + { + // flag the error + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_error, + "invalid character '\\%03o' in input stream", *--YYCURSOR); + } +#line 809 "cpp_re.inc" +yy95: + yych = *++YYCURSOR; + goto yy88; +yy96: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy97: + if (yybm[256+yych] & 16) { + goto yy96; + } + goto yy85; +yy98: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy125; + } else { + if (yych <= 'F') goto yy125; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy125; + } +yy99: + YYCURSOR = YYMARKER; + if (yyaccept <= 56) { + if (yyaccept <= 28) { + if (yyaccept <= 14) { + if (yyaccept <= 7) { + if (yyaccept <= 3) { + if (yyaccept <= 1) { + if (yyaccept <= 0) { + goto yy5; + } else { + goto yy9; + } + } else { + if (yyaccept <= 2) { + goto yy32; + } else { + goto yy46; + } + } + } else { + if (yyaccept <= 5) { + if (yyaccept <= 4) { + goto yy65; + } else { + goto yy78; + } + } else { + if (yyaccept <= 6) { + goto yy142; + } else { + goto yy192; + } + } + } + } else { + if (yyaccept <= 11) { + if (yyaccept <= 9) { + if (yyaccept <= 8) { + goto yy251; + } else { + goto yy255; + } + } else { + if (yyaccept <= 10) { + goto yy291; + } else { + goto yy306; + } + } + } else { + if (yyaccept <= 13) { + if (yyaccept <= 12) { + goto yy401; + } else { + goto yy429; + } + } else { + goto yy433; + } + } + } + } else { + if (yyaccept <= 21) { + if (yyaccept <= 18) { + if (yyaccept <= 16) { + if (yyaccept <= 15) { + goto yy437; + } else { + goto yy468; + } + } else { + if (yyaccept <= 17) { + goto yy474; + } else { + goto yy482; + } + } + } else { + if (yyaccept <= 20) { + if (yyaccept <= 19) { + goto yy490; + } else { + goto yy495; + } + } else { + goto yy500; + } + } + } else { + if (yyaccept <= 25) { + if (yyaccept <= 23) { + if (yyaccept <= 22) { + goto yy503; + } else { + goto yy513; + } + } else { + if (yyaccept <= 24) { + goto yy519; + } else { + goto yy522; + } + } + } else { + if (yyaccept <= 27) { + if (yyaccept <= 26) { + goto yy529; + } else { + goto yy536; + } + } else { + goto yy538; + } + } + } + } + } else { + if (yyaccept <= 42) { + if (yyaccept <= 35) { + if (yyaccept <= 32) { + if (yyaccept <= 30) { + if (yyaccept <= 29) { + goto yy540; + } else { + goto yy542; + } + } else { + if (yyaccept <= 31) { + goto yy548; + } else { + goto yy554; + } + } + } else { + if (yyaccept <= 34) { + if (yyaccept <= 33) { + goto yy564; + } else { + goto yy566; + } + } else { + goto yy572; + } + } + } else { + if (yyaccept <= 39) { + if (yyaccept <= 37) { + if (yyaccept <= 36) { + goto yy579; + } else { + goto yy587; + } + } else { + if (yyaccept <= 38) { + goto yy590; + } else { + goto yy603; + } + } + } else { + if (yyaccept <= 41) { + if (yyaccept <= 40) { + goto yy605; + } else { + goto yy608; + } + } else { + goto yy611; + } + } + } + } else { + if (yyaccept <= 49) { + if (yyaccept <= 46) { + if (yyaccept <= 44) { + if (yyaccept <= 43) { + goto yy613; + } else { + goto yy619; + } + } else { + if (yyaccept <= 45) { + goto yy628; + } else { + goto yy630; + } + } + } else { + if (yyaccept <= 48) { + if (yyaccept <= 47) { + goto yy637; + } else { + goto yy646; + } + } else { + goto yy652; + } + } + } else { + if (yyaccept <= 53) { + if (yyaccept <= 51) { + if (yyaccept <= 50) { + goto yy656; + } else { + goto yy663; + } + } else { + if (yyaccept <= 52) { + goto yy669; + } else { + goto yy675; + } + } + } else { + if (yyaccept <= 55) { + if (yyaccept <= 54) { + goto yy679; + } else { + goto yy683; + } + } else { + goto yy691; + } + } + } + } + } + } else { + if (yyaccept <= 85) { + if (yyaccept <= 71) { + if (yyaccept <= 64) { + if (yyaccept <= 60) { + if (yyaccept <= 58) { + if (yyaccept <= 57) { + goto yy705; + } else { + goto yy711; + } + } else { + if (yyaccept <= 59) { + goto yy718; + } else { + goto yy727; + } + } + } else { + if (yyaccept <= 62) { + if (yyaccept <= 61) { + goto yy732; + } else { + goto yy735; + } + } else { + if (yyaccept <= 63) { + goto yy739; + } else { + goto yy746; + } + } + } + } else { + if (yyaccept <= 68) { + if (yyaccept <= 66) { + if (yyaccept <= 65) { + goto yy756; + } else { + goto yy759; + } + } else { + if (yyaccept <= 67) { + goto yy763; + } else { + goto yy769; + } + } + } else { + if (yyaccept <= 70) { + if (yyaccept <= 69) { + goto yy771; + } else { + goto yy779; + } + } else { + goto yy786; + } + } + } + } else { + if (yyaccept <= 78) { + if (yyaccept <= 75) { + if (yyaccept <= 73) { + if (yyaccept <= 72) { + goto yy790; + } else { + goto yy792; + } + } else { + if (yyaccept <= 74) { + goto yy797; + } else { + goto yy801; + } + } + } else { + if (yyaccept <= 77) { + if (yyaccept <= 76) { + goto yy806; + } else { + goto yy810; + } + } else { + goto yy819; + } + } + } else { + if (yyaccept <= 82) { + if (yyaccept <= 80) { + if (yyaccept <= 79) { + goto yy821; + } else { + goto yy825; + } + } else { + if (yyaccept <= 81) { + goto yy829; + } else { + goto yy838; + } + } + } else { + if (yyaccept <= 84) { + if (yyaccept <= 83) { + goto yy843; + } else { + goto yy848; + } + } else { + goto yy851; + } + } + } + } + } else { + if (yyaccept <= 99) { + if (yyaccept <= 92) { + if (yyaccept <= 89) { + if (yyaccept <= 87) { + if (yyaccept <= 86) { + goto yy854; + } else { + goto yy857; + } + } else { + if (yyaccept <= 88) { + goto yy869; + } else { + goto yy874; + } + } + } else { + if (yyaccept <= 91) { + if (yyaccept <= 90) { + goto yy881; + } else { + goto yy886; + } + } else { + goto yy892; + } + } + } else { + if (yyaccept <= 96) { + if (yyaccept <= 94) { + if (yyaccept <= 93) { + goto yy901; + } else { + goto yy908; + } + } else { + if (yyaccept <= 95) { + goto yy910; + } else { + goto yy916; + } + } + } else { + if (yyaccept <= 98) { + if (yyaccept <= 97) { + goto yy921; + } else { + goto yy925; + } + } else { + goto yy928; + } + } + } + } else { + if (yyaccept <= 106) { + if (yyaccept <= 103) { + if (yyaccept <= 101) { + if (yyaccept <= 100) { + goto yy934; + } else { + goto yy938; + } + } else { + if (yyaccept <= 102) { + goto yy943; + } else { + goto yy945; + } + } + } else { + if (yyaccept <= 105) { + if (yyaccept <= 104) { + goto yy952; + } else { + goto yy955; + } + } else { + goto yy960; + } + } + } else { + if (yyaccept <= 110) { + if (yyaccept <= 108) { + if (yyaccept <= 107) { + goto yy963; + } else { + goto yy970; + } + } else { + if (yyaccept <= 109) { + goto yy972; + } else { + goto yy974; + } + } + } else { + if (yyaccept <= 112) { + if (yyaccept <= 111) { + goto yy978; + } else { + goto yy985; + } + } else { + goto yy987; + } + } + } + } + } + } +yy100: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy101; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy101: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy102; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy102: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy103; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy103: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy104; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy104: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy105; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy105: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy106; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy106: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy107; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy107: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy108; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy108: + yyaccept = 1; + YYMARKER = ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy109: + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych != '\\') goto yy9; +yy110: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych == 'U') goto yy114; + if (yych == 'u') goto yy113; + goto yy99; +yy111: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych != '?') goto yy99; + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych == '/') goto yy110; + goto yy99; +yy113: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy122; + goto yy99; + } else { + if (yych <= 'F') goto yy122; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy122; + goto yy99; + } +yy114: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy115; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy115: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy116; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy116: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy117; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy117: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy118; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy118: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy119; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy119: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy120; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy120: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy121; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy121: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy108; + goto yy99; + } else { + if (yych <= 'F') goto yy108; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy108; + goto yy99; + } +yy122: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy123; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy123: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy124; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy124: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy108; + goto yy99; + } else { + if (yych <= 'F') goto yy108; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy108; + goto yy99; + } +yy125: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy126; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy126: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy127; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy127: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy108; + goto yy99; + } else { + if (yych <= 'F') goto yy108; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy108; + goto yy99; + } +yy128: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '"') goto yy133; + goto yy109; +yy129: + ++YYCURSOR; +#line 274 "cpp.re" + { + if (s->act_in_cpp0x_mode) + goto extstringlit; + --YYCURSOR; + BOOST_WAVE_RET(T_IDENTIFIER); + } +#line 1591 "cpp_re.inc" +yy131: + ++YYCURSOR; +#line 266 "cpp.re" + { + if (s->act_in_cpp0x_mode) + goto extcharlit; + --YYCURSOR; + BOOST_WAVE_RET(T_IDENTIFIER); + } +#line 1601 "cpp_re.inc" +yy133: + ++YYCURSOR; +#line 282 "cpp.re" + { + if (s->act_in_cpp0x_mode) + goto extrawstringlit; + --YYCURSOR; + BOOST_WAVE_RET(T_IDENTIFIER); + } +#line 1611 "cpp_re.inc" +yy135: + ++YYCURSOR; +#line 258 "cpp.re" + { + if (s->act_in_cpp0x_mode) + goto extrawstringlit; + --YYCURSOR; + BOOST_WAVE_RET(T_IDENTIFIER); + } +#line 1621 "cpp_re.inc" +yy137: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy138: + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych >= '\\') goto yy140; +yy139: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych <= '[') goto yy152; +yy140: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy137; + goto yy99; + } else { + if (yych <= '\'') goto yy137; + if (yych <= '/') goto yy99; + goto yy147; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy145; + goto yy99; + } else { + if (yych <= 'U') goto yy144; + if (yych == '\\') goto yy137; + goto yy99; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy137; + if (yych <= 'e') goto yy99; + goto yy137; + } else { + if (yych == 'n') goto yy137; + if (yych <= 'q') goto yy99; + goto yy137; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy99; + if (yych <= 't') goto yy137; + goto yy143; + } else { + if (yych <= 'v') goto yy137; + if (yych == 'x') goto yy146; + goto yy99; + } + } + } +yy141: + ++YYCURSOR; +yy142: +#line 255 "cpp.re" + { BOOST_WAVE_RET(T_STRINGLIT); } +#line 1695 "cpp_re.inc" +yy143: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy178; + goto yy99; + } else { + if (yych <= 'F') goto yy178; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy178; + goto yy99; + } +yy144: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy171; + goto yy99; + } else { + if (yych <= 'F') goto yy171; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy171; + goto yy99; + } +yy145: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych <= '[') goto yy151; + goto yy140; +yy146: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 128) { + goto yy149; + } + goto yy99; +yy147: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '"') { + if (yych <= '\n') { + if (yych == '\t') goto yy137; + goto yy99; + } else { + if (yych <= '\f') goto yy137; + if (yych <= 0x1F) goto yy99; + if (yych <= '!') goto yy137; + goto yy141; + } + } else { + if (yych <= '>') { + if (yych <= '/') goto yy137; + if (yych >= '8') goto yy137; + } else { + if (yych <= '?') goto yy139; + if (yych == '\\') goto yy140; + goto yy137; + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych <= '[') goto yy139; + goto yy140; +yy149: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 128) { + goto yy149; + } + if (yych <= '!') { + if (yych <= '\n') { + if (yych == '\t') goto yy137; + goto yy99; + } else { + if (yych <= '\f') goto yy137; + if (yych <= 0x1F) goto yy99; + goto yy137; + } + } else { + if (yych <= '?') { + if (yych <= '"') goto yy141; + if (yych <= '>') goto yy137; + goto yy139; + } else { + if (yych == '\\') goto yy140; + goto yy137; + } + } +yy151: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych >= '\\') goto yy140; +yy152: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 1) { + goto yy152; + } + if (yych <= '!') { + if (yych <= '\n') { + if (yych == '\t') goto yy137; + goto yy99; + } else { + if (yych <= '\f') goto yy137; + if (yych <= 0x1F) goto yy99; + goto yy137; + } + } else { + if (yych <= '/') { + if (yych <= '"') goto yy141; + if (yych <= '.') goto yy137; + } else { + if (yych == '\\') goto yy140; + goto yy137; + } + } +yy154: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 2) { + goto yy154; + } + if (yych <= '7') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy158; + if (yych <= '/') goto yy137; + goto yy147; + } + } + } else { + if (yych <= 'U') { + if (yych == '?') goto yy159; + if (yych <= 'T') goto yy137; + goto yy157; + } else { + if (yych <= 'u') { + if (yych <= 't') goto yy137; + } else { + if (yych == 'x') goto yy149; + goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + goto yy168; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + goto yy168; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych <= 'f') goto yy168; + goto yy137; + } + } + } +yy157: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + goto yy161; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + goto yy161; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych <= 'f') goto yy161; + goto yy137; + } + } + } +yy158: + yyaccept = 6; + YYMARKER = ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy142; + if (yych <= '"') goto yy141; + if (yych <= '[') goto yy139; + goto yy140; +yy159: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych >= '\\') goto yy140; + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 1) { + goto yy152; + } + if (yych <= '!') { + if (yych <= '\n') { + if (yych == '\t') goto yy137; + goto yy99; + } else { + if (yych <= '\f') goto yy137; + if (yych <= 0x1F) goto yy99; + goto yy137; + } + } else { + if (yych <= '/') { + if (yych <= '"') goto yy141; + if (yych <= '.') goto yy137; + goto yy154; + } else { + if (yych == '\\') goto yy140; + goto yy137; + } + } +yy161: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych <= '[') goto yy139; + goto yy140; +yy168: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy137; + if (yych <= '\n') goto yy99; + goto yy137; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy99; + goto yy137; + } else { + if (yych <= '"') goto yy141; + if (yych <= '/') goto yy137; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy139; + if (yych <= '@') goto yy137; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy137; + goto yy140; + } else { + if (yych <= '`') goto yy137; + if (yych >= 'g') goto yy137; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[256+yych] & 64) { + goto yy137; + } + if (yych <= '!') goto yy99; + if (yych <= '"') goto yy141; + if (yych <= '[') goto yy139; + goto yy140; +yy171: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy172; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy172: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy173; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy173: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy174; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy174: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy175; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy175: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy176; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy176: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy177; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy177: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy137; + goto yy99; + } else { + if (yych <= 'F') goto yy137; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy137; + goto yy99; + } +yy178: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy179; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy179: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy180; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy180: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy137; + goto yy99; + } else { + if (yych <= 'F') goto yy137; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy137; + goto yy99; + } +yy181: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy182: + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych >= '\\') goto yy184; +yy183: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych <= '[') goto yy196; +yy184: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy181; + goto yy99; + } else { + if (yych <= '\'') goto yy181; + if (yych <= '/') goto yy99; + goto yy189; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy187; + goto yy99; + } else { + if (yych <= 'U') goto yy186; + if (yych == '\\') goto yy181; + goto yy99; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy181; + if (yych <= 'e') goto yy99; + goto yy181; + } else { + if (yych == 'n') goto yy181; + if (yych <= 'q') goto yy99; + goto yy181; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy99; + if (yych <= 't') goto yy181; + } else { + if (yych <= 'v') goto yy181; + if (yych == 'x') goto yy188; + goto yy99; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy222; + goto yy99; + } else { + if (yych <= 'F') goto yy222; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy222; + goto yy99; + } +yy186: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy215; + goto yy99; + } else { + if (yych <= 'F') goto yy215; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy215; + goto yy99; + } +yy187: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych <= '[') goto yy195; + goto yy184; +yy188: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy193; + goto yy99; + } else { + if (yych <= 'F') goto yy193; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy193; + goto yy99; + } +yy189: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '\'') { + if (yych <= '\n') { + if (yych == '\t') goto yy181; + goto yy99; + } else { + if (yych <= '\f') goto yy181; + if (yych <= 0x1F) goto yy99; + if (yych <= '&') goto yy181; + goto yy191; + } + } else { + if (yych <= '>') { + if (yych <= '/') goto yy181; + if (yych >= '8') goto yy181; + } else { + if (yych <= '?') goto yy183; + if (yych == '\\') goto yy184; + goto yy181; + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych <= '[') goto yy183; + goto yy184; +yy191: + ++YYCURSOR; +yy192: +#line 252 "cpp.re" + { BOOST_WAVE_RET(T_CHARLIT); } +#line 2542 "cpp_re.inc" +yy193: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + goto yy193; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + goto yy193; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych <= 'f') goto yy193; + goto yy181; + } + } + } +yy195: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych >= '\\') goto yy184; +yy196: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '\'') { + if (yych <= '\n') { + if (yych == '\t') goto yy181; + goto yy99; + } else { + if (yych <= '\f') goto yy181; + if (yych <= 0x1F) goto yy99; + if (yych <= '&') goto yy181; + goto yy191; + } + } else { + if (yych <= '>') { + if (yych != '/') goto yy181; + } else { + if (yych <= '?') goto yy196; + if (yych == '\\') goto yy184; + goto yy181; + } + } +yy198: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '>') { + if (yych <= 0x1F) { + if (yych <= '\t') { + if (yych <= 0x08) goto yy99; + goto yy181; + } else { + if (yych <= '\n') goto yy99; + if (yych <= '\f') goto yy181; + goto yy99; + } + } else { + if (yych <= '\'') { + if (yych <= '&') goto yy181; + goto yy202; + } else { + if (yych <= '/') goto yy181; + if (yych <= '7') goto yy189; + goto yy181; + } + } + } else { + if (yych <= '\\') { + if (yych <= 'T') { + if (yych <= '?') goto yy203; + goto yy181; + } else { + if (yych <= 'U') goto yy201; + if (yych <= '[') goto yy181; + goto yy198; + } + } else { + if (yych <= 'u') { + if (yych <= 't') goto yy181; + } else { + if (yych == 'x') goto yy193; + goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + goto yy212; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + goto yy212; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych <= 'f') goto yy212; + goto yy181; + } + } + } +yy201: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + goto yy205; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + goto yy205; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych <= 'f') goto yy205; + goto yy181; + } + } + } +yy202: + yyaccept = 7; + YYMARKER = ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy192; + if (yych <= '\'') goto yy191; + if (yych <= '[') goto yy183; + goto yy184; +yy203: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych >= '\\') goto yy184; + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '\'') { + if (yych <= '\n') { + if (yych == '\t') goto yy181; + goto yy99; + } else { + if (yych <= '\f') goto yy181; + if (yych <= 0x1F) goto yy99; + if (yych <= '&') goto yy181; + goto yy191; + } + } else { + if (yych <= '>') { + if (yych == '/') goto yy198; + goto yy181; + } else { + if (yych <= '?') goto yy196; + if (yych == '\\') goto yy184; + goto yy181; + } + } +yy205: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych <= '[') goto yy183; + goto yy184; +yy212: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy181; + if (yych <= '\n') goto yy99; + goto yy181; + } else { + if (yych <= '&') { + if (yych <= 0x1F) goto yy99; + goto yy181; + } else { + if (yych <= '\'') goto yy191; + if (yych <= '/') goto yy181; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy183; + if (yych <= '@') goto yy181; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy181; + goto yy184; + } else { + if (yych <= '`') goto yy181; + if (yych >= 'g') goto yy181; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 4) { + goto yy181; + } + if (yych <= '&') goto yy99; + if (yych <= '\'') goto yy191; + if (yych <= '[') goto yy183; + goto yy184; +yy215: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy216; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy216: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy217; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy217: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy218; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy218: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy219; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy219: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy220; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy220: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy221; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy221: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy181; + goto yy99; + } else { + if (yych <= 'F') goto yy181; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy181; + goto yy99; + } +yy222: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy223; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy223: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych >= ':') goto yy99; + } else { + if (yych <= 'F') goto yy224; + if (yych <= '`') goto yy99; + if (yych >= 'g') goto yy99; + } +yy224: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy99; + if (yych <= '9') goto yy181; + goto yy99; + } else { + if (yych <= 'F') goto yy181; + if (yych <= '`') goto yy99; + if (yych <= 'f') goto yy181; + goto yy99; + } +yy225: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '"') goto yy135; + goto yy109; +yy226: + yych = *++YYCURSOR; + if (yych == '\'') goto yy99; + goto yy182; +yy227: + ++YYCURSOR; +#line 227 "cpp.re" + { BOOST_WAVE_RET(T_GREATEREQUAL); } +#line 3175 "cpp_re.inc" +yy229: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy231; +#line 220 "cpp.re" + { BOOST_WAVE_RET(T_SHIFTRIGHT); } +#line 3181 "cpp_re.inc" +yy231: + ++YYCURSOR; +#line 221 "cpp.re" + { BOOST_WAVE_RET(T_SHIFTRIGHTASSIGN); } +#line 3186 "cpp_re.inc" +yy233: + ++YYCURSOR; +#line 223 "cpp.re" + { BOOST_WAVE_RET(T_EQUAL); } +#line 3191 "cpp_re.inc" +yy235: + ++YYCURSOR; +#line 224 "cpp.re" + { BOOST_WAVE_RET(T_NOTEQUAL); } +#line 3196 "cpp_re.inc" +yy237: + yych = *++YYCURSOR; + if (yych == '?') goto yy242; + goto yy99; +yy238: + ++YYCURSOR; +#line 230 "cpp.re" + { BOOST_WAVE_RET(T_OROR); } +#line 3205 "cpp_re.inc" +yy240: + ++YYCURSOR; +#line 216 "cpp.re" + { BOOST_WAVE_RET(T_ORASSIGN); } +#line 3210 "cpp_re.inc" +yy242: + yych = *++YYCURSOR; + if (yych != '!') goto yy99; + ++YYCURSOR; +#line 232 "cpp.re" + { BOOST_WAVE_RET(T_OROR_TRIGRAPH); } +#line 3217 "cpp_re.inc" +yy245: + ++YYCURSOR; +#line 228 "cpp.re" + { BOOST_WAVE_RET(T_ANDAND); } +#line 3222 "cpp_re.inc" +yy247: + ++YYCURSOR; +#line 214 "cpp.re" + { BOOST_WAVE_RET(T_ANDASSIGN); } +#line 3227 "cpp_re.inc" +yy249: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 8; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '@') { + if (yych <= '/') { + if (yych == '$') goto yy108; + } else { + if (yych <= '9') goto yy108; + if (yych == '?') goto yy111; + } + } else { + if (yych <= '^') { + if (yych <= 'Z') goto yy108; + if (yych == '\\') goto yy110; + } else { + if (yych <= '_') goto yy252; + if (yych <= '`') goto yy251; + if (yych <= 'z') goto yy108; + } + } +yy251: +#line 192 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XOR_ALT); } +#line 3254 "cpp_re.inc" +yy252: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'q') goto yy109; + yyaccept = 9; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy255: +#line 212 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XORASSIGN_ALT); } +#line 3272 "cpp_re.inc" +yy256: + ++YYCURSOR; +#line 211 "cpp.re" + { BOOST_WAVE_RET(T_XORASSIGN); } +#line 3277 "cpp_re.inc" +yy258: + ++YYCURSOR; +#line 208 "cpp.re" + { BOOST_WAVE_RET(T_STARASSIGN); } +#line 3282 "cpp_re.inc" +yy260: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '*') goto yy266; +#line 248 "cpp.re" + { BOOST_WAVE_RET(T_ARROW); } +#line 3288 "cpp_re.inc" +yy262: + ++YYCURSOR; +#line 236 "cpp.re" + { BOOST_WAVE_RET(T_MINUSMINUS); } +#line 3293 "cpp_re.inc" +yy264: + ++YYCURSOR; +#line 207 "cpp.re" + { BOOST_WAVE_RET(T_MINUSASSIGN); } +#line 3298 "cpp_re.inc" +yy266: + ++YYCURSOR; +#line 239 "cpp.re" + { + if (s->act_in_c99_mode) { + --YYCURSOR; + BOOST_WAVE_RET(T_ARROW); + } + else { + BOOST_WAVE_RET(T_ARROWSTAR); + } + } +#line 3311 "cpp_re.inc" +yy268: + ++YYCURSOR; +#line 235 "cpp.re" + { BOOST_WAVE_RET(T_PLUSPLUS); } +#line 3316 "cpp_re.inc" +yy270: + ++YYCURSOR; +#line 206 "cpp.re" + { BOOST_WAVE_RET(T_PLUSASSIGN); } +#line 3321 "cpp_re.inc" +yy272: + ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 12) YYFILL(12); + yych = *YYCURSOR; +yy273: + if (yych <= 'h') { + if (yych <= ' ') { + if (yych <= '\n') { + if (yych == '\t') goto yy272; + goto yy99; + } else { + if (yych <= '\f') goto yy272; + if (yych <= 0x1F) goto yy99; + goto yy272; + } + } else { + if (yych <= 'c') { + if (yych != '/') goto yy99; + } else { + if (yych <= 'd') goto yy281; + if (yych <= 'e') goto yy275; + goto yy99; + } + } + } else { + if (yych <= 'q') { + if (yych <= 'l') { + if (yych <= 'i') goto yy282; + if (yych <= 'k') goto yy99; + goto yy279; + } else { + if (yych == 'p') goto yy278; + goto yy99; + } + } else { + if (yych <= 'u') { + if (yych <= 'r') goto yy276; + if (yych <= 't') goto yy99; + goto yy280; + } else { + if (yych == 'w') goto yy277; + goto yy99; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych == '*') goto yy389; + goto yy99; +yy275: + yych = *++YYCURSOR; + if (yych <= 'm') { + if (yych == 'l') goto yy365; + goto yy99; + } else { + if (yych <= 'n') goto yy366; + if (yych == 'r') goto yy367; + goto yy99; + } +yy276: + yych = *++YYCURSOR; + if (yych == 'e') goto yy359; + goto yy99; +yy277: + yych = *++YYCURSOR; + if (yych == 'a') goto yy352; + goto yy99; +yy278: + yych = *++YYCURSOR; + if (yych == 'r') goto yy346; + goto yy99; +yy279: + yych = *++YYCURSOR; + if (yych == 'i') goto yy342; + goto yy99; +yy280: + yych = *++YYCURSOR; + if (yych == 'n') goto yy337; + goto yy99; +yy281: + yych = *++YYCURSOR; + if (yych == 'e') goto yy331; + goto yy99; +yy282: + yych = *++YYCURSOR; + if (yych == 'f') goto yy290; + if (yych == 'n') goto yy289; + goto yy99; +yy283: + yych = *++YYCURSOR; + if (yych == '?') goto yy286; + goto yy99; +yy284: + ++YYCURSOR; +#line 153 "cpp.re" + { BOOST_WAVE_RET(T_POUND_POUND); } +#line 3419 "cpp_re.inc" +yy286: + yych = *++YYCURSOR; + if (yych != '=') goto yy99; + ++YYCURSOR; +#line 154 "cpp.re" + { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); } +#line 3426 "cpp_re.inc" +yy289: + yych = *++YYCURSOR; + if (yych == 'c') goto yy301; + goto yy99; +yy290: + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'd') goto yy293; + if (yych == 'n') goto yy292; +yy291: +#line 301 "cpp.re" + { BOOST_WAVE_RET(T_PP_IF); } +#line 3439 "cpp_re.inc" +yy292: + yych = *++YYCURSOR; + if (yych == 'd') goto yy297; + goto yy99; +yy293: + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + yych = *++YYCURSOR; + if (yych != 'f') goto yy99; + ++YYCURSOR; +#line 302 "cpp.re" + { BOOST_WAVE_RET(T_PP_IFDEF); } +#line 3452 "cpp_re.inc" +yy297: + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + yych = *++YYCURSOR; + if (yych != 'f') goto yy99; + ++YYCURSOR; +#line 303 "cpp.re" + { BOOST_WAVE_RET(T_PP_IFNDEF); } +#line 3461 "cpp_re.inc" +yy301: + yych = *++YYCURSOR; + if (yych != 'l') goto yy99; + yych = *++YYCURSOR; + if (yych != 'u') goto yy99; + yych = *++YYCURSOR; + if (yych != 'd') goto yy99; + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '_') goto yy307; + goto yy309; +yy306: +#line 299 "cpp.re" + { BOOST_WAVE_RET(T_PP_INCLUDE); } +#line 3478 "cpp_re.inc" +yy307: + yych = *++YYCURSOR; + if (yych == 'n') goto yy328; + goto yy99; +yy308: + yyaccept = 11; + YYMARKER = ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; +yy309: + if (yych <= ' ') { + if (yych <= '\n') { + if (yych == '\t') goto yy308; + goto yy306; + } else { + if (yych <= '\f') goto yy308; + if (yych <= 0x1F) goto yy306; + goto yy308; + } + } else { + if (yych <= '.') { + if (yych == '"') goto yy312; + goto yy306; + } else { + if (yych <= '/') goto yy310; + if (yych == '<') goto yy311; + goto yy306; + } + } +yy310: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych == '*') goto yy321; + goto yy99; +yy311: + yych = *++YYCURSOR; + if (yych == '>') goto yy99; + goto yy318; +yy312: + yych = *++YYCURSOR; + if (yych == '"') goto yy99; + goto yy314; +yy313: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy314: + if (yybm[0+yych] & 8) { + goto yy313; + } + if (yych <= '!') goto yy99; + ++YYCURSOR; +#line 296 "cpp.re" + { BOOST_WAVE_RET(T_PP_QHEADER); } +#line 3534 "cpp_re.inc" +yy317: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy318: + if (yybm[0+yych] & 16) { + goto yy317; + } + if (yych <= '=') goto yy99; + ++YYCURSOR; +#line 293 "cpp.re" + { BOOST_WAVE_RET(T_PP_HHEADER); } +#line 3547 "cpp_re.inc" +yy321: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy321; + } + if (yych == '\r') goto yy323; + if (yych <= ')') goto yy99; + goto yy325; +yy323: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy321; + } + if (yych == '\r') goto yy323; + if (yych <= ')') goto yy99; +yy325: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy325; + } + if (yych <= '\r') { + if (yych <= 0x08) goto yy99; + if (yych <= '\f') goto yy321; + } else { + if (yych <= 0x1F) goto yy99; + if (yych == '/') goto yy308; + goto yy321; + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy321; + } + if (yych == '\r') goto yy323; + if (yych <= ')') goto yy99; + goto yy325; +yy328: + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + yych = *++YYCURSOR; + if (yych != 'x') goto yy99; + yych = *++YYCURSOR; + if (yych == 't') goto yy308; + goto yy99; +yy331: + yych = *++YYCURSOR; + if (yych != 'f') goto yy99; + yych = *++YYCURSOR; + if (yych != 'i') goto yy99; + yych = *++YYCURSOR; + if (yych != 'n') goto yy99; + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + ++YYCURSOR; +#line 307 "cpp.re" + { BOOST_WAVE_RET(T_PP_DEFINE); } +#line 3611 "cpp_re.inc" +yy337: + yych = *++YYCURSOR; + if (yych != 'd') goto yy99; + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + yych = *++YYCURSOR; + if (yych != 'f') goto yy99; + ++YYCURSOR; +#line 308 "cpp.re" + { BOOST_WAVE_RET(T_PP_UNDEF); } +#line 3622 "cpp_re.inc" +yy342: + yych = *++YYCURSOR; + if (yych != 'n') goto yy99; + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + ++YYCURSOR; +#line 309 "cpp.re" + { BOOST_WAVE_RET(T_PP_LINE); } +#line 3631 "cpp_re.inc" +yy346: + yych = *++YYCURSOR; + if (yych != 'a') goto yy99; + yych = *++YYCURSOR; + if (yych != 'g') goto yy99; + yych = *++YYCURSOR; + if (yych != 'm') goto yy99; + yych = *++YYCURSOR; + if (yych != 'a') goto yy99; + ++YYCURSOR; +#line 311 "cpp.re" + { BOOST_WAVE_RET(T_PP_PRAGMA); } +#line 3644 "cpp_re.inc" +yy352: + yych = *++YYCURSOR; + if (yych != 'r') goto yy99; + yych = *++YYCURSOR; + if (yych != 'n') goto yy99; + yych = *++YYCURSOR; + if (yych != 'i') goto yy99; + yych = *++YYCURSOR; + if (yych != 'n') goto yy99; + yych = *++YYCURSOR; + if (yych != 'g') goto yy99; + ++YYCURSOR; +#line 313 "cpp.re" + { BOOST_WAVE_RET(T_PP_WARNING); } +#line 3659 "cpp_re.inc" +yy359: + yych = *++YYCURSOR; + if (yych != 'g') goto yy99; + yych = *++YYCURSOR; + if (yych != 'i') goto yy99; + yych = *++YYCURSOR; + if (yych != 'o') goto yy99; + yych = *++YYCURSOR; + if (yych != 'n') goto yy99; + ++YYCURSOR; +#line 315 "cpp.re" + { BOOST_WAVE_RET(T_MSEXT_PP_REGION); } +#line 3672 "cpp_re.inc" +yy365: + yych = *++YYCURSOR; + if (yych == 'i') goto yy383; + if (yych == 's') goto yy384; + goto yy99; +yy366: + yych = *++YYCURSOR; + if (yych == 'd') goto yy372; + goto yy99; +yy367: + yych = *++YYCURSOR; + if (yych != 'r') goto yy99; + yych = *++YYCURSOR; + if (yych != 'o') goto yy99; + yych = *++YYCURSOR; + if (yych != 'r') goto yy99; + ++YYCURSOR; +#line 310 "cpp.re" + { BOOST_WAVE_RET(T_PP_ERROR); } +#line 3692 "cpp_re.inc" +yy372: + yych = *++YYCURSOR; + if (yych == 'i') goto yy373; + if (yych == 'r') goto yy374; + goto yy99; +yy373: + yych = *++YYCURSOR; + if (yych == 'f') goto yy381; + goto yy99; +yy374: + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + yych = *++YYCURSOR; + if (yych != 'g') goto yy99; + yych = *++YYCURSOR; + if (yych != 'i') goto yy99; + yych = *++YYCURSOR; + if (yych != 'o') goto yy99; + yych = *++YYCURSOR; + if (yych != 'n') goto yy99; + ++YYCURSOR; +#line 316 "cpp.re" + { BOOST_WAVE_RET(T_MSEXT_PP_ENDREGION); } +#line 3716 "cpp_re.inc" +yy381: + ++YYCURSOR; +#line 306 "cpp.re" + { BOOST_WAVE_RET(T_PP_ENDIF); } +#line 3721 "cpp_re.inc" +yy383: + yych = *++YYCURSOR; + if (yych == 'f') goto yy387; + goto yy99; +yy384: + yych = *++YYCURSOR; + if (yych != 'e') goto yy99; + ++YYCURSOR; +#line 304 "cpp.re" + { BOOST_WAVE_RET(T_PP_ELSE); } +#line 3732 "cpp_re.inc" +yy387: + ++YYCURSOR; +#line 305 "cpp.re" + { BOOST_WAVE_RET(T_PP_ELIF); } +#line 3737 "cpp_re.inc" +yy389: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '\r') { + if (yych <= 0x08) goto yy99; + if (yych <= '\f') goto yy389; + } else { + if (yych <= 0x1F) goto yy99; + if (yych == '*') goto yy393; + goto yy389; + } +yy391: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '\r') { + if (yych <= 0x08) goto yy99; + if (yych <= '\f') goto yy389; + goto yy391; + } else { + if (yych <= 0x1F) goto yy99; + if (yych != '*') goto yy389; + } +yy393: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= 0x1F) { + if (yych <= 0x08) goto yy99; + if (yych <= '\f') goto yy389; + if (yych >= 0x0E) goto yy99; + } else { + if (yych <= '*') { + if (yych <= ')') goto yy389; + goto yy393; + } else { + if (yych == '/') goto yy272; + goto yy389; + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '\r') { + if (yych <= 0x08) goto yy99; + if (yych <= '\f') goto yy389; + goto yy391; + } else { + if (yych <= 0x1F) goto yy99; + if (yych == '*') goto yy393; + goto yy389; + } +yy396: + ++YYCURSOR; +#line 165 "cpp.re" + { + if (s->act_in_c99_mode) { + --YYCURSOR; + BOOST_WAVE_RET(T_COLON); + } + else { + BOOST_WAVE_RET(T_COLON_COLON); + } + } +#line 3803 "cpp_re.inc" +yy398: + ++YYCURSOR; +#line 149 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTBRACKET_ALT); } +#line 3808 "cpp_re.inc" +yy400: + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'e') { + if (yych <= ' ') { + if (yych <= '\n') { + if (yych == '\t') goto yy273; + } else { + if (yych <= '\f') goto yy273; + if (yych >= ' ') goto yy273; + } + } else { + if (yych <= '.') { + if (yych == '%') goto yy406; + } else { + if (yych <= '/') goto yy273; + if (yych >= 'd') goto yy273; + } + } + } else { + if (yych <= 'p') { + if (yych <= 'k') { + if (yych == 'i') goto yy273; + } else { + if (yych <= 'l') goto yy273; + if (yych >= 'p') goto yy273; + } + } else { + if (yych <= 't') { + if (yych == 'r') goto yy273; + } else { + if (yych == 'v') goto yy401; + if (yych <= 'w') goto yy273; + } + } + } +yy401: +#line 151 "cpp.re" + { BOOST_WAVE_RET(T_POUND_ALT); } +#line 3848 "cpp_re.inc" +yy402: + ++YYCURSOR; +#line 210 "cpp.re" + { BOOST_WAVE_RET(T_PERCENTASSIGN); } +#line 3853 "cpp_re.inc" +yy404: + ++YYCURSOR; +#line 143 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTBRACE_ALT); } +#line 3858 "cpp_re.inc" +yy406: + yych = *++YYCURSOR; + if (yych != ':') goto yy99; + ++YYCURSOR; +#line 157 "cpp.re" + { BOOST_WAVE_RET(T_POUND_POUND_ALT); } +#line 3865 "cpp_re.inc" +yy409: + ++YYCURSOR; +#line 226 "cpp.re" + { BOOST_WAVE_RET(T_LESSEQUAL); } +#line 3870 "cpp_re.inc" +yy411: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy417; +#line 219 "cpp.re" + { BOOST_WAVE_RET(T_SHIFTLEFT); } +#line 3876 "cpp_re.inc" +yy413: + ++YYCURSOR; +#line 146 "cpp.re" + { BOOST_WAVE_RET(T_LEFTBRACKET_ALT); } +#line 3881 "cpp_re.inc" +yy415: + ++YYCURSOR; +#line 140 "cpp.re" + { BOOST_WAVE_RET(T_LEFTBRACE_ALT); } +#line 3886 "cpp_re.inc" +yy417: + ++YYCURSOR; +#line 222 "cpp.re" + { BOOST_WAVE_RET(T_SHIFTLEFTASSIGN); } +#line 3891 "cpp_re.inc" +yy419: + yych = *++YYCURSOR; + switch (yych) { + case '!': goto yy432; + case '\'': goto yy430; + case '(': goto yy424; + case ')': goto yy426; + case '-': goto yy434; + case '/': goto yy436; + case '<': goto yy420; + case '=': goto yy428; + case '>': goto yy422; + default: goto yy99; + } +yy420: + ++YYCURSOR; +#line 139 "cpp.re" + { BOOST_WAVE_RET(T_LEFTBRACE_TRIGRAPH); } +#line 3910 "cpp_re.inc" +yy422: + ++YYCURSOR; +#line 142 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTBRACE_TRIGRAPH); } +#line 3915 "cpp_re.inc" +yy424: + ++YYCURSOR; +#line 145 "cpp.re" + { BOOST_WAVE_RET(T_LEFTBRACKET_TRIGRAPH); } +#line 3920 "cpp_re.inc" +yy426: + ++YYCURSOR; +#line 148 "cpp.re" + { BOOST_WAVE_RET(T_RIGHTBRACKET_TRIGRAPH); } +#line 3925 "cpp_re.inc" +yy428: + yyaccept = 13; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'c') { + if (yych <= ' ') { + if (yych <= '\n') { + if (yych == '\t') goto yy273; + } else { + if (yych <= '\f') goto yy273; + if (yych >= ' ') goto yy273; + } + } else { + if (yych <= '.') { + if (yych == '#') goto yy449; + } else { + if (yych <= '/') goto yy273; + if (yych == '?') goto yy448; + } + } + } else { + if (yych <= 'p') { + if (yych <= 'i') { + if (yych <= 'e') goto yy273; + if (yych >= 'i') goto yy273; + } else { + if (yych == 'l') goto yy273; + if (yych >= 'p') goto yy273; + } + } else { + if (yych <= 't') { + if (yych == 'r') goto yy273; + } else { + if (yych == 'v') goto yy429; + if (yych <= 'w') goto yy273; + } + } + } +yy429: +#line 152 "cpp.re" + { BOOST_WAVE_RET(T_POUND_TRIGRAPH); } +#line 3966 "cpp_re.inc" +yy430: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '=') goto yy446; +#line 191 "cpp.re" + { BOOST_WAVE_RET(T_XOR_TRIGRAPH); } +#line 3972 "cpp_re.inc" +yy432: + yyaccept = 14; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '>') { + if (yych == '=') goto yy441; + } else { + if (yych <= '?') goto yy438; + if (yych == '|') goto yy439; + } +yy433: +#line 197 "cpp.re" + { BOOST_WAVE_RET(T_OR_TRIGRAPH); } +#line 3985 "cpp_re.inc" +yy434: + ++YYCURSOR; +#line 199 "cpp.re" + { BOOST_WAVE_RET(T_COMPL_TRIGRAPH); } +#line 3990 "cpp_re.inc" +yy436: + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy100; + if (yych == 'u') goto yy98; +yy437: +#line 249 "cpp.re" + { BOOST_WAVE_RET(T_ANY_TRIGRAPH); } +#line 3999 "cpp_re.inc" +yy438: + yych = *++YYCURSOR; + if (yych == '?') goto yy443; + goto yy99; +yy439: + ++YYCURSOR; +#line 231 "cpp.re" + { BOOST_WAVE_RET(T_OROR_TRIGRAPH); } +#line 4008 "cpp_re.inc" +yy441: + ++YYCURSOR; +#line 218 "cpp.re" + { BOOST_WAVE_RET(T_ORASSIGN_TRIGRAPH); } +#line 4013 "cpp_re.inc" +yy443: + yych = *++YYCURSOR; + if (yych != '!') goto yy99; + ++YYCURSOR; +#line 234 "cpp.re" + { BOOST_WAVE_RET(T_OROR_TRIGRAPH); } +#line 4020 "cpp_re.inc" +yy446: + ++YYCURSOR; +#line 213 "cpp.re" + { BOOST_WAVE_RET(T_XORASSIGN_TRIGRAPH); } +#line 4025 "cpp_re.inc" +yy448: + yych = *++YYCURSOR; + if (yych == '?') goto yy451; + goto yy99; +yy449: + ++YYCURSOR; +#line 155 "cpp.re" + { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); } +#line 4034 "cpp_re.inc" +yy451: + yych = *++YYCURSOR; + if (yych != '=') goto yy99; + ++YYCURSOR; +#line 156 "cpp.re" + { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); } +#line 4041 "cpp_re.inc" +yy454: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case 'a': goto yy455; + case 'b': goto yy456; + case 'c': goto yy457; + case 'd': goto yy458; + case 'e': goto yy507; + case 'f': goto yy505; + case 'i': goto yy504; + case 'l': goto yy508; + case 's': goto yy461; + case 't': goto yy506; + default: goto yy109; + } +yy455: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 's') goto yy501; + goto yy109; +yy456: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy496; + goto yy109; +yy457: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'd') goto yy491; + goto yy109; +yy458: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy483; + goto yy109; +yy459: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy475; + goto yy109; +yy460: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'n') goto yy469; + goto yy109; +yy461: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 16; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy468: +#line 130 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); } +#line 4117 "cpp_re.inc" +yy469: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; +yy470: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy474: +#line 135 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); } +#line 4142 "cpp_re.inc" +yy475: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy482: +#line 129 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); } +#line 4172 "cpp_re.inc" +yy483: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 19; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy490: +#line 127 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); } +#line 4202 "cpp_re.inc" +yy491: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy495: +#line 128 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); } +#line 4223 "cpp_re.inc" +yy496: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy500: +#line 126 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); } +#line 4244 "cpp_re.inc" +yy501: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'm') goto yy109; + yyaccept = 22; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy503: +#line 136 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); } +#line 4259 "cpp_re.inc" +yy504: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'n') goto yy530; + goto yy109; +yy505: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy475; + if (yych == 'i') goto yy523; + goto yy109; +yy506: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'r') goto yy520; + goto yy109; +yy507: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'x') goto yy514; + goto yy109; +yy508: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'v') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 23; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy513: +#line 134 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); } +#line 4304 "cpp_re.inc" +yy514: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 24; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy519: +#line 132 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); } +#line 4328 "cpp_re.inc" +yy520: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'y') goto yy109; + yyaccept = 25; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy522: +#line 131 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); } +#line 4343 "cpp_re.inc" +yy523: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'y') goto yy109; + yyaccept = 26; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy529: +#line 133 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); } +#line 4370 "cpp_re.inc" +yy530: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'l') goto yy470; + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case '1': goto yy532; + case '3': goto yy533; + case '6': goto yy534; + case '8': goto yy535; + default: goto yy109; + } +yy532: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '6') goto yy541; + goto yy109; +yy533: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '2') goto yy539; + goto yy109; +yy534: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '4') goto yy537; + goto yy109; +yy535: + yyaccept = 27; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy536: +#line 122 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); } +#line 4411 "cpp_re.inc" +yy537: + yyaccept = 28; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy538: +#line 125 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); } +#line 4423 "cpp_re.inc" +yy539: + yyaccept = 29; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy540: +#line 124 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); } +#line 4435 "cpp_re.inc" +yy541: + yyaccept = 30; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy542: +#line 123 "cpp.re" + { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); } +#line 4447 "cpp_re.inc" +yy543: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'h') goto yy549; + goto yy109; +yy544: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 31; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy548: +#line 120 "cpp.re" + { BOOST_WAVE_RET(T_WHILE); } +#line 4473 "cpp_re.inc" +yy549: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '_') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 32; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy554: +#line 119 "cpp.re" + { BOOST_WAVE_RET(T_WCHART); } +#line 4497 "cpp_re.inc" +yy555: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'r') goto yy567; + goto yy109; +yy556: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy557; + if (yych == 'l') goto yy558; + goto yy109; +yy557: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'd') goto yy565; + goto yy109; +yy558: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 33; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy564: +#line 118 "cpp.re" + { BOOST_WAVE_RET(T_VOLATILE); } +#line 4540 "cpp_re.inc" +yy565: + yyaccept = 34; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy566: +#line 117 "cpp.re" + { BOOST_WAVE_RET(T_VOID); } +#line 4552 "cpp_re.inc" +yy567: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'u') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 35; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy572: +#line 116 "cpp.re" + { BOOST_WAVE_RET(T_VIRTUAL); } +#line 4576 "cpp_re.inc" +yy573: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '"') goto yy129; + if (yych == 'R') goto yy128; + goto yy109; +yy574: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy580; + if (yych == 's') goto yy581; + goto yy109; +yy575: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'g') goto yy109; + yyaccept = 36; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy579: +#line 115 "cpp.re" + { BOOST_WAVE_RET(T_USING); } +#line 4609 "cpp_re.inc" +yy580: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy588; + goto yy109; +yy581: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'g') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 37; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy587: +#line 114 "cpp.re" + { BOOST_WAVE_RET(T_UNSIGNED); } +#line 4641 "cpp_re.inc" +yy588: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 38; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy590: +#line 113 "cpp.re" + { BOOST_WAVE_RET(T_UNION); } +#line 4656 "cpp_re.inc" +yy591: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'm') goto yy631; + goto yy109; +yy592: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy614; + if (yych == 'r') goto yy615; + goto yy109; +yy593: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'u') goto yy609; + if (yych == 'y') goto yy610; + goto yy109; +yy594: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'h') { + if (yych != 'd') goto yy109; + } else { + if (yych <= 'i') goto yy598; + if (yych == 'n') goto yy599; + goto yy109; + } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy606; + goto yy109; +yy598: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'd') goto yy604; + goto yy109; +yy599: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'm') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 39; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy603: +#line 112 "cpp.re" + { BOOST_WAVE_RET(T_TYPENAME); } +#line 4719 "cpp_re.inc" +yy604: + yyaccept = 40; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy605: +#line 111 "cpp.re" + { BOOST_WAVE_RET(T_TYPEID); } +#line 4731 "cpp_re.inc" +yy606: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'f') goto yy109; + yyaccept = 41; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy608: +#line 110 "cpp.re" + { BOOST_WAVE_RET(T_TYPEDEF); } +#line 4746 "cpp_re.inc" +yy609: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy612; + goto yy109; +yy610: + yyaccept = 42; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy611: +#line 109 "cpp.re" + { BOOST_WAVE_RET(T_TRY); } +#line 4763 "cpp_re.inc" +yy612: + yyaccept = 43; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy613: +#line 108 "cpp.re" + { BOOST_WAVE_RET(T_TRUE); } +#line 4775 "cpp_re.inc" +yy614: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 's') goto yy629; + goto yy109; +yy615: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy616; + if (yych == 'o') goto yy617; + goto yy109; +yy616: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy620; + goto yy109; +yy617: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'w') goto yy109; + yyaccept = 44; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy619: +#line 107 "cpp.re" + { BOOST_WAVE_RET(T_THROW); } +#line 4806 "cpp_re.inc" +yy620: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '_') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'o') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 45; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy628: +#line 106 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_THREADLOCAL : T_IDENTIFIER); } +#line 4839 "cpp_re.inc" +yy629: + yyaccept = 46; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy630: +#line 105 "cpp.re" + { BOOST_WAVE_RET(T_THIS); } +#line 4851 "cpp_re.inc" +yy631: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 47; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy637: +#line 104 "cpp.re" + { BOOST_WAVE_RET(T_TEMPLATE); } +#line 4878 "cpp_re.inc" +yy638: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy680; + goto yy109; +yy639: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'g') goto yy670; + if (yych == 'z') goto yy671; + goto yy109; +yy640: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy647; + if (yych == 'r') goto yy648; + goto yy109; +yy641: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'h') goto yy109; + yyaccept = 48; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy646: +#line 103 "cpp.re" + { BOOST_WAVE_RET(T_SWITCH); } +#line 4919 "cpp_re.inc" +yy647: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 't') goto yy653; + goto yy109; +yy648: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'u') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 49; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy652: +#line 102 "cpp.re" + { BOOST_WAVE_RET(T_STRUCT); } +#line 4945 "cpp_re.inc" +yy653: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 50; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '@') { + if (yych <= '/') { + if (yych == '$') goto yy108; + } else { + if (yych <= '9') goto yy108; + if (yych == '?') goto yy111; + } + } else { + if (yych <= '^') { + if (yych <= 'Z') goto yy108; + if (yych == '\\') goto yy110; + } else { + if (yych <= '_') goto yy657; + if (yych <= '`') goto yy656; + if (yych <= 'z') goto yy108; + } + } +yy656: +#line 99 "cpp.re" + { BOOST_WAVE_RET(T_STATIC); } +#line 4975 "cpp_re.inc" +yy657: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy658; + if (yych == 'c') goto yy659; + goto yy109; +yy658: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 's') goto yy664; + goto yy109; +yy659: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 51; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy663: +#line 100 "cpp.re" + { BOOST_WAVE_RET(T_STATICCAST); } +#line 5007 "cpp_re.inc" +yy664: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 52; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy669: +#line 101 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_STATICASSERT : T_IDENTIFIER); } +#line 5031 "cpp_re.inc" +yy670: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'n') goto yy676; + goto yy109; +yy671: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'o') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'f') goto yy109; + yyaccept = 53; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy675: +#line 98 "cpp.re" + { BOOST_WAVE_RET(T_SIZEOF); } +#line 5057 "cpp_re.inc" +yy676: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 54; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy679: +#line 97 "cpp.re" + { BOOST_WAVE_RET(T_SIGNED); } +#line 5075 "cpp_re.inc" +yy680: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 55; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy683: +#line 96 "cpp.re" + { BOOST_WAVE_RET(T_SHORT); } +#line 5093 "cpp_re.inc" +yy684: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'h') { + if (yych != 'g') goto yy109; + } else { + if (yych <= 'i') goto yy686; + if (yych == 't') goto yy687; + goto yy109; + } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy706; + goto yy109; +yy686: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'n') goto yy692; + goto yy109; +yy687: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'u') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 56; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy691: +#line 95 "cpp.re" + { BOOST_WAVE_RET(T_RETURN); } +#line 5133 "cpp_re.inc" +yy692: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '_') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 57; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy705: +#line 94 "cpp.re" + { BOOST_WAVE_RET(T_REINTERPRETCAST); } +#line 5181 "cpp_re.inc" +yy706: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 58; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy711: +#line 93 "cpp.re" + { BOOST_WAVE_RET(T_REGISTER); } +#line 5205 "cpp_re.inc" +yy712: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy719; + if (yych == 'o') goto yy720; + goto yy109; +yy713: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'b') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 59; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy718: +#line 92 "cpp.re" + { BOOST_WAVE_RET(T_PUBLIC); } +#line 5235 "cpp_re.inc" +yy719: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'v') goto yy728; + goto yy109; +yy720: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 60; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy727: +#line 91 "cpp.re" + { BOOST_WAVE_RET(T_PROTECTED); } +#line 5270 "cpp_re.inc" +yy728: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 61; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy732: +#line 90 "cpp.re" + { BOOST_WAVE_RET(T_PRIVATE); } +#line 5291 "cpp_re.inc" +yy733: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy740; + goto yy109; +yy734: + yyaccept = 62; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '@') { + if (yych <= '/') { + if (yych == '$') goto yy108; + } else { + if (yych <= '9') goto yy108; + if (yych == '?') goto yy111; + } + } else { + if (yych <= '^') { + if (yych <= 'Z') goto yy108; + if (yych == '\\') goto yy110; + } else { + if (yych <= '_') goto yy736; + if (yych <= '`') goto yy735; + if (yych <= 'z') goto yy108; + } + } +yy735: +#line 233 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); } +#line 5320 "cpp_re.inc" +yy736: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'q') goto yy109; + yyaccept = 63; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy739: +#line 217 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); } +#line 5338 "cpp_re.inc" +yy740: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'o') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 64; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy746: +#line 89 "cpp.re" + { BOOST_WAVE_RET(T_OPERATOR); } +#line 5365 "cpp_re.inc" +yy747: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'm') goto yy772; + goto yy109; +yy748: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'w') goto yy770; + goto yy109; +yy749: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy757; + if (yych == 't') goto yy758; + goto yy109; +yy750: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 65; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy756: +#line 88 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_NULLPTR : T_IDENTIFIER); } +#line 5408 "cpp_re.inc" +yy757: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'x') goto yy764; + goto yy109; +yy758: + yyaccept = 66; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '@') { + if (yych <= '/') { + if (yych == '$') goto yy108; + } else { + if (yych <= '9') goto yy108; + if (yych == '?') goto yy111; + } + } else { + if (yych <= '^') { + if (yych <= 'Z') goto yy108; + if (yych == '\\') goto yy110; + } else { + if (yych <= '_') goto yy760; + if (yych <= '`') goto yy759; + if (yych <= 'z') goto yy108; + } + } +yy759: +#line 202 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); } +#line 5437 "cpp_re.inc" +yy760: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'q') goto yy109; + yyaccept = 67; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy763: +#line 225 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); } +#line 5455 "cpp_re.inc" +yy764: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 68; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy769: +#line 87 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_NOEXCEPT : T_IDENTIFIER); } +#line 5479 "cpp_re.inc" +yy770: + yyaccept = 69; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy771: +#line 86 "cpp.re" + { BOOST_WAVE_RET(T_NEW); } +#line 5491 "cpp_re.inc" +yy772: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 70; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy779: +#line 85 "cpp.re" + { BOOST_WAVE_RET(T_NAMESPACE); } +#line 5521 "cpp_re.inc" +yy780: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'b') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 71; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy786: +#line 84 "cpp.re" + { BOOST_WAVE_RET(T_MUTABLE); } +#line 5548 "cpp_re.inc" +yy787: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'g') goto yy109; + yyaccept = 72; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy790: +#line 83 "cpp.re" + { BOOST_WAVE_RET(T_LONG); } +#line 5566 "cpp_re.inc" +yy791: + yyaccept = 73; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy792: +#line 79 "cpp.re" + { BOOST_WAVE_RET(T_IF); } +#line 5578 "cpp_re.inc" +yy793: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'p') goto yy802; + goto yy109; +yy794: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'l') goto yy795; + if (yych == 't') goto yy796; + goto yy109; +yy795: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy798; + goto yy109; +yy796: + yyaccept = 74; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy797: +#line 82 "cpp.re" + { BOOST_WAVE_RET(T_INT); } +#line 5606 "cpp_re.inc" +yy798: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 75; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy801: +#line 81 "cpp.re" + { BOOST_WAVE_RET(T_INLINE); } +#line 5624 "cpp_re.inc" +yy802: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'o') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 76; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy806: +#line 80 "cpp.re" + { BOOST_WAVE_RET(s->enable_import_keyword ? T_IMPORT : T_IDENTIFIER); } +#line 5645 "cpp_re.inc" +yy807: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'o') goto yy109; + yyaccept = 77; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy810: +#line 78 "cpp.re" + { BOOST_WAVE_RET(T_GOTO); } +#line 5663 "cpp_re.inc" +yy811: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'l') goto yy826; + goto yy109; +yy812: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy822; + goto yy109; +yy813: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'r') goto yy820; + goto yy109; +yy814: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 78; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy819: +#line 77 "cpp.re" + { BOOST_WAVE_RET(T_FRIEND); } +#line 5702 "cpp_re.inc" +yy820: + yyaccept = 79; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy821: +#line 76 "cpp.re" + { BOOST_WAVE_RET(T_FOR); } +#line 5714 "cpp_re.inc" +yy822: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 80; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy825: +#line 75 "cpp.re" + { BOOST_WAVE_RET(T_FLOAT); } +#line 5732 "cpp_re.inc" +yy826: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 81; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy829: +#line 74 "cpp.re" + { BOOST_WAVE_RET(T_FALSE); } +#line 5750 "cpp_re.inc" +yy830: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 's') goto yy852; + goto yy109; +yy831: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'u') goto yy849; + goto yy109; +yy832: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'p') goto yy833; + if (yych == 't') goto yy834; + goto yy109; +yy833: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'l') goto yy839; + if (yych == 'o') goto yy840; + goto yy109; +yy834: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 82; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy838: +#line 73 "cpp.re" + { BOOST_WAVE_RET(T_EXTERN); } +#line 5793 "cpp_re.inc" +yy839: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy844; + goto yy109; +yy840: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 83; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy843: +#line 72 "cpp.re" + { BOOST_WAVE_RET(T_EXPORT); } +#line 5816 "cpp_re.inc" +yy844: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 84; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy848: +#line 71 "cpp.re" + { BOOST_WAVE_RET(T_EXPLICIT); } +#line 5837 "cpp_re.inc" +yy849: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'm') goto yy109; + yyaccept = 85; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy851: +#line 70 "cpp.re" + { BOOST_WAVE_RET(T_ENUM); } +#line 5852 "cpp_re.inc" +yy852: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 86; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy854: +#line 69 "cpp.re" + { BOOST_WAVE_RET(T_ELSE); } +#line 5867 "cpp_re.inc" +yy855: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'e') { + if (yych == 'c') goto yy875; + goto yy109; + } else { + if (yych <= 'f') goto yy876; + if (yych == 'l') goto yy877; + goto yy109; + } +yy856: + yyaccept = 87; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'Z') { + if (yych <= '9') { + if (yych == '$') goto yy108; + if (yych >= '0') goto yy108; + } else { + if (yych == '?') goto yy111; + if (yych >= 'A') goto yy108; + } + } else { + if (yych <= '_') { + if (yych == '\\') goto yy110; + if (yych >= '_') goto yy108; + } else { + if (yych <= 't') { + if (yych >= 'a') goto yy108; + } else { + if (yych <= 'u') goto yy870; + if (yych <= 'z') goto yy108; + } + } + } +yy857: +#line 66 "cpp.re" + { BOOST_WAVE_RET(T_DO); } +#line 5906 "cpp_re.inc" +yy858: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'm') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '_') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 88; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy869: +#line 68 "cpp.re" + { BOOST_WAVE_RET(T_DYNAMICCAST); } +#line 5948 "cpp_re.inc" +yy870: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'b') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 89; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy874: +#line 67 "cpp.re" + { BOOST_WAVE_RET(T_DOUBLE); } +#line 5969 "cpp_re.inc" +yy875: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'l') goto yy887; + goto yy109; +yy876: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy882; + goto yy109; +yy877: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 90; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy881: +#line 65 "cpp.re" + { BOOST_WAVE_RET(T_DELETE); } +#line 6000 "cpp_re.inc" +yy882: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'u') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 91; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy886: +#line 64 "cpp.re" + { BOOST_WAVE_RET(T_DEFAULT); } +#line 6021 "cpp_re.inc" +yy887: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'y') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 92; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy892: +#line 63 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_DECLTYPE : T_IDENTIFIER); } +#line 6045 "cpp_re.inc" +yy893: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'r') goto yy109; + if (yych <= 's') goto yy939; + if (yych <= 't') goto yy940; + goto yy109; +yy894: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy926; + goto yy109; +yy895: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy922; + goto yy109; +yy896: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'l') goto yy109; + if (yych <= 'm') goto yy898; + if (yych >= 'o') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'r') goto yy109; + if (yych <= 's') goto yy902; + if (yych <= 't') goto yy903; + goto yy109; +yy898: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 93; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy901: +#line 200 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); } +#line 6092 "cpp_re.inc" +yy902: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 't') goto yy909; + goto yy109; +yy903: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'u') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 94; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy908: +#line 62 "cpp.re" + { BOOST_WAVE_RET(T_CONTINUE); } +#line 6121 "cpp_re.inc" +yy909: + yyaccept = 95; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'Z') { + if (yych <= '9') { + if (yych == '$') goto yy108; + if (yych >= '0') goto yy108; + } else { + if (yych == '?') goto yy111; + if (yych >= 'A') goto yy108; + } + } else { + if (yych <= '_') { + if (yych == '\\') goto yy110; + if (yych >= '_') goto yy911; + } else { + if (yych <= 'd') { + if (yych >= 'a') goto yy108; + } else { + if (yych <= 'e') goto yy912; + if (yych <= 'z') goto yy108; + } + } + } +yy910: +#line 59 "cpp.re" + { BOOST_WAVE_RET(T_CONST); } +#line 6149 "cpp_re.inc" +yy911: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'c') goto yy917; + goto yy109; +yy912: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'x') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'p') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 96; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy916: +#line 60 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_CONSTEXPR : T_IDENTIFIER); } +#line 6175 "cpp_re.inc" +yy917: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 97; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy921: +#line 61 "cpp.re" + { BOOST_WAVE_RET(T_CONSTCAST); } +#line 6196 "cpp_re.inc" +yy922: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 's') goto yy109; + yyaccept = 98; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy925: +#line 58 "cpp.re" + { BOOST_WAVE_RET(T_CLASS); } +#line 6214 "cpp_re.inc" +yy926: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 99; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '>') { + if (yych <= '0') { + if (yych == '$') goto yy108; + if (yych >= '0') goto yy108; + } else { + if (yych <= '2') { + if (yych <= '1') goto yy929; + goto yy108; + } else { + if (yych <= '3') goto yy930; + if (yych <= '9') goto yy108; + } + } + } else { + if (yych <= '\\') { + if (yych <= '@') { + if (yych <= '?') goto yy111; + } else { + if (yych <= 'Z') goto yy108; + if (yych >= '\\') goto yy110; + } + } else { + if (yych <= '_') { + if (yych >= '_') goto yy108; + } else { + if (yych <= '`') goto yy928; + if (yych <= 'z') goto yy108; + } + } + } +yy928: +#line 55 "cpp.re" + { BOOST_WAVE_RET(T_CHAR); } +#line 6254 "cpp_re.inc" +yy929: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '6') goto yy935; + goto yy109; +yy930: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '2') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '_') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 100; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy934: +#line 57 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_CHAR32_T : T_IDENTIFIER); } +#line 6280 "cpp_re.inc" +yy935: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != '_') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 101; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy938: +#line 56 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_CHAR16_T : T_IDENTIFIER); } +#line 6298 "cpp_re.inc" +yy939: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy944; + goto yy109; +yy940: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'c') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'h') goto yy109; + yyaccept = 102; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy943: +#line 54 "cpp.re" + { BOOST_WAVE_RET(T_CATCH); } +#line 6321 "cpp_re.inc" +yy944: + yyaccept = 103; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy945: +#line 53 "cpp.re" + { BOOST_WAVE_RET(T_CASE); } +#line 6333 "cpp_re.inc" +yy946: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 't') goto yy956; + goto yy109; +yy947: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'o') goto yy953; + goto yy109; +yy948: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'a') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'k') goto yy109; + yyaccept = 104; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy952: +#line 52 "cpp.re" + { BOOST_WAVE_RET(T_BREAK); } +#line 6364 "cpp_re.inc" +yy953: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'l') goto yy109; + yyaccept = 105; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy955: +#line 51 "cpp.re" + { BOOST_WAVE_RET(T_BOOL); } +#line 6379 "cpp_re.inc" +yy956: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy957; + if (yych == 'o') goto yy958; + goto yy109; +yy957: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'n') goto yy961; + goto yy109; +yy958: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'r') goto yy109; + yyaccept = 106; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy960: +#line 196 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OR_ALT); } +#line 6405 "cpp_re.inc" +yy961: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'd') goto yy109; + yyaccept = 107; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy963: +#line 194 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_AND_ALT); } +#line 6420 "cpp_re.inc" +yy964: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy979; + goto yy109; +yy965: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'd') goto yy973; + goto yy109; +yy966: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'm') goto yy971; + goto yy109; +yy967: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 't') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'o') goto yy109; + yyaccept = 108; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy970: +#line 50 "cpp.re" + { BOOST_WAVE_RET(T_AUTO); } +#line 6453 "cpp_re.inc" +yy971: + yyaccept = 109; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy972: +#line 49 "cpp.re" + { BOOST_WAVE_RET(T_ASM); } +#line 6465 "cpp_re.inc" +yy973: + yyaccept = 110; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '@') { + if (yych <= '/') { + if (yych == '$') goto yy108; + } else { + if (yych <= '9') goto yy108; + if (yych == '?') goto yy111; + } + } else { + if (yych <= '^') { + if (yych <= 'Z') goto yy108; + if (yych == '\\') goto yy110; + } else { + if (yych <= '_') goto yy975; + if (yych <= '`') goto yy974; + if (yych <= 'z') goto yy108; + } + } +yy974: +#line 229 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDAND_ALT); } +#line 6489 "cpp_re.inc" +yy975: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'e') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'q') goto yy109; + yyaccept = 111; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy978: +#line 215 "cpp.re" + { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDASSIGN_ALT); } +#line 6507 "cpp_re.inc" +yy979: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'g') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'n') goto yy109; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'a') goto yy982; + if (yych == 'o') goto yy983; + goto yy109; +yy982: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 's') goto yy986; + goto yy109; +yy983: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if (yych != 'f') goto yy109; + yyaccept = 112; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy985: +#line 48 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_ALIGNOF : T_IDENTIFIER); } +#line 6539 "cpp_re.inc" +yy986: + yyaccept = 113; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[256+yych] & 32) { + goto yy108; + } + if (yych == '?') goto yy111; + if (yych == '\\') goto yy110; +yy987: +#line 47 "cpp.re" + { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_ALIGNAS : T_IDENTIFIER); } +#line 6551 "cpp_re.inc" +yy988: + ++YYCURSOR; +#line 176 "cpp.re" + { + if (s->act_in_c99_mode) { + --YYCURSOR; + BOOST_WAVE_RET(T_DOT); + } + else { + BOOST_WAVE_RET(T_DOTSTAR); + } + } +#line 6564 "cpp_re.inc" +yy990: + yych = *++YYCURSOR; + if (yych == '.') goto yy992; + goto yy99; +yy991: + yych = *++YYCURSOR; + goto yy7; +yy992: + ++YYCURSOR; +#line 162 "cpp.re" + { BOOST_WAVE_RET(T_ELLIPSIS); } +#line 6576 "cpp_re.inc" +yy994: + ++YYCURSOR; +#line 209 "cpp.re" + { BOOST_WAVE_RET(T_DIVIDEASSIGN); } +#line 6581 "cpp_re.inc" +yy996: + ++YYCURSOR; +#line 44 "cpp.re" + { goto cppcomment; } +#line 6586 "cpp_re.inc" +yy998: + ++YYCURSOR; +#line 43 "cpp.re" + { goto ccomment; } +#line 6591 "cpp_re.inc" +} +#line 348 "cpp.re" + + +ccomment: + +#line 6598 "cpp_re.inc" +{ + YYCTYPE yych; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if (yych <= '\f') { + if (yych <= 0x08) { + if (yych <= 0x00) goto yy1009; + goto yy1011; + } else { + if (yych == '\n') goto yy1004; + goto yy1007; + } + } else { + if (yych <= 0x1F) { + if (yych <= '\r') goto yy1006; + goto yy1011; + } else { + if (yych != '*') goto yy1008; + } + } + ++YYCURSOR; + if ((yych = *YYCURSOR) == '/') goto yy1014; +yy1003: +#line 363 "cpp.re" + { goto ccomment; } +#line 6624 "cpp_re.inc" +yy1004: + ++YYCURSOR; +yy1005: +#line 355 "cpp.re" + { + /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/ + /*s->tok = cursor; */ + s->line += count_backslash_newlines(s, cursor) +1; + cursor.column = 1; + goto ccomment; + } +#line 6636 "cpp_re.inc" +yy1006: + yych = *++YYCURSOR; + if (yych == '\n') goto yy1013; + goto yy1005; +yy1007: + yych = *++YYCURSOR; + goto yy1003; +yy1008: + yych = *++YYCURSOR; + goto yy1003; +yy1009: + ++YYCURSOR; +#line 366 "cpp.re" + { + if(cursor == s->eof) + { + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_warning, + "Unterminated 'C' style comment"); + } + else + { + --YYCURSOR; // next call returns T_EOF + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_error, + "invalid character: '\\000' in input stream"); + } + } +#line 6665 "cpp_re.inc" +yy1011: + ++YYCURSOR; +#line 383 "cpp.re" + { + // flag the error + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_error, + "invalid character '\\%03o' in input stream", *--YYCURSOR); + } +#line 6675 "cpp_re.inc" +yy1013: + yych = *++YYCURSOR; + goto yy1005; +yy1014: + ++YYCURSOR; +#line 352 "cpp.re" + { BOOST_WAVE_RET(T_CCOMMENT); } +#line 6683 "cpp_re.inc" +} +#line 389 "cpp.re" + + +cppcomment: + +#line 6690 "cpp_re.inc" +{ + YYCTYPE yych; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if (yych <= '\n') { + if (yych <= 0x00) goto yy1024; + if (yych <= 0x08) goto yy1026; + if (yych <= '\t') goto yy1021; + } else { + if (yych <= '\f') goto yy1021; + if (yych <= '\r') goto yy1020; + if (yych <= 0x1F) goto yy1026; + goto yy1023; + } + ++YYCURSOR; +yy1019: +#line 394 "cpp.re" + { + /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */ + /*s->tok = cursor; */ + s->line++; + cursor.column = 1; + BOOST_WAVE_RET(T_CPPCOMMENT); + } +#line 6715 "cpp_re.inc" +yy1020: + yych = *++YYCURSOR; + if (yych == '\n') goto yy1028; + goto yy1019; +yy1021: + ++YYCURSOR; +yy1022: +#line 402 "cpp.re" + { goto cppcomment; } +#line 6725 "cpp_re.inc" +yy1023: + yych = *++YYCURSOR; + goto yy1022; +yy1024: + ++YYCURSOR; +#line 405 "cpp.re" + { + if (s->eof && cursor != s->eof) + { + --YYCURSOR; // next call returns T_EOF + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_error, + "invalid character '\\000' in input stream"); + } + + --YYCURSOR; // next call returns T_EOF + if (!s->single_line_only) + { + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_warning, + "Unterminated 'C++' style comment"); + } + BOOST_WAVE_RET(T_CPPCOMMENT); + } +#line 6750 "cpp_re.inc" +yy1026: + ++YYCURSOR; +#line 425 "cpp.re" + { + // flag the error + BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor + (*s->error_proc)(s, lexing_exception::generic_lexing_error, + "invalid character '\\%03o' in input stream", *--YYCURSOR); + } +#line 6760 "cpp_re.inc" +yy1028: + ++YYCURSOR; + yych = *YYCURSOR; + goto yy1019; +} +#line 431 "cpp.re" + + +/* this subscanner is called whenever a pp_number has been started */ +pp_number: +{ + cursor = uchar_wrapper(s->tok = s->cur, s->column = s->curr_column); + marker = uchar_wrapper(s->ptr); + limit = uchar_wrapper(s->lim); + + if (s->detect_pp_numbers) { + +#line 6778 "cpp_re.inc" +{ + YYCTYPE yych; + static const unsigned char yybm[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 64, 0, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 0, 0, 0, 0, 0, 0, + 0, 64, 64, 64, 64, 128, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 64, + 0, 64, 64, 64, 64, 128, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if (yych == '.') goto yy1032; + if (yych <= '/') goto yy1031; + if (yych <= '9') goto yy1033; +yy1031: + YYCURSOR = YYMARKER; + goto yy1035; +yy1032: + yych = *++YYCURSOR; + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; +yy1033: + YYMARKER = ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 64) { + goto yy1033; + } + if (yych <= 'Z') { + if (yych == '?') goto yy1039; + if (yych >= 'A') goto yy1036; + } else { + if (yych <= '\\') { + if (yych >= '\\') goto yy1038; + } else { + if (yych == 'e') goto yy1036; + } + } +yy1035: +#line 443 "cpp.re" + { BOOST_WAVE_RET(T_PP_NUMBER); } +#line 6847 "cpp_re.inc" +yy1036: + YYMARKER = ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1036; + } + if (yych <= '>') { + if (yych <= '+') { + if (yych == '$') goto yy1033; + if (yych <= '*') goto yy1035; + goto yy1033; + } else { + if (yych <= '.') { + if (yych <= ',') goto yy1035; + goto yy1033; + } else { + if (yych <= '/') goto yy1035; + if (yych <= '9') goto yy1033; + goto yy1035; + } + } + } else { + if (yych <= '\\') { + if (yych <= '@') { + if (yych <= '?') goto yy1039; + goto yy1035; + } else { + if (yych <= 'Z') goto yy1033; + if (yych <= '[') goto yy1035; + } + } else { + if (yych <= '_') { + if (yych <= '^') goto yy1035; + goto yy1033; + } else { + if (yych <= '`') goto yy1035; + if (yych <= 'z') goto yy1033; + goto yy1035; + } + } + } +yy1038: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych == 'U') goto yy1042; + if (yych == 'u') goto yy1041; + goto yy1031; +yy1039: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych != '?') goto yy1031; + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych == '/') goto yy1038; + goto yy1031; +yy1041: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych <= '9') goto yy1050; + goto yy1031; + } else { + if (yych <= 'F') goto yy1050; + if (yych <= '`') goto yy1031; + if (yych <= 'f') goto yy1050; + goto yy1031; + } +yy1042: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1043; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1043: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1044; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1044: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1045; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1045: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1046; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1046: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1047; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1047: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1048; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1048: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1049; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1049: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych <= '9') goto yy1033; + goto yy1031; + } else { + if (yych <= 'F') goto yy1033; + if (yych <= '`') goto yy1031; + if (yych <= 'f') goto yy1033; + goto yy1031; + } +yy1050: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1051; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1051: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych >= ':') goto yy1031; + } else { + if (yych <= 'F') goto yy1052; + if (yych <= '`') goto yy1031; + if (yych >= 'g') goto yy1031; + } +yy1052: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1031; + if (yych <= '9') goto yy1033; + goto yy1031; + } else { + if (yych <= 'F') goto yy1033; + if (yych <= '`') goto yy1031; + if (yych <= 'f') goto yy1033; + goto yy1031; + } +} +#line 444 "cpp.re" + + } + else { + +#line 7063 "cpp_re.inc" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + static const unsigned char yybm[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 224, 224, 224, 224, 224, 224, 224, 224, + 160, 160, 0, 0, 0, 0, 0, 0, + 0, 128, 128, 128, 128, 128, 128, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 128, 128, 128, 128, 128, 128, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }; + if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + if (yych <= '/') { + if (yych == '.') goto yy1060; + } else { + if (yych <= '0') goto yy1056; + if (yych <= '9') goto yy1058; + } +yy1055: + YYCURSOR = YYMARKER; + if (yyaccept <= 0) { + goto yy1057; + } else { + goto yy1063; + } +yy1056: + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[0+yych] & 64) { + goto yy1075; + } + if (yych <= 'E') { + if (yych <= '/') { + if (yych == '.') goto yy1061; + } else { + if (yych <= '9') goto yy1078; + if (yych >= 'E') goto yy1071; + } + } else { + if (yych <= 'd') { + if (yych == 'X') goto yy1077; + } else { + if (yych <= 'e') goto yy1071; + if (yych == 'x') goto yy1077; + } + } +yy1057: +#line 451 "cpp.re" + { goto integer_suffix; } +#line 7140 "cpp_re.inc" +yy1058: + yyaccept = 0; + YYMARKER = ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy1058; + } + if (yych <= 'D') { + if (yych == '.') goto yy1061; + goto yy1057; + } else { + if (yych <= 'E') goto yy1071; + if (yych == 'e') goto yy1071; + goto yy1057; + } +yy1060: + yych = *++YYCURSOR; + if (yych <= '/') goto yy1055; + if (yych >= ':') goto yy1055; +yy1061: + yyaccept = 1; + YYMARKER = ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + if (yych <= 'K') { + if (yych <= 'D') { + if (yych <= '/') goto yy1063; + if (yych <= '9') goto yy1061; + } else { + if (yych <= 'E') goto yy1064; + if (yych <= 'F') goto yy1065; + } + } else { + if (yych <= 'e') { + if (yych <= 'L') goto yy1066; + if (yych >= 'e') goto yy1064; + } else { + if (yych <= 'f') goto yy1065; + if (yych == 'l') goto yy1066; + } + } +yy1063: +#line 449 "cpp.re" + { BOOST_WAVE_RET(T_FLOATLIT); } +#line 7186 "cpp_re.inc" +yy1064: + yych = *++YYCURSOR; + if (yych <= ',') { + if (yych == '+') goto yy1068; + goto yy1055; + } else { + if (yych <= '-') goto yy1068; + if (yych <= '/') goto yy1055; + if (yych <= '9') goto yy1069; + goto yy1055; + } +yy1065: + yych = *++YYCURSOR; + if (yych == 'L') goto yy1067; + if (yych == 'l') goto yy1067; + goto yy1063; +yy1066: + yych = *++YYCURSOR; + if (yych == 'F') goto yy1067; + if (yych != 'f') goto yy1063; +yy1067: + yych = *++YYCURSOR; + goto yy1063; +yy1068: + yych = *++YYCURSOR; + if (yych <= '/') goto yy1055; + if (yych >= ':') goto yy1055; +yy1069: + ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if (yych <= 'K') { + if (yych <= '9') { + if (yych <= '/') goto yy1063; + goto yy1069; + } else { + if (yych == 'F') goto yy1065; + goto yy1063; + } + } else { + if (yych <= 'f') { + if (yych <= 'L') goto yy1066; + if (yych <= 'e') goto yy1063; + goto yy1065; + } else { + if (yych == 'l') goto yy1066; + goto yy1063; + } + } +yy1071: + yych = *++YYCURSOR; + if (yych <= ',') { + if (yych != '+') goto yy1055; + } else { + if (yych <= '-') goto yy1072; + if (yych <= '/') goto yy1055; + if (yych <= '9') goto yy1073; + goto yy1055; + } +yy1072: + yych = *++YYCURSOR; + if (yych <= '/') goto yy1055; + if (yych >= ':') goto yy1055; +yy1073: + ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if (yych <= 'K') { + if (yych <= '9') { + if (yych <= '/') goto yy1063; + goto yy1073; + } else { + if (yych == 'F') goto yy1065; + goto yy1063; + } + } else { + if (yych <= 'f') { + if (yych <= 'L') goto yy1066; + if (yych <= 'e') goto yy1063; + goto yy1065; + } else { + if (yych == 'l') goto yy1066; + goto yy1063; + } + } +yy1075: + yyaccept = 0; + YYMARKER = ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + if (yybm[0+yych] & 64) { + goto yy1075; + } + if (yych <= '9') { + if (yych == '.') goto yy1061; + if (yych <= '/') goto yy1057; + goto yy1078; + } else { + if (yych <= 'E') { + if (yych <= 'D') goto yy1057; + goto yy1071; + } else { + if (yych == 'e') goto yy1071; + goto yy1057; + } + } +yy1077: + yych = *++YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1080; + } + goto yy1055; +yy1078: + ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych == '.') goto yy1061; + if (yych <= '/') goto yy1055; + goto yy1078; + } else { + if (yych <= 'E') { + if (yych <= 'D') goto yy1055; + goto yy1071; + } else { + if (yych == 'e') goto yy1071; + goto yy1055; + } + } +yy1080: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1080; + } + goto yy1057; +} +#line 452 "cpp.re" + + } +} + +/* this subscanner is called, whenever an Integer was recognized */ +integer_suffix: +{ + if (s->enable_ms_extensions) { + +#line 7335 "cpp_re.inc" +{ + YYCTYPE yych; + if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *(YYMARKER = YYCURSOR); + if (yych <= 'h') { + if (yych <= 'L') { + if (yych >= 'L') goto yy1086; + } else { + if (yych == 'U') goto yy1085; + } + } else { + if (yych <= 'l') { + if (yych <= 'i') goto yy1087; + if (yych >= 'l') goto yy1086; + } else { + if (yych == 'u') goto yy1085; + } + } +yy1084: +#line 465 "cpp.re" + { BOOST_WAVE_RET(T_INTLIT); } +#line 7357 "cpp_re.inc" +yy1085: + yych = *++YYCURSOR; + if (yych == 'L') goto yy1094; + if (yych == 'l') goto yy1094; + goto yy1084; +yy1086: + yych = *++YYCURSOR; + if (yych <= 'U') { + if (yych == 'L') goto yy1093; + if (yych <= 'T') goto yy1084; + goto yy1092; + } else { + if (yych <= 'l') { + if (yych <= 'k') goto yy1084; + goto yy1093; + } else { + if (yych == 'u') goto yy1092; + goto yy1084; + } + } +yy1087: + yych = *++YYCURSOR; + if (yych == '6') goto yy1089; +yy1088: + YYCURSOR = YYMARKER; + goto yy1084; +yy1089: + yych = *++YYCURSOR; + if (yych != '4') goto yy1088; +yy1090: + ++YYCURSOR; +yy1091: +#line 462 "cpp.re" + { BOOST_WAVE_RET(T_LONGINTLIT); } +#line 7392 "cpp_re.inc" +yy1092: + yych = *++YYCURSOR; + goto yy1084; +yy1093: + yych = *++YYCURSOR; + if (yych == 'U') goto yy1090; + if (yych == 'u') goto yy1090; + goto yy1091; +yy1094: + ++YYCURSOR; + if ((yych = *YYCURSOR) == 'L') goto yy1090; + if (yych == 'l') goto yy1090; + goto yy1084; +} +#line 466 "cpp.re" + + } + else { + +#line 7412 "cpp_re.inc" +{ + YYCTYPE yych; + if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + if (yych <= 'U') { + if (yych == 'L') goto yy1099; + if (yych >= 'U') goto yy1098; + } else { + if (yych <= 'l') { + if (yych >= 'l') goto yy1099; + } else { + if (yych == 'u') goto yy1098; + } + } +yy1097: +#line 474 "cpp.re" + { BOOST_WAVE_RET(T_INTLIT); } +#line 7430 "cpp_re.inc" +yy1098: + yych = *++YYCURSOR; + if (yych == 'L') goto yy1104; + if (yych == 'l') goto yy1104; + goto yy1097; +yy1099: + yych = *++YYCURSOR; + if (yych <= 'U') { + if (yych == 'L') goto yy1101; + if (yych <= 'T') goto yy1097; + } else { + if (yych <= 'l') { + if (yych <= 'k') goto yy1097; + goto yy1101; + } else { + if (yych != 'u') goto yy1097; + } + } + yych = *++YYCURSOR; + goto yy1097; +yy1101: + ++YYCURSOR; + if ((yych = *YYCURSOR) == 'U') goto yy1103; + if (yych == 'u') goto yy1103; +yy1102: +#line 471 "cpp.re" + { BOOST_WAVE_RET(T_LONGINTLIT); } +#line 7458 "cpp_re.inc" +yy1103: + yych = *++YYCURSOR; + goto yy1102; +yy1104: + ++YYCURSOR; + if ((yych = *YYCURSOR) == 'L') goto yy1103; + if (yych == 'l') goto yy1103; + goto yy1097; +} +#line 475 "cpp.re" + + } +} + +/* this subscanner is invoked for C++0x extended character literals */ +extcharlit: +{ + +#line 7477 "cpp_re.inc" +{ + YYCTYPE yych; + static const unsigned char yybm[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 0, 0, 0, 0, 0, 0, + 0, 128, 128, 128, 128, 128, 128, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 128, 128, 128, 128, 128, 128, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }; + if ((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; + if (yych <= 0x1F) { + if (yych <= '\n') { + if (yych <= 0x08) goto yy1107; + if (yych <= '\t') goto yy1108; + goto yy1112; + } else { + if (yych <= '\f') goto yy1108; + if (yych <= '\r') goto yy1112; + } + } else { + if (yych <= '>') { + if (yych == '\'') goto yy1112; + goto yy1108; + } else { + if (yych <= '?') goto yy1110; + if (yych == '\\') goto yy1111; + goto yy1108; + } + } +yy1107: + YYCURSOR = YYMARKER; + goto yy1109; +yy1108: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '\'') goto yy1120; +yy1109: +#line 487 "cpp.re" + { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); } +#line 7544 "cpp_re.inc" +yy1110: + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '\'') goto yy1120; + if (yych == '?') goto yy1135; + goto yy1109; +yy1111: + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy1115; + goto yy1109; + } else { + if (yych <= '\'') goto yy1115; + if (yych <= '/') goto yy1109; + goto yy1118; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy1116; + goto yy1109; + } else { + if (yych <= 'U') goto yy1114; + if (yych == '\\') goto yy1115; + goto yy1109; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy1115; + if (yych <= 'e') goto yy1109; + goto yy1115; + } else { + if (yych == 'n') goto yy1115; + if (yych <= 'q') goto yy1109; + goto yy1115; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy1109; + if (yych <= 't') goto yy1115; + goto yy1113; + } else { + if (yych <= 'v') goto yy1115; + if (yych == 'x') goto yy1117; + goto yy1109; + } + } + } +yy1112: + yych = *++YYCURSOR; + goto yy1109; +yy1113: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych <= '9') goto yy1132; + goto yy1107; + } else { + if (yych <= 'F') goto yy1132; + if (yych <= '`') goto yy1107; + if (yych <= 'f') goto yy1132; + goto yy1107; + } +yy1114: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych <= '9') goto yy1125; + goto yy1107; + } else { + if (yych <= 'F') goto yy1125; + if (yych <= '`') goto yy1107; + if (yych <= 'f') goto yy1125; + goto yy1107; + } +yy1115: + yych = *++YYCURSOR; + if (yych == '\'') goto yy1120; + goto yy1107; +yy1116: + yych = *++YYCURSOR; + if (yych == '\'') goto yy1120; + if (yych == '?') goto yy1124; + goto yy1107; +yy1117: + yych = *++YYCURSOR; + if (yych == '\'') goto yy1107; + goto yy1123; +yy1118: + yych = *++YYCURSOR; + if (yych == '\'') goto yy1120; + if (yych <= '/') goto yy1107; + if (yych >= '8') goto yy1107; + yych = *++YYCURSOR; + if (yych == '\'') goto yy1120; + if (yych <= '/') goto yy1107; + if (yych <= '7') goto yy1115; + goto yy1107; +yy1120: + ++YYCURSOR; +#line 484 "cpp.re" + { BOOST_WAVE_RET(T_CHARLIT); } +#line 7649 "cpp_re.inc" +yy1122: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy1123: + if (yybm[0+yych] & 128) { + goto yy1122; + } + if (yych == '\'') goto yy1120; + goto yy1107; +yy1124: + yych = *++YYCURSOR; + if (yych == '/') goto yy1115; + goto yy1107; +yy1125: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1126; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1126: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1127; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1127: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1128; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1128: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1129; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1129: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1130; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1130: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1131; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1131: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych <= '9') goto yy1115; + goto yy1107; + } else { + if (yych <= 'F') goto yy1115; + if (yych <= '`') goto yy1107; + if (yych <= 'f') goto yy1115; + goto yy1107; + } +yy1132: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1133; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1133: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych >= ':') goto yy1107; + } else { + if (yych <= 'F') goto yy1134; + if (yych <= '`') goto yy1107; + if (yych >= 'g') goto yy1107; + } +yy1134: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1107; + if (yych <= '9') goto yy1115; + goto yy1107; + } else { + if (yych <= 'F') goto yy1115; + if (yych <= '`') goto yy1107; + if (yych <= 'f') goto yy1115; + goto yy1107; + } +yy1135: + yych = *++YYCURSOR; + if (yych != '/') goto yy1107; + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy1115; + goto yy1107; + } else { + if (yych <= '\'') goto yy1115; + if (yych <= '/') goto yy1107; + goto yy1118; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy1116; + goto yy1107; + } else { + if (yych <= 'U') goto yy1114; + if (yych == '\\') goto yy1115; + goto yy1107; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy1115; + if (yych <= 'e') goto yy1107; + goto yy1115; + } else { + if (yych == 'n') goto yy1115; + if (yych <= 'q') goto yy1107; + goto yy1115; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy1107; + if (yych <= 't') goto yy1115; + goto yy1113; + } else { + if (yych <= 'v') goto yy1115; + if (yych == 'x') goto yy1117; + goto yy1107; + } + } + } +} +#line 488 "cpp.re" + +} + +/* this subscanner is invoked for C++0x extended character string literals */ +extstringlit: +{ + +#line 7824 "cpp_re.inc" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + static const unsigned char yybm[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 16, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 16, 16, 0, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 16, 16, 16, 16, 16, 32, + 16, 144, 144, 144, 144, 144, 144, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 64, 16, 16, 16, + 16, 144, 144, 144, 144, 144, 144, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + }; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if (yych <= 0x1F) { + if (yych <= '\n') { + if (yych <= 0x08) goto yy1139; + if (yych <= '\t') goto yy1140; + goto yy1146; + } else { + if (yych <= '\f') goto yy1140; + if (yych <= '\r') goto yy1146; + } + } else { + if (yych <= '>') { + if (yych == '"') goto yy1144; + goto yy1140; + } else { + if (yych <= '?') goto yy1142; + if (yych == '\\') goto yy1143; + goto yy1140; + } + } +yy1139: + YYCURSOR = YYMARKER; + if (yyaccept <= 0) { + goto yy1141; + } else { + goto yy1145; + } +yy1140: + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '\n') { + if (yych == '\t') goto yy1150; + } else { + if (yych <= '\f') goto yy1150; + if (yych >= ' ') goto yy1150; + } +yy1141: +#line 499 "cpp.re" + { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); } +#line 7902 "cpp_re.inc" +yy1142: + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[0+yych] & 32) { + goto yy1158; + } + if (yych <= '\n') { + if (yych == '\t') goto yy1150; + goto yy1141; + } else { + if (yych <= '\f') goto yy1150; + if (yych <= 0x1F) goto yy1141; + goto yy1150; + } +yy1143: + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy1149; + goto yy1141; + } else { + if (yych <= '\'') goto yy1149; + if (yych <= '/') goto yy1141; + goto yy1153; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy1151; + goto yy1141; + } else { + if (yych <= 'U') goto yy1148; + if (yych == '\\') goto yy1149; + goto yy1141; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy1149; + if (yych <= 'e') goto yy1141; + goto yy1149; + } else { + if (yych == 'n') goto yy1149; + if (yych <= 'q') goto yy1141; + goto yy1149; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy1141; + if (yych <= 't') goto yy1149; + goto yy1147; + } else { + if (yych <= 'v') goto yy1149; + if (yych == 'x') goto yy1152; + goto yy1141; + } + } + } +yy1144: + ++YYCURSOR; +yy1145: +#line 496 "cpp.re" + { BOOST_WAVE_RET(T_STRINGLIT); } +#line 7968 "cpp_re.inc" +yy1146: + yych = *++YYCURSOR; + goto yy1141; +yy1147: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych <= '9') goto yy1187; + goto yy1139; + } else { + if (yych <= 'F') goto yy1187; + if (yych <= '`') goto yy1139; + if (yych <= 'f') goto yy1187; + goto yy1139; + } +yy1148: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych <= '9') goto yy1180; + goto yy1139; + } else { + if (yych <= 'F') goto yy1180; + if (yych <= '`') goto yy1139; + if (yych <= 'f') goto yy1180; + goto yy1139; + } +yy1149: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy1150: + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1156; + goto yy1157; +yy1151: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1179; + goto yy1157; +yy1152: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1166; + } + goto yy1139; +yy1153: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '"') { + if (yych <= '\n') { + if (yych == '\t') goto yy1149; + goto yy1139; + } else { + if (yych <= '\f') goto yy1149; + if (yych <= 0x1F) goto yy1139; + if (yych <= '!') goto yy1149; + goto yy1155; + } + } else { + if (yych <= '>') { + if (yych <= '/') goto yy1149; + if (yych >= '8') goto yy1149; + } else { + if (yych <= '?') goto yy1156; + if (yych == '\\') goto yy1157; + goto yy1149; + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1156; + goto yy1157; +yy1155: + yych = *++YYCURSOR; + goto yy1145; +yy1156: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1158; +yy1157: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy1149; + goto yy1139; + } else { + if (yych <= '\'') goto yy1149; + if (yych <= '/') goto yy1139; + goto yy1153; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy1151; + goto yy1139; + } else { + if (yych <= 'U') goto yy1148; + if (yych == '\\') goto yy1149; + goto yy1139; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy1149; + if (yych <= 'e') goto yy1139; + goto yy1149; + } else { + if (yych == 'n') goto yy1149; + if (yych <= 'q') goto yy1139; + goto yy1149; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy1139; + if (yych <= 't') goto yy1149; + goto yy1147; + } else { + if (yych <= 'v') goto yy1149; + if (yych == 'x') goto yy1152; + goto yy1139; + } + } + } +yy1158: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy1158; + } + if (yych <= '!') { + if (yych <= '\n') { + if (yych == '\t') goto yy1149; + goto yy1139; + } else { + if (yych <= '\f') goto yy1149; + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } + } else { + if (yych <= '/') { + if (yych <= '"') goto yy1155; + if (yych <= '.') goto yy1149; + } else { + if (yych == '\\') goto yy1157; + goto yy1149; + } + } +yy1160: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 64) { + goto yy1160; + } + if (yych <= '7') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1164; + if (yych <= '/') goto yy1149; + goto yy1153; + } + } + } else { + if (yych <= 'U') { + if (yych == '?') goto yy1165; + if (yych <= 'T') goto yy1149; + goto yy1163; + } else { + if (yych <= 'u') { + if (yych <= 't') goto yy1149; + } else { + if (yych == 'x') goto yy1166; + goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + goto yy1176; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + goto yy1176; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych <= 'f') goto yy1176; + goto yy1149; + } + } + } +yy1163: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + goto yy1169; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + goto yy1169; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych <= 'f') goto yy1169; + goto yy1149; + } + } + } +yy1164: + yyaccept = 1; + YYMARKER = ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1145; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1156; + goto yy1157; +yy1165: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1168; + goto yy1157; +yy1166: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1166; + } + if (yych <= '!') { + if (yych <= '\n') { + if (yych == '\t') goto yy1149; + goto yy1139; + } else { + if (yych <= '\f') goto yy1149; + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } + } else { + if (yych <= '?') { + if (yych <= '"') goto yy1155; + if (yych <= '>') goto yy1149; + goto yy1156; + } else { + if (yych == '\\') goto yy1157; + goto yy1149; + } + } +yy1168: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy1158; + } + if (yych <= '!') { + if (yych <= '\n') { + if (yych == '\t') goto yy1149; + goto yy1139; + } else { + if (yych <= '\f') goto yy1149; + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } + } else { + if (yych <= '/') { + if (yych <= '"') goto yy1155; + if (yych <= '.') goto yy1149; + goto yy1160; + } else { + if (yych == '\\') goto yy1157; + goto yy1149; + } + } +yy1169: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1156; + goto yy1157; +yy1176: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '9') { + if (yych <= '\f') { + if (yych == '\t') goto yy1149; + if (yych <= '\n') goto yy1139; + goto yy1149; + } else { + if (yych <= '!') { + if (yych <= 0x1F) goto yy1139; + goto yy1149; + } else { + if (yych <= '"') goto yy1155; + if (yych <= '/') goto yy1149; + } + } + } else { + if (yych <= 'F') { + if (yych == '?') goto yy1156; + if (yych <= '@') goto yy1149; + } else { + if (yych <= '\\') { + if (yych <= '[') goto yy1149; + goto yy1157; + } else { + if (yych <= '`') goto yy1149; + if (yych >= 'g') goto yy1149; + } + } + } + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1156; + goto yy1157; +yy1179: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 16) { + goto yy1149; + } + if (yych <= '!') goto yy1139; + if (yych <= '"') goto yy1155; + if (yych <= '[') goto yy1158; + goto yy1157; +yy1180: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1181; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1181: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1182; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1182: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1183; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1183: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1184; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1184: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1185; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1185: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1186; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1186: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych <= '9') goto yy1149; + goto yy1139; + } else { + if (yych <= 'F') goto yy1149; + if (yych <= '`') goto yy1139; + if (yych <= 'f') goto yy1149; + goto yy1139; + } +yy1187: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1188; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1188: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych >= ':') goto yy1139; + } else { + if (yych <= 'F') goto yy1189; + if (yych <= '`') goto yy1139; + if (yych >= 'g') goto yy1139; + } +yy1189: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1139; + if (yych <= '9') goto yy1149; + goto yy1139; + } else { + if (yych <= 'F') goto yy1149; + if (yych <= '`') goto yy1139; + if (yych <= 'f') goto yy1149; + goto yy1139; + } +} +#line 500 "cpp.re" + +} + +extrawstringlit: +{ + +#line 8743 "cpp_re.inc" +{ + YYCTYPE yych; + static const unsigned char yybm[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 0, 0, 0, 0, 0, 0, + 0, 128, 128, 128, 128, 128, 128, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 128, 128, 128, 128, 128, 128, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }; + if ((YYLIMIT - YYCURSOR) < 12) YYFILL(12); + yych = *YYCURSOR; + if (yych <= 0x1F) { + if (yych <= '\n') { + if (yych <= 0x08) goto yy1192; + if (yych <= '\t') goto yy1193; + goto yy1197; + } else { + if (yych <= '\f') goto yy1193; + if (yych <= '\r') goto yy1199; + } + } else { + if (yych <= '>') { + if (yych == '"') goto yy1200; + goto yy1193; + } else { + if (yych <= '?') goto yy1195; + if (yych == '\\') goto yy1196; + goto yy1193; + } + } +yy1192: + YYCURSOR = YYMARKER; + goto yy1194; +yy1193: + ++YYCURSOR; +yy1194: +#line 507 "cpp.re" + { + goto extrawstringlit; + } +#line 8811 "cpp_re.inc" +yy1195: + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '?') goto yy1221; + goto yy1194; +yy1196: + yych = *++YYCURSOR; + if (yych <= '`') { + if (yych <= '7') { + if (yych <= '&') { + if (yych == '"') goto yy1193; + goto yy1192; + } else { + if (yych <= '\'') goto yy1193; + if (yych <= '/') goto yy1192; + goto yy1206; + } + } else { + if (yych <= 'T') { + if (yych == '?') goto yy1204; + goto yy1192; + } else { + if (yych <= 'U') goto yy1203; + if (yych == '\\') goto yy1193; + goto yy1192; + } + } + } else { + if (yych <= 'r') { + if (yych <= 'f') { + if (yych <= 'b') goto yy1193; + if (yych <= 'e') goto yy1192; + goto yy1193; + } else { + if (yych == 'n') goto yy1193; + if (yych <= 'q') goto yy1192; + goto yy1193; + } + } else { + if (yych <= 'u') { + if (yych <= 's') goto yy1192; + if (yych <= 't') goto yy1193; + goto yy1202; + } else { + if (yych <= 'v') goto yy1193; + if (yych == 'x') goto yy1205; + goto yy1192; + } + } + } +yy1197: + ++YYCURSOR; +yy1198: +#line 512 "cpp.re" + { + s->line += count_backslash_newlines(s, cursor) +1; + cursor.column = 1; + goto extrawstringlit; + } +#line 8870 "cpp_re.inc" +yy1199: + yych = *++YYCURSOR; + if (yych == '\n') goto yy1197; + goto yy1198; +yy1200: + ++YYCURSOR; +#line 518 "cpp.re" + { BOOST_WAVE_RET(T_RAWSTRINGLIT); } +#line 8879 "cpp_re.inc" +yy1202: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych <= '9') goto yy1218; + goto yy1192; + } else { + if (yych <= 'F') goto yy1218; + if (yych <= '`') goto yy1192; + if (yych <= 'f') goto yy1218; + goto yy1192; + } +yy1203: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych <= '9') goto yy1211; + goto yy1192; + } else { + if (yych <= 'F') goto yy1211; + if (yych <= '`') goto yy1192; + if (yych <= 'f') goto yy1211; + goto yy1192; + } +yy1204: + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '?') goto yy1210; + goto yy1194; +yy1205: + yych = *++YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1208; + } + goto yy1192; +yy1206: + yych = *++YYCURSOR; + if (yych <= '/') goto yy1194; + if (yych >= '8') goto yy1194; + yych = *++YYCURSOR; + if (yych <= '/') goto yy1194; + if (yych <= '7') goto yy1193; + goto yy1194; +yy1208: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy1208; + } + goto yy1194; +yy1210: + yych = *++YYCURSOR; + if (yych == '/') goto yy1193; + goto yy1192; +yy1211: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1212; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1212: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1213; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1213: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1214; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1214: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1215; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1215: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1216; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1216: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1217; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1217: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych <= '9') goto yy1193; + goto yy1192; + } else { + if (yych <= 'F') goto yy1193; + if (yych <= '`') goto yy1192; + if (yych <= 'f') goto yy1193; + goto yy1192; + } +yy1218: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1219; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1219: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych >= ':') goto yy1192; + } else { + if (yych <= 'F') goto yy1220; + if (yych <= '`') goto yy1192; + if (yych >= 'g') goto yy1192; + } +yy1220: + yych = *++YYCURSOR; + if (yych <= '@') { + if (yych <= '/') goto yy1192; + if (yych <= '9') goto yy1193; + goto yy1192; + } else { + if (yych <= 'F') goto yy1193; + if (yych <= '`') goto yy1192; + if (yych <= 'f') goto yy1193; + goto yy1192; + } +yy1221: + ++YYCURSOR; + if ((yych = *YYCURSOR) == '/') goto yy1196; + goto yy1192; +} +#line 519 "cpp.re" + +} diff --git a/extern/shiny/Preprocessor/instantiate_cpp_exprgrammar.cpp b/extern/shiny/Preprocessor/instantiate_cpp_exprgrammar.cpp new file mode 100644 index 000000000..7318c29fa --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_cpp_exprgrammar.cpp @@ -0,0 +1,52 @@ +/*============================================================================= + 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 +#include + +#if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 + +#include +#include + +#include +#include + +#include + +// 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; + +// 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 + diff --git a/extern/shiny/Preprocessor/instantiate_cpp_grammar.cpp b/extern/shiny/Preprocessor/instantiate_cpp_grammar.cpp new file mode 100644 index 000000000..89cc3d7f3 --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_cpp_grammar.cpp @@ -0,0 +1,56 @@ +/*============================================================================= + 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 +#include + +#if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 + +#include +#include + +#include +#include + +#include + +// 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 lexer_type; +typedef std::list > + token_sequence_type; + +template struct boost::wave::grammars::cpp_grammar_gen; + +// 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 + diff --git a/extern/shiny/Preprocessor/instantiate_cpp_literalgrs.cpp b/extern/shiny/Preprocessor/instantiate_cpp_literalgrs.cpp new file mode 100644 index 000000000..4fbfb87f2 --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_cpp_literalgrs.cpp @@ -0,0 +1,56 @@ +/*============================================================================= + 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 +#include + +#if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 + +#include + +#include +#include + +#include +#include +#include + +// 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; +#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; +#endif +template struct boost::wave::grammars::chlit_grammar_gen; + +// 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 + diff --git a/extern/shiny/Preprocessor/instantiate_defined_grammar.cpp b/extern/shiny/Preprocessor/instantiate_defined_grammar.cpp new file mode 100644 index 000000000..b7afe3f1e --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_defined_grammar.cpp @@ -0,0 +1,52 @@ +/*============================================================================= + 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 +#include + +#if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 + +#include + +#include +#include + +#include + +// 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 lexer_type; +template struct boost::wave::grammars::defined_grammar_gen; + +// 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 + diff --git a/extern/shiny/Preprocessor/instantiate_predef_macros.cpp b/extern/shiny/Preprocessor/instantiate_predef_macros.cpp new file mode 100644 index 000000000..758ad9734 --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_predef_macros.cpp @@ -0,0 +1,52 @@ +/*============================================================================= + 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 +#include + +#if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 + +#include + +#include +#include + +#include + +// 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 lexer_type; +template struct boost::wave::grammars::predefined_macros_grammar_gen; + +// 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 + diff --git a/extern/shiny/Preprocessor/instantiate_re2c_lexer.cpp b/extern/shiny/Preprocessor/instantiate_re2c_lexer.cpp new file mode 100644 index 000000000..cd1b8898f --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_re2c_lexer.cpp @@ -0,0 +1,65 @@ +/*============================================================================= + 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 +#include // configuration data + +#if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// The following file needs to be included only once throughout the whole +// program. +#include + +// 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 diff --git a/extern/shiny/Preprocessor/instantiate_re2c_lexer_str.cpp b/extern/shiny/Preprocessor/instantiate_re2c_lexer_str.cpp new file mode 100644 index 000000000..138ed6c3b --- /dev/null +++ b/extern/shiny/Preprocessor/instantiate_re2c_lexer_str.cpp @@ -0,0 +1,64 @@ +/*============================================================================= + 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 +#include // configuration data + +#if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// The following file needs to be included only once throughout the whole +// program. +#include + +// 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; +template struct boost::wave::cpplexer::new_lexer_gen; +#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 diff --git a/extern/shiny/Preprocessor/token_ids.cpp b/extern/shiny/Preprocessor/token_ids.cpp new file mode 100644 index 000000000..35e7725b4 --- /dev/null +++ b/extern/shiny/Preprocessor/token_ids.cpp @@ -0,0 +1,447 @@ +/*============================================================================= + 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 + +#include +#include +#include + +#include +#include + +// 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] : ""; +} + +/////////////////////////////////////////////////////////////////////////////// +// 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] : ""; +} + +/////////////////////////////////////////////////////////////////////////////// +} // namespace wave +} // namespace boost + +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + + diff --git a/extern/shiny/Readme.txt b/extern/shiny/Readme.txt new file mode 100644 index 000000000..613321990 --- /dev/null +++ b/extern/shiny/Readme.txt @@ -0,0 +1,33 @@ +shiny - a shader and material management library for OGRE + +FEATURES + +- High-level layer on top of OGRE's material system. It allows you to generate multiple techniques for all your materials from a set of high-level per-material properties. + +- Several available Macros in shader source files. Just a few examples of the possibilities: binding OGRE auto constants, binding uniforms to material properties, foreach loops (repeat shader source a given number of times), retrieving per-material properties in an #if condition, automatic packing for vertex to fragment passthroughs. These macros allow you to generate even very complex shaders (for example the Ogre::Terrain shader) without assembling them in C++ code. + +- Integrated preprocessor (no, I didn't reinvent the wheel, I used boost::wave which turned out to be an excellent choice) that allows me to blend out macros that shouldn't be in use because e.g. the shader permutation doesn't need this specific feature. + +- User settings integration. They can be set by a C++ interface and retrieved through a macro in shader files. + +- Automatic handling of shader permutations, i.e. shaders are shared between materials in a smart way. + +- An optional "meta-language" (well, actually it's just a small header with some conditional defines) that you may use to compile the same shader source for different target languages. If you don't like it, you can still code in GLSL / CG etc separately. You can also switch between the languages at runtime. + +- On-demand material and shader creation. It uses Ogre's material listener to compile the shaders as soon as they are needed for rendering, and not earlier. + +- Shader changes are fully dynamic and real-time. Changing a user setting will recompile all shaders affected by this setting when they are next needed. + +- Serialization system that extends Ogre's material script system, it uses Ogre's script parser, but also adds some additional properties that are not available in Ogre's material system. + +- A concept called "Configuration" allowing you to create a different set of your shaders, doing the same thing except for some minor differences: the properties that are overridden by the active configuration. Possible uses for this are using simpler shaders (no shadows, no fog etc) when rendering for example realtime reflections or a minimap. You can easily switch between configurations by changing the active Ogre material scheme (for example on a viewport level). + +- Fixed function support. You can globally enable or disable shaders at any time, and for texture units you can specify if they're only needed for the shader-based path (e.g. normal maps) or if they should also be created in the fixed function path. + +LICENSE + +see License.txt + +AUTHOR + +scrawl