├── .idea ├── .gitignore ├── ScriptC.iml ├── deployment.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── CMakeLists.txt ├── README.md ├── cmake-build-debug ├── CMakeCache.txt ├── CMakeFiles │ ├── 3.16.5 │ │ ├── CMakeCCompiler.cmake │ │ ├── CMakeCXXCompiler.cmake │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ ├── CMakeRCCompiler.cmake │ │ ├── CMakeSystem.cmake │ │ ├── CompilerIdC │ │ │ ├── CMakeCCompilerId.c │ │ │ └── a.exe │ │ └── CompilerIdCXX │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ └── a.exe │ ├── CMakeDirectoryInformation.cmake │ ├── CMakeOutput.log │ ├── Makefile.cmake │ ├── Makefile2 │ ├── ScriptC.dir │ │ ├── CXX.includecache │ │ ├── DependInfo.cmake │ │ ├── build.make │ │ ├── cmake_clean.cmake │ │ ├── depend.internal │ │ ├── depend.make │ │ ├── flags.make │ │ ├── link.txt │ │ ├── linklibs.rsp │ │ ├── objects.a │ │ ├── objects1.rsp │ │ ├── progress.make │ │ └── src │ │ │ ├── executor.cpp.obj │ │ │ ├── main.cpp.obj │ │ │ ├── parser.cpp.obj │ │ │ └── scaner.cpp.obj │ ├── TargetDirectories.txt │ ├── clion-environment.txt │ ├── clion-log.txt │ ├── cmake.check_cache │ └── progress.marks ├── Makefile ├── ScriptC.cbp ├── ScriptC.exe └── cmake_install.cmake ├── demo ├── 1.png └── 2.png ├── doc ├── DFA.xlsx └── 正则文法与状态机.pdf ├── src ├── executor.cpp ├── main.cpp ├── parser.cpp ├── scaner.cpp └── unitTest.cpp └── test.txt /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /.idea/ScriptC.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.idea/deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | project (ScriptC) 3 | set (CMAKE_CXX_STANDARD 11) 4 | #set(CMAKE_EXE_LINKER_FLAGS "-static") 5 | add_executable(ScriptC src/main.cpp) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 一个编译原理练习程序 2 | 3 | ## 目前支持: 4 | * 变量声明 5 | * if else、while、do while结构语句及嵌套 6 | * 自增操作 7 | * 比较、逻辑、加减乘除运算表达式及组合 8 | * read 和 print 9 | 10 | ## 示例:猜数字游戏脚本 11 | 启动ScriptC,输入脚本test.txt的路径回车执行。数字比预期数字小提示“too small”,比预期数字大提示“too large”,猜中则游戏结束。 12 | 13 | test.txt内容: 14 | ```$xslt 15 | int i,target=55;//还不支持数组和Random 16 | do 17 | { 18 | print "Guess a number and press enter:"; 19 | read i; 20 | if(i>target) 21 | print "Too large!"; 22 | else if(i to get parallel builds 36 | CMAKE_CODEBLOCKS_MAKE_ARGUMENTS:STRING= 37 | 38 | //Enable/Disable color output during build. 39 | CMAKE_COLOR_MAKEFILE:BOOL=ON 40 | 41 | //CXX compiler 42 | CMAKE_CXX_COMPILER:FILEPATH=C:/mingw/mingw64/bin/g++.exe 43 | 44 | //A wrapper around 'ar' adding the appropriate '--plugin' option 45 | // for the GCC compiler 46 | CMAKE_CXX_COMPILER_AR:FILEPATH=C:/mingw/mingw64/bin/gcc-ar.exe 47 | 48 | //A wrapper around 'ranlib' adding the appropriate '--plugin' option 49 | // for the GCC compiler 50 | CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/mingw/mingw64/bin/gcc-ranlib.exe 51 | 52 | //Flags used by the CXX compiler during all build types. 53 | CMAKE_CXX_FLAGS:STRING= 54 | 55 | //Flags used by the CXX compiler during DEBUG builds. 56 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 57 | 58 | //Flags used by the CXX compiler during MINSIZEREL builds. 59 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 60 | 61 | //Flags used by the CXX compiler during RELEASE builds. 62 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 63 | 64 | //Flags used by the CXX compiler during RELWITHDEBINFO builds. 65 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 66 | 67 | //Libraries linked by default with all C++ applications. 68 | CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 69 | 70 | //C compiler 71 | CMAKE_C_COMPILER:FILEPATH=C:/mingw/mingw64/bin/gcc.exe 72 | 73 | //A wrapper around 'ar' adding the appropriate '--plugin' option 74 | // for the GCC compiler 75 | CMAKE_C_COMPILER_AR:FILEPATH=C:/mingw/mingw64/bin/gcc-ar.exe 76 | 77 | //A wrapper around 'ranlib' adding the appropriate '--plugin' option 78 | // for the GCC compiler 79 | CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/mingw/mingw64/bin/gcc-ranlib.exe 80 | 81 | //Flags used by the C compiler during all build types. 82 | CMAKE_C_FLAGS:STRING= 83 | 84 | //Flags used by the C compiler during DEBUG builds. 85 | CMAKE_C_FLAGS_DEBUG:STRING=-g 86 | 87 | //Flags used by the C compiler during MINSIZEREL builds. 88 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 89 | 90 | //Flags used by the C compiler during RELEASE builds. 91 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 92 | 93 | //Flags used by the C compiler during RELWITHDEBINFO builds. 94 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 95 | 96 | //Libraries linked by default with all C applications. 97 | CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 98 | 99 | //Path to a program. 100 | CMAKE_DLLTOOL:FILEPATH=C:/mingw/mingw64/bin/dlltool.exe 101 | 102 | //Flags used by the linker during all build types. 103 | CMAKE_EXE_LINKER_FLAGS:STRING= 104 | 105 | //Flags used by the linker during DEBUG builds. 106 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 107 | 108 | //Flags used by the linker during MINSIZEREL builds. 109 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 110 | 111 | //Flags used by the linker during RELEASE builds. 112 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 113 | 114 | //Flags used by the linker during RELWITHDEBINFO builds. 115 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 116 | 117 | //Convert GNU import libraries to MS format (requires Visual Studio) 118 | CMAKE_GNUtoMS:BOOL=OFF 119 | 120 | //Install path prefix, prepended onto install directories. 121 | CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/ScriptC 122 | 123 | //Path to a program. 124 | CMAKE_LINKER:FILEPATH=C:/mingw/mingw64/bin/ld.exe 125 | 126 | //Path to a program. 127 | CMAKE_MAKE_PROGRAM:FILEPATH=C:/mingw/mingw64/bin/mingw32-make.exe 128 | 129 | //Flags used by the linker during the creation of modules during 130 | // all build types. 131 | CMAKE_MODULE_LINKER_FLAGS:STRING= 132 | 133 | //Flags used by the linker during the creation of modules during 134 | // DEBUG builds. 135 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 136 | 137 | //Flags used by the linker during the creation of modules during 138 | // MINSIZEREL builds. 139 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 140 | 141 | //Flags used by the linker during the creation of modules during 142 | // RELEASE builds. 143 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 144 | 145 | //Flags used by the linker during the creation of modules during 146 | // RELWITHDEBINFO builds. 147 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 148 | 149 | //Path to a program. 150 | CMAKE_NM:FILEPATH=C:/mingw/mingw64/bin/nm.exe 151 | 152 | //Path to a program. 153 | CMAKE_OBJCOPY:FILEPATH=C:/mingw/mingw64/bin/objcopy.exe 154 | 155 | //Path to a program. 156 | CMAKE_OBJDUMP:FILEPATH=C:/mingw/mingw64/bin/objdump.exe 157 | 158 | //Value Computed by CMake 159 | CMAKE_PROJECT_DESCRIPTION:STATIC= 160 | 161 | //Value Computed by CMake 162 | CMAKE_PROJECT_HOMEPAGE_URL:STATIC= 163 | 164 | //Value Computed by CMake 165 | CMAKE_PROJECT_NAME:STATIC=ScriptC 166 | 167 | //Path to a program. 168 | CMAKE_RANLIB:FILEPATH=C:/mingw/mingw64/bin/ranlib.exe 169 | 170 | //RC compiler 171 | CMAKE_RC_COMPILER:FILEPATH=C:/mingw/mingw64/bin/windres.exe 172 | 173 | //Flags for Windows Resource Compiler during all build types. 174 | CMAKE_RC_FLAGS:STRING= 175 | 176 | //Flags for Windows Resource Compiler during DEBUG builds. 177 | CMAKE_RC_FLAGS_DEBUG:STRING= 178 | 179 | //Flags for Windows Resource Compiler during MINSIZEREL builds. 180 | CMAKE_RC_FLAGS_MINSIZEREL:STRING= 181 | 182 | //Flags for Windows Resource Compiler during RELEASE builds. 183 | CMAKE_RC_FLAGS_RELEASE:STRING= 184 | 185 | //Flags for Windows Resource Compiler during RELWITHDEBINFO builds. 186 | CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= 187 | 188 | //Path to a program. 189 | CMAKE_READELF:FILEPATH=C:/mingw/mingw64/bin/readelf.exe 190 | 191 | //Path to a program. 192 | CMAKE_SH:FILEPATH=CMAKE_SH-NOTFOUND 193 | 194 | //Flags used by the linker during the creation of shared libraries 195 | // during all build types. 196 | CMAKE_SHARED_LINKER_FLAGS:STRING= 197 | 198 | //Flags used by the linker during the creation of shared libraries 199 | // during DEBUG builds. 200 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 201 | 202 | //Flags used by the linker during the creation of shared libraries 203 | // during MINSIZEREL builds. 204 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 205 | 206 | //Flags used by the linker during the creation of shared libraries 207 | // during RELEASE builds. 208 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 209 | 210 | //Flags used by the linker during the creation of shared libraries 211 | // during RELWITHDEBINFO builds. 212 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 213 | 214 | //If set, runtime paths are not added when installing shared libraries, 215 | // but are added when building. 216 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 217 | 218 | //If set, runtime paths are not added when using shared libraries. 219 | CMAKE_SKIP_RPATH:BOOL=NO 220 | 221 | //Flags used by the linker during the creation of static libraries 222 | // during all build types. 223 | CMAKE_STATIC_LINKER_FLAGS:STRING= 224 | 225 | //Flags used by the linker during the creation of static libraries 226 | // during DEBUG builds. 227 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 228 | 229 | //Flags used by the linker during the creation of static libraries 230 | // during MINSIZEREL builds. 231 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 232 | 233 | //Flags used by the linker during the creation of static libraries 234 | // during RELEASE builds. 235 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 236 | 237 | //Flags used by the linker during the creation of static libraries 238 | // during RELWITHDEBINFO builds. 239 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 240 | 241 | //Path to a program. 242 | CMAKE_STRIP:FILEPATH=C:/mingw/mingw64/bin/strip.exe 243 | 244 | //If this value is on, makefiles will be generated without the 245 | // .SILENT directive, and all commands will be echoed to the console 246 | // during the make. This is useful for debugging only. With Visual 247 | // Studio IDE projects all commands are done without /nologo. 248 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 249 | 250 | //Value Computed by CMake 251 | ScriptC_BINARY_DIR:STATIC=C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug 252 | 253 | //Value Computed by CMake 254 | ScriptC_SOURCE_DIR:STATIC=C:/Users/Yorkin/prj/cpp/ScriptC 255 | 256 | 257 | ######################## 258 | # INTERNAL cache entries 259 | ######################## 260 | 261 | //ADVANCED property for variable: CMAKE_ADDR2LINE 262 | CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 263 | //ADVANCED property for variable: CMAKE_AR 264 | CMAKE_AR-ADVANCED:INTERNAL=1 265 | //This is the directory where this CMakeCache.txt was created 266 | CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug 267 | //Major version of cmake used to create the current loaded cache 268 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 269 | //Minor version of cmake used to create the current loaded cache 270 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=16 271 | //Patch version of cmake used to create the current loaded cache 272 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=5 273 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 274 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 275 | //Path to CMake executable. 276 | CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/bin/cmake.exe 277 | //Path to cpack program executable. 278 | CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/bin/cpack.exe 279 | //Path to ctest program executable. 280 | CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/bin/ctest.exe 281 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 282 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 283 | //ADVANCED property for variable: CMAKE_CXX_COMPILER_AR 284 | CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 285 | //ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB 286 | CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 287 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 288 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 289 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 290 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 291 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 292 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 293 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 294 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 295 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 296 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 297 | //ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES 298 | CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 299 | //ADVANCED property for variable: CMAKE_C_COMPILER 300 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 301 | //ADVANCED property for variable: CMAKE_C_COMPILER_AR 302 | CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 303 | //ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB 304 | CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 305 | //ADVANCED property for variable: CMAKE_C_FLAGS 306 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 307 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 308 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 309 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 310 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 311 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 312 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 313 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 314 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 315 | //ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES 316 | CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 317 | //ADVANCED property for variable: CMAKE_DLLTOOL 318 | CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 319 | //Executable file format 320 | CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown 321 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 322 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 323 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 324 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 325 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 326 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 327 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 328 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 329 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 330 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 331 | //Name of external makefile project generator. 332 | CMAKE_EXTRA_GENERATOR:INTERNAL=CodeBlocks 333 | //CXX compiler system defined macros 334 | CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS:INTERNAL=__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;6;__GNUC_MINOR__;4;__GNUC_PATCHLEVEL__;0;__VERSION__;"6.4.0";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1010;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST16_MAX__;0x7fff;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859812e+38F;__FLT_MIN__;1.17549435082228750797e-38F;__FLT_EPSILON__;1.19209289550781250000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570815e+308L);__DBL_MIN__;((double)2.22507385850720138309e-308L);__DBL_EPSILON__;((double)2.22044604925031308085e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544177e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502e+4932L;__LDBL_MIN__;3.36210314311209350626e-4932L;__LDBL_EPSILON__;1.08420217248550443401e-19L;__LDBL_DENORM_MIN__;3.64519953188247460253e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1;__STDC__;1;__cplusplus;201402L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;6;__GNUC_MINOR__;4;__GNUC_PATCHLEVEL__;0;__VERSION__;"6.4.0";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__GNUG__;6;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_WEAK__;1;__DEPRECATED;1;__GXX_RTTI;1;__cpp_rtti;199711;__GXX_EXPERIMENTAL_CXX0X__;1;__cpp_binary_literals;201304;__cpp_hex_float;201603;__cpp_runtime_arrays;198712;__cpp_unicode_characters;200704;__cpp_raw_strings;200710;__cpp_unicode_literals;200710;__cpp_user_defined_literals;200809;__cpp_lambdas;200907;__cpp_range_based_for;200907;__cpp_static_assert;200410;__cpp_decltype;200707;__cpp_attributes;200809;__cpp_rvalue_reference;200610;__cpp_rvalue_references;200610;__cpp_variadic_templates;200704;__cpp_initializer_lists;200806;__cpp_delegating_constructors;200604;__cpp_nsdmi;200809;__cpp_inheriting_constructors;200802;__cpp_ref_qualifiers;200710;__cpp_alias_templates;200704;__cpp_return_type_deduction;201304;__cpp_init_captures;201304;__cpp_generic_lambdas;201304;__cpp_constexpr;201304;__cpp_decltype_auto;201304;__cpp_aggregate_nsdmi;201304;__cpp_variable_templates;201304;__cpp_digit_separators;201309;__cpp_sized_deallocation;201309;__EXCEPTIONS;1;__cpp_exceptions;199711;__GXX_ABI_VERSION;1010;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__GLIBCXX_TYPE_INT_N_0;__int128;__GLIBCXX_BITSIZE_INT_N_0;128;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST16_MAX__;0x7fff;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859812e+38F;__FLT_MIN__;1.17549435082228750797e-38F;__FLT_EPSILON__;1.19209289550781250000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;double(1.79769313486231570815e+308L);__DBL_MIN__;double(2.22507385850720138309e-308L);__DBL_EPSILON__;double(2.22044604925031308085e-16L);__DBL_DENORM_MIN__;double(4.94065645841246544177e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502e+4932L;__LDBL_MIN__;3.36210314311209350626e-4932L;__LDBL_EPSILON__;1.08420217248550443401e-19L;__LDBL_DENORM_MIN__;3.64519953188247460253e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__WCHAR_UNSIGNED__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1 335 | //CXX compiler system include directories 336 | CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS:INTERNAL=C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++/x86_64-w64-mingw32;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++/backward;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include-fixed;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/include 337 | //C compiler system defined macros 338 | CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS:INTERNAL=__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;6;__GNUC_MINOR__;4;__GNUC_PATCHLEVEL__;0;__VERSION__;"6.4.0";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1010;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST16_MAX__;0x7fff;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859812e+38F;__FLT_MIN__;1.17549435082228750797e-38F;__FLT_EPSILON__;1.19209289550781250000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570815e+308L);__DBL_MIN__;((double)2.22507385850720138309e-308L);__DBL_EPSILON__;((double)2.22044604925031308085e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544177e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502e+4932L;__LDBL_MIN__;3.36210314311209350626e-4932L;__LDBL_EPSILON__;1.08420217248550443401e-19L;__LDBL_DENORM_MIN__;3.64519953188247460253e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1 339 | //C compiler system include directories 340 | CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS:INTERNAL=C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/include-fixed;C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/include 341 | //Name of generator. 342 | CMAKE_GENERATOR:INTERNAL=MinGW Makefiles 343 | //Generator instance identifier. 344 | CMAKE_GENERATOR_INSTANCE:INTERNAL= 345 | //Name of generator platform. 346 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 347 | //Name of generator toolset. 348 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 349 | //Source directory with the top level CMakeLists.txt file for this 350 | // project 351 | CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/Yorkin/prj/cpp/ScriptC 352 | //ADVANCED property for variable: CMAKE_LINKER 353 | CMAKE_LINKER-ADVANCED:INTERNAL=1 354 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 355 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 356 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 357 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 358 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 359 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 360 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 361 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 362 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 363 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 364 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 365 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 366 | //ADVANCED property for variable: CMAKE_NM 367 | CMAKE_NM-ADVANCED:INTERNAL=1 368 | //number of local generators 369 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 370 | //ADVANCED property for variable: CMAKE_OBJCOPY 371 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 372 | //ADVANCED property for variable: CMAKE_OBJDUMP 373 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 374 | //Platform information initialized 375 | CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 376 | //ADVANCED property for variable: CMAKE_RANLIB 377 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 378 | //ADVANCED property for variable: CMAKE_RC_COMPILER 379 | CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 380 | CMAKE_RC_COMPILER_WORKS:INTERNAL=1 381 | //ADVANCED property for variable: CMAKE_RC_FLAGS 382 | CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 383 | //ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG 384 | CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 385 | //ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL 386 | CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 387 | //ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE 388 | CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 389 | //ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO 390 | CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 391 | //ADVANCED property for variable: CMAKE_READELF 392 | CMAKE_READELF-ADVANCED:INTERNAL=1 393 | //Path to CMake installation. 394 | CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16 395 | //ADVANCED property for variable: CMAKE_SH 396 | CMAKE_SH-ADVANCED:INTERNAL=1 397 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 398 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 399 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 400 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 401 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 402 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 403 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 404 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 405 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 406 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 407 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 408 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 409 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 410 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 411 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 412 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 413 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 414 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 415 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 416 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 417 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 418 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 419 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 420 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 421 | //ADVANCED property for variable: CMAKE_STRIP 422 | CMAKE_STRIP-ADVANCED:INTERNAL=1 423 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 424 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 425 | 426 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "C:/mingw/mingw64/bin/gcc.exe") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "6.4.0") 5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_C_COMPILER_WRAPPER "") 7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") 9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") 10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") 11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") 12 | 13 | set(CMAKE_C_PLATFORM_ID "MinGW") 14 | set(CMAKE_C_SIMULATE_ID "") 15 | set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") 16 | set(CMAKE_C_SIMULATE_VERSION "") 17 | 18 | 19 | 20 | set(CMAKE_AR "C:/mingw/mingw64/bin/ar.exe") 21 | set(CMAKE_C_COMPILER_AR "C:/mingw/mingw64/bin/gcc-ar.exe") 22 | set(CMAKE_RANLIB "C:/mingw/mingw64/bin/ranlib.exe") 23 | set(CMAKE_C_COMPILER_RANLIB "C:/mingw/mingw64/bin/gcc-ranlib.exe") 24 | set(CMAKE_LINKER "C:/mingw/mingw64/bin/ld.exe") 25 | set(CMAKE_MT "") 26 | set(CMAKE_COMPILER_IS_GNUCC 1) 27 | set(CMAKE_C_COMPILER_LOADED 1) 28 | set(CMAKE_C_COMPILER_WORKS TRUE) 29 | set(CMAKE_C_ABI_COMPILED TRUE) 30 | set(CMAKE_COMPILER_IS_MINGW 1) 31 | set(CMAKE_COMPILER_IS_CYGWIN ) 32 | if(CMAKE_COMPILER_IS_CYGWIN) 33 | set(CYGWIN 1) 34 | set(UNIX 1) 35 | endif() 36 | 37 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 38 | 39 | if(CMAKE_COMPILER_IS_MINGW) 40 | set(MINGW 1) 41 | endif() 42 | set(CMAKE_C_COMPILER_ID_RUN 1) 43 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 44 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 45 | set(CMAKE_C_LINKER_PREFERENCE 10) 46 | 47 | # Save compiler ABI information. 48 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 49 | set(CMAKE_C_COMPILER_ABI "") 50 | set(CMAKE_C_LIBRARY_ARCHITECTURE "") 51 | 52 | if(CMAKE_C_SIZEOF_DATA_PTR) 53 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 54 | endif() 55 | 56 | if(CMAKE_C_COMPILER_ABI) 57 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 58 | endif() 59 | 60 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 61 | set(CMAKE_LIBRARY_ARCHITECTURE "") 62 | endif() 63 | 64 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 65 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 66 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 67 | endif() 68 | 69 | 70 | 71 | 72 | 73 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include;C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include-fixed;C:/mingw/mingw64/x86_64-w64-mingw32/include") 74 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mingw32;gcc;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex") 75 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0;C:/mingw/mingw64/lib/gcc;C:/mingw/mingw64/x86_64-w64-mingw32/lib;C:/mingw/mingw64/lib") 76 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 77 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "C:/mingw/mingw64/bin/g++.exe") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "6.4.0") 5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_CXX_COMPILER_WRAPPER "") 7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") 8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") 9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") 10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") 13 | set(CMAKE_CXX20_COMPILE_FEATURES "") 14 | 15 | set(CMAKE_CXX_PLATFORM_ID "MinGW") 16 | set(CMAKE_CXX_SIMULATE_ID "") 17 | set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") 18 | set(CMAKE_CXX_SIMULATE_VERSION "") 19 | 20 | 21 | 22 | set(CMAKE_AR "C:/mingw/mingw64/bin/ar.exe") 23 | set(CMAKE_CXX_COMPILER_AR "C:/mingw/mingw64/bin/gcc-ar.exe") 24 | set(CMAKE_RANLIB "C:/mingw/mingw64/bin/ranlib.exe") 25 | set(CMAKE_CXX_COMPILER_RANLIB "C:/mingw/mingw64/bin/gcc-ranlib.exe") 26 | set(CMAKE_LINKER "C:/mingw/mingw64/bin/ld.exe") 27 | set(CMAKE_MT "") 28 | set(CMAKE_COMPILER_IS_GNUCXX 1) 29 | set(CMAKE_CXX_COMPILER_LOADED 1) 30 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 31 | set(CMAKE_CXX_ABI_COMPILED TRUE) 32 | set(CMAKE_COMPILER_IS_MINGW 1) 33 | set(CMAKE_COMPILER_IS_CYGWIN ) 34 | if(CMAKE_COMPILER_IS_CYGWIN) 35 | set(CYGWIN 1) 36 | set(UNIX 1) 37 | endif() 38 | 39 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 40 | 41 | if(CMAKE_COMPILER_IS_MINGW) 42 | set(MINGW 1) 43 | endif() 44 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 45 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) 46 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 47 | 48 | foreach (lang C OBJC OBJCXX) 49 | if (CMAKE_${lang}_COMPILER_ID_RUN) 50 | foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) 51 | list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) 52 | endforeach() 53 | endif() 54 | endforeach() 55 | 56 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 57 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 58 | 59 | # Save compiler ABI information. 60 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 61 | set(CMAKE_CXX_COMPILER_ABI "") 62 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") 63 | 64 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 65 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 66 | endif() 67 | 68 | if(CMAKE_CXX_COMPILER_ABI) 69 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 70 | endif() 71 | 72 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 73 | set(CMAKE_LIBRARY_ARCHITECTURE "") 74 | endif() 75 | 76 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 77 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 78 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 79 | endif() 80 | 81 | 82 | 83 | 84 | 85 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++;C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++/x86_64-w64-mingw32;C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include/c++/backward;C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include;C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0/include-fixed;C:/mingw/mingw64/x86_64-w64-mingw32/include") 86 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;mingw32;gcc_s;gcc;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc_s;gcc;moldname;mingwex") 87 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "C:/mingw/mingw64/lib/gcc/x86_64-w64-mingw32/6.4.0;C:/mingw/mingw64/lib/gcc;C:/mingw/mingw64/x86_64-w64-mingw32/lib;C:/mingw/mingw64/lib") 88 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 89 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/3.16.5/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/3.16.5/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CMakeRCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_RC_COMPILER "C:/mingw/mingw64/bin/windres.exe") 2 | set(CMAKE_RC_COMPILER_ARG1 "") 3 | set(CMAKE_RC_COMPILER_LOADED 1) 4 | set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) 5 | set(CMAKE_RC_OUTPUT_EXTENSION .obj) 6 | set(CMAKE_RC_COMPILER_ENV_VAR "RC") 7 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Windows-10.0.18363") 2 | set(CMAKE_HOST_SYSTEM_NAME "Windows") 3 | set(CMAKE_HOST_SYSTEM_VERSION "10.0.18363") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Windows-10.0.18363") 9 | set(CMAKE_SYSTEM_NAME "Windows") 10 | set(CMAKE_SYSTEM_VERSION "10.0.18363") 11 | set(CMAKE_SYSTEM_PROCESSOR "AMD64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CompilerIdC/CMakeCCompilerId.c: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | # error "A C++ compiler has been selected for C." 3 | #endif 4 | 5 | #if defined(__18CXX) 6 | # define ID_VOID_MAIN 7 | #endif 8 | #if defined(__CLASSIC_C__) 9 | /* cv-qualifiers did not exist in K&R C */ 10 | # define const 11 | # define volatile 12 | #endif 13 | 14 | 15 | /* Version number components: V=Version, R=Revision, P=Patch 16 | Version date components: YYYY=Year, MM=Month, DD=Day */ 17 | 18 | #if defined(__INTEL_COMPILER) || defined(__ICC) 19 | # define COMPILER_ID "Intel" 20 | # if defined(_MSC_VER) 21 | # define SIMULATE_ID "MSVC" 22 | # endif 23 | # if defined(__GNUC__) 24 | # define SIMULATE_ID "GNU" 25 | # endif 26 | /* __INTEL_COMPILER = VRP */ 27 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 28 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 29 | # if defined(__INTEL_COMPILER_UPDATE) 30 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 31 | # else 32 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 33 | # endif 34 | # if defined(__INTEL_COMPILER_BUILD_DATE) 35 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 36 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 37 | # endif 38 | # if defined(_MSC_VER) 39 | /* _MSC_VER = VVRR */ 40 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 41 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 42 | # endif 43 | # if defined(__GNUC__) 44 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 45 | # elif defined(__GNUG__) 46 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 47 | # endif 48 | # if defined(__GNUC_MINOR__) 49 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 50 | # endif 51 | # if defined(__GNUC_PATCHLEVEL__) 52 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 53 | # endif 54 | 55 | #elif defined(__PATHCC__) 56 | # define COMPILER_ID "PathScale" 57 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 58 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 59 | # if defined(__PATHCC_PATCHLEVEL__) 60 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 61 | # endif 62 | 63 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 64 | # define COMPILER_ID "Embarcadero" 65 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 66 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 67 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 68 | 69 | #elif defined(__BORLANDC__) 70 | # define COMPILER_ID "Borland" 71 | /* __BORLANDC__ = 0xVRR */ 72 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 73 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 74 | 75 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 76 | # define COMPILER_ID "Watcom" 77 | /* __WATCOMC__ = VVRR */ 78 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 79 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 80 | # if (__WATCOMC__ % 10) > 0 81 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 82 | # endif 83 | 84 | #elif defined(__WATCOMC__) 85 | # define COMPILER_ID "OpenWatcom" 86 | /* __WATCOMC__ = VVRP + 1100 */ 87 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 88 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 89 | # if (__WATCOMC__ % 10) > 0 90 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 91 | # endif 92 | 93 | #elif defined(__SUNPRO_C) 94 | # define COMPILER_ID "SunPro" 95 | # if __SUNPRO_C >= 0x5100 96 | /* __SUNPRO_C = 0xVRRP */ 97 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) 98 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) 99 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 100 | # else 101 | /* __SUNPRO_CC = 0xVRP */ 102 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) 103 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) 104 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 105 | # endif 106 | 107 | #elif defined(__HP_cc) 108 | # define COMPILER_ID "HP" 109 | /* __HP_cc = VVRRPP */ 110 | # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) 111 | # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) 112 | # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) 113 | 114 | #elif defined(__DECC) 115 | # define COMPILER_ID "Compaq" 116 | /* __DECC_VER = VVRRTPPPP */ 117 | # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) 118 | # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) 119 | # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) 120 | 121 | #elif defined(__IBMC__) && defined(__COMPILER_VER__) 122 | # define COMPILER_ID "zOS" 123 | /* __IBMC__ = VRP */ 124 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 125 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 126 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 127 | 128 | #elif defined(__ibmxl__) && defined(__clang__) 129 | # define COMPILER_ID "XLClang" 130 | # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 131 | # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 132 | # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 133 | # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 134 | 135 | 136 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 137 | # define COMPILER_ID "XL" 138 | /* __IBMC__ = VRP */ 139 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 140 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 141 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 142 | 143 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 144 | # define COMPILER_ID "VisualAge" 145 | /* __IBMC__ = VRP */ 146 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 147 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 148 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 149 | 150 | #elif defined(__PGI) 151 | # define COMPILER_ID "PGI" 152 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 153 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 154 | # if defined(__PGIC_PATCHLEVEL__) 155 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 156 | # endif 157 | 158 | #elif defined(_CRAYC) 159 | # define COMPILER_ID "Cray" 160 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 161 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 162 | 163 | #elif defined(__TI_COMPILER_VERSION__) 164 | # define COMPILER_ID "TI" 165 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 166 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 167 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 168 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 169 | 170 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 171 | # define COMPILER_ID "Fujitsu" 172 | 173 | #elif defined(__ghs__) 174 | # define COMPILER_ID "GHS" 175 | /* __GHS_VERSION_NUMBER = VVVVRP */ 176 | # ifdef __GHS_VERSION_NUMBER 177 | # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 178 | # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 179 | # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 180 | # endif 181 | 182 | #elif defined(__TINYC__) 183 | # define COMPILER_ID "TinyCC" 184 | 185 | #elif defined(__BCC__) 186 | # define COMPILER_ID "Bruce" 187 | 188 | #elif defined(__SCO_VERSION__) 189 | # define COMPILER_ID "SCO" 190 | 191 | #elif defined(__ARMCC_VERSION) && !defined(__clang__) 192 | # define COMPILER_ID "ARMCC" 193 | #if __ARMCC_VERSION >= 1000000 194 | /* __ARMCC_VERSION = VRRPPPP */ 195 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 196 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 197 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 198 | #else 199 | /* __ARMCC_VERSION = VRPPPP */ 200 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 201 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 202 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 203 | #endif 204 | 205 | 206 | #elif defined(__clang__) && defined(__apple_build_version__) 207 | # define COMPILER_ID "AppleClang" 208 | # if defined(_MSC_VER) 209 | # define SIMULATE_ID "MSVC" 210 | # endif 211 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 212 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 213 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 214 | # if defined(_MSC_VER) 215 | /* _MSC_VER = VVRR */ 216 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 217 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 218 | # endif 219 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 220 | 221 | #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) 222 | # define COMPILER_ID "ARMClang" 223 | # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) 224 | # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) 225 | # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) 226 | # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) 227 | 228 | #elif defined(__clang__) 229 | # define COMPILER_ID "Clang" 230 | # if defined(_MSC_VER) 231 | # define SIMULATE_ID "MSVC" 232 | # endif 233 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 234 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 235 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 236 | # if defined(_MSC_VER) 237 | /* _MSC_VER = VVRR */ 238 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 239 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 240 | # endif 241 | 242 | #elif defined(__GNUC__) 243 | # define COMPILER_ID "GNU" 244 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 245 | # if defined(__GNUC_MINOR__) 246 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 247 | # endif 248 | # if defined(__GNUC_PATCHLEVEL__) 249 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 250 | # endif 251 | 252 | #elif defined(_MSC_VER) 253 | # define COMPILER_ID "MSVC" 254 | /* _MSC_VER = VVRR */ 255 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 256 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 257 | # if defined(_MSC_FULL_VER) 258 | # if _MSC_VER >= 1400 259 | /* _MSC_FULL_VER = VVRRPPPPP */ 260 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 261 | # else 262 | /* _MSC_FULL_VER = VVRRPPPP */ 263 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 264 | # endif 265 | # endif 266 | # if defined(_MSC_BUILD) 267 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 268 | # endif 269 | 270 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 271 | # define COMPILER_ID "ADSP" 272 | #if defined(__VISUALDSPVERSION__) 273 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 274 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 275 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 276 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 277 | #endif 278 | 279 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 280 | # define COMPILER_ID "IAR" 281 | # if defined(__VER__) && defined(__ICCARM__) 282 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 283 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 284 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 285 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 286 | # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) 287 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 288 | # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 289 | # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 290 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 291 | # endif 292 | 293 | #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) 294 | # define COMPILER_ID "SDCC" 295 | # if defined(__SDCC_VERSION_MAJOR) 296 | # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) 297 | # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) 298 | # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) 299 | # else 300 | /* SDCC = VRP */ 301 | # define COMPILER_VERSION_MAJOR DEC(SDCC/100) 302 | # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) 303 | # define COMPILER_VERSION_PATCH DEC(SDCC % 10) 304 | # endif 305 | 306 | 307 | /* These compilers are either not known or too old to define an 308 | identification macro. Try to identify the platform and guess that 309 | it is the native compiler. */ 310 | #elif defined(__hpux) || defined(__hpua) 311 | # define COMPILER_ID "HP" 312 | 313 | #else /* unknown compiler */ 314 | # define COMPILER_ID "" 315 | #endif 316 | 317 | /* Construct the string literal in pieces to prevent the source from 318 | getting matched. Store it in a pointer rather than an array 319 | because some compilers will just produce instructions to fill the 320 | array rather than assigning a pointer to a static array. */ 321 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 322 | #ifdef SIMULATE_ID 323 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 324 | #endif 325 | 326 | #ifdef __QNXNTO__ 327 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 328 | #endif 329 | 330 | #if defined(__CRAYXE) || defined(__CRAYXC) 331 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 332 | #endif 333 | 334 | #define STRINGIFY_HELPER(X) #X 335 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 336 | 337 | /* Identify known platforms by name. */ 338 | #if defined(__linux) || defined(__linux__) || defined(linux) 339 | # define PLATFORM_ID "Linux" 340 | 341 | #elif defined(__CYGWIN__) 342 | # define PLATFORM_ID "Cygwin" 343 | 344 | #elif defined(__MINGW32__) 345 | # define PLATFORM_ID "MinGW" 346 | 347 | #elif defined(__APPLE__) 348 | # define PLATFORM_ID "Darwin" 349 | 350 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 351 | # define PLATFORM_ID "Windows" 352 | 353 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 354 | # define PLATFORM_ID "FreeBSD" 355 | 356 | #elif defined(__NetBSD__) || defined(__NetBSD) 357 | # define PLATFORM_ID "NetBSD" 358 | 359 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 360 | # define PLATFORM_ID "OpenBSD" 361 | 362 | #elif defined(__sun) || defined(sun) 363 | # define PLATFORM_ID "SunOS" 364 | 365 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 366 | # define PLATFORM_ID "AIX" 367 | 368 | #elif defined(__hpux) || defined(__hpux__) 369 | # define PLATFORM_ID "HP-UX" 370 | 371 | #elif defined(__HAIKU__) 372 | # define PLATFORM_ID "Haiku" 373 | 374 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 375 | # define PLATFORM_ID "BeOS" 376 | 377 | #elif defined(__QNX__) || defined(__QNXNTO__) 378 | # define PLATFORM_ID "QNX" 379 | 380 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 381 | # define PLATFORM_ID "Tru64" 382 | 383 | #elif defined(__riscos) || defined(__riscos__) 384 | # define PLATFORM_ID "RISCos" 385 | 386 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 387 | # define PLATFORM_ID "SINIX" 388 | 389 | #elif defined(__UNIX_SV__) 390 | # define PLATFORM_ID "UNIX_SV" 391 | 392 | #elif defined(__bsdos__) 393 | # define PLATFORM_ID "BSDOS" 394 | 395 | #elif defined(_MPRAS) || defined(MPRAS) 396 | # define PLATFORM_ID "MP-RAS" 397 | 398 | #elif defined(__osf) || defined(__osf__) 399 | # define PLATFORM_ID "OSF1" 400 | 401 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 402 | # define PLATFORM_ID "SCO_SV" 403 | 404 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 405 | # define PLATFORM_ID "ULTRIX" 406 | 407 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 408 | # define PLATFORM_ID "Xenix" 409 | 410 | #elif defined(__WATCOMC__) 411 | # if defined(__LINUX__) 412 | # define PLATFORM_ID "Linux" 413 | 414 | # elif defined(__DOS__) 415 | # define PLATFORM_ID "DOS" 416 | 417 | # elif defined(__OS2__) 418 | # define PLATFORM_ID "OS2" 419 | 420 | # elif defined(__WINDOWS__) 421 | # define PLATFORM_ID "Windows3x" 422 | 423 | # else /* unknown platform */ 424 | # define PLATFORM_ID 425 | # endif 426 | 427 | #elif defined(__INTEGRITY) 428 | # if defined(INT_178B) 429 | # define PLATFORM_ID "Integrity178" 430 | 431 | # else /* regular Integrity */ 432 | # define PLATFORM_ID "Integrity" 433 | # endif 434 | 435 | #else /* unknown platform */ 436 | # define PLATFORM_ID 437 | 438 | #endif 439 | 440 | /* For windows compilers MSVC and Intel we can determine 441 | the architecture of the compiler being used. This is because 442 | the compilers do not have flags that can change the architecture, 443 | but rather depend on which compiler is being used 444 | */ 445 | #if defined(_WIN32) && defined(_MSC_VER) 446 | # if defined(_M_IA64) 447 | # define ARCHITECTURE_ID "IA64" 448 | 449 | # elif defined(_M_X64) || defined(_M_AMD64) 450 | # define ARCHITECTURE_ID "x64" 451 | 452 | # elif defined(_M_IX86) 453 | # define ARCHITECTURE_ID "X86" 454 | 455 | # elif defined(_M_ARM64) 456 | # define ARCHITECTURE_ID "ARM64" 457 | 458 | # elif defined(_M_ARM) 459 | # if _M_ARM == 4 460 | # define ARCHITECTURE_ID "ARMV4I" 461 | # elif _M_ARM == 5 462 | # define ARCHITECTURE_ID "ARMV5I" 463 | # else 464 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 465 | # endif 466 | 467 | # elif defined(_M_MIPS) 468 | # define ARCHITECTURE_ID "MIPS" 469 | 470 | # elif defined(_M_SH) 471 | # define ARCHITECTURE_ID "SHx" 472 | 473 | # else /* unknown architecture */ 474 | # define ARCHITECTURE_ID "" 475 | # endif 476 | 477 | #elif defined(__WATCOMC__) 478 | # if defined(_M_I86) 479 | # define ARCHITECTURE_ID "I86" 480 | 481 | # elif defined(_M_IX86) 482 | # define ARCHITECTURE_ID "X86" 483 | 484 | # else /* unknown architecture */ 485 | # define ARCHITECTURE_ID "" 486 | # endif 487 | 488 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 489 | # if defined(__ICCARM__) 490 | # define ARCHITECTURE_ID "ARM" 491 | 492 | # elif defined(__ICCRX__) 493 | # define ARCHITECTURE_ID "RX" 494 | 495 | # elif defined(__ICCRH850__) 496 | # define ARCHITECTURE_ID "RH850" 497 | 498 | # elif defined(__ICCRL78__) 499 | # define ARCHITECTURE_ID "RL78" 500 | 501 | # elif defined(__ICCRISCV__) 502 | # define ARCHITECTURE_ID "RISCV" 503 | 504 | # elif defined(__ICCAVR__) 505 | # define ARCHITECTURE_ID "AVR" 506 | 507 | # elif defined(__ICC430__) 508 | # define ARCHITECTURE_ID "MSP430" 509 | 510 | # elif defined(__ICCV850__) 511 | # define ARCHITECTURE_ID "V850" 512 | 513 | # elif defined(__ICC8051__) 514 | # define ARCHITECTURE_ID "8051" 515 | 516 | # else /* unknown architecture */ 517 | # define ARCHITECTURE_ID "" 518 | # endif 519 | 520 | #elif defined(__ghs__) 521 | # if defined(__PPC64__) 522 | # define ARCHITECTURE_ID "PPC64" 523 | 524 | # elif defined(__ppc__) 525 | # define ARCHITECTURE_ID "PPC" 526 | 527 | # elif defined(__ARM__) 528 | # define ARCHITECTURE_ID "ARM" 529 | 530 | # elif defined(__x86_64__) 531 | # define ARCHITECTURE_ID "x64" 532 | 533 | # elif defined(__i386__) 534 | # define ARCHITECTURE_ID "X86" 535 | 536 | # else /* unknown architecture */ 537 | # define ARCHITECTURE_ID "" 538 | # endif 539 | #else 540 | # define ARCHITECTURE_ID 541 | #endif 542 | 543 | /* Convert integer to decimal digit literals. */ 544 | #define DEC(n) \ 545 | ('0' + (((n) / 10000000)%10)), \ 546 | ('0' + (((n) / 1000000)%10)), \ 547 | ('0' + (((n) / 100000)%10)), \ 548 | ('0' + (((n) / 10000)%10)), \ 549 | ('0' + (((n) / 1000)%10)), \ 550 | ('0' + (((n) / 100)%10)), \ 551 | ('0' + (((n) / 10)%10)), \ 552 | ('0' + ((n) % 10)) 553 | 554 | /* Convert integer to hex digit literals. */ 555 | #define HEX(n) \ 556 | ('0' + ((n)>>28 & 0xF)), \ 557 | ('0' + ((n)>>24 & 0xF)), \ 558 | ('0' + ((n)>>20 & 0xF)), \ 559 | ('0' + ((n)>>16 & 0xF)), \ 560 | ('0' + ((n)>>12 & 0xF)), \ 561 | ('0' + ((n)>>8 & 0xF)), \ 562 | ('0' + ((n)>>4 & 0xF)), \ 563 | ('0' + ((n) & 0xF)) 564 | 565 | /* Construct a string literal encoding the version number components. */ 566 | #ifdef COMPILER_VERSION_MAJOR 567 | char const info_version[] = { 568 | 'I', 'N', 'F', 'O', ':', 569 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 570 | COMPILER_VERSION_MAJOR, 571 | # ifdef COMPILER_VERSION_MINOR 572 | '.', COMPILER_VERSION_MINOR, 573 | # ifdef COMPILER_VERSION_PATCH 574 | '.', COMPILER_VERSION_PATCH, 575 | # ifdef COMPILER_VERSION_TWEAK 576 | '.', COMPILER_VERSION_TWEAK, 577 | # endif 578 | # endif 579 | # endif 580 | ']','\0'}; 581 | #endif 582 | 583 | /* Construct a string literal encoding the internal version number. */ 584 | #ifdef COMPILER_VERSION_INTERNAL 585 | char const info_version_internal[] = { 586 | 'I', 'N', 'F', 'O', ':', 587 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', 588 | 'i','n','t','e','r','n','a','l','[', 589 | COMPILER_VERSION_INTERNAL,']','\0'}; 590 | #endif 591 | 592 | /* Construct a string literal encoding the version number components. */ 593 | #ifdef SIMULATE_VERSION_MAJOR 594 | char const info_simulate_version[] = { 595 | 'I', 'N', 'F', 'O', ':', 596 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 597 | SIMULATE_VERSION_MAJOR, 598 | # ifdef SIMULATE_VERSION_MINOR 599 | '.', SIMULATE_VERSION_MINOR, 600 | # ifdef SIMULATE_VERSION_PATCH 601 | '.', SIMULATE_VERSION_PATCH, 602 | # ifdef SIMULATE_VERSION_TWEAK 603 | '.', SIMULATE_VERSION_TWEAK, 604 | # endif 605 | # endif 606 | # endif 607 | ']','\0'}; 608 | #endif 609 | 610 | /* Construct the string literal in pieces to prevent the source from 611 | getting matched. Store it in a pointer rather than an array 612 | because some compilers will just produce instructions to fill the 613 | array rather than assigning a pointer to a static array. */ 614 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 615 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 616 | 617 | 618 | 619 | 620 | #if !defined(__STDC__) 621 | # if (defined(_MSC_VER) && !defined(__clang__)) \ 622 | || (defined(__ibmxl__) || defined(__IBMC__)) 623 | # define C_DIALECT "90" 624 | # else 625 | # define C_DIALECT 626 | # endif 627 | #elif __STDC_VERSION__ >= 201000L 628 | # define C_DIALECT "11" 629 | #elif __STDC_VERSION__ >= 199901L 630 | # define C_DIALECT "99" 631 | #else 632 | # define C_DIALECT "90" 633 | #endif 634 | const char* info_language_dialect_default = 635 | "INFO" ":" "dialect_default[" C_DIALECT "]"; 636 | 637 | /*--------------------------------------------------------------------------*/ 638 | 639 | #ifdef ID_VOID_MAIN 640 | void main() {} 641 | #else 642 | # if defined(__CLASSIC_C__) 643 | int main(argc, argv) int argc; char *argv[]; 644 | # else 645 | int main(int argc, char* argv[]) 646 | # endif 647 | { 648 | int require = 0; 649 | require += info_compiler[argc]; 650 | require += info_platform[argc]; 651 | require += info_arch[argc]; 652 | #ifdef COMPILER_VERSION_MAJOR 653 | require += info_version[argc]; 654 | #endif 655 | #ifdef COMPILER_VERSION_INTERNAL 656 | require += info_version_internal[argc]; 657 | #endif 658 | #ifdef SIMULATE_ID 659 | require += info_simulate[argc]; 660 | #endif 661 | #ifdef SIMULATE_VERSION_MAJOR 662 | require += info_simulate_version[argc]; 663 | #endif 664 | #if defined(__CRAYXE) || defined(__CRAYXC) 665 | require += info_cray[argc]; 666 | #endif 667 | require += info_language_dialect_default[argc]; 668 | (void)argv; 669 | return require; 670 | } 671 | #endif 672 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CompilerIdC/a.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/3.16.5/CompilerIdC/a.exe -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CompilerIdCXX/CMakeCXXCompilerId.cpp: -------------------------------------------------------------------------------- 1 | /* This source file must have a .cpp extension so that all C++ compilers 2 | recognize the extension without flags. Borland does not know .cxx for 3 | example. */ 4 | #ifndef __cplusplus 5 | # error "A C compiler has been selected for C++." 6 | #endif 7 | 8 | 9 | /* Version number components: V=Version, R=Revision, P=Patch 10 | Version date components: YYYY=Year, MM=Month, DD=Day */ 11 | 12 | #if defined(__COMO__) 13 | # define COMPILER_ID "Comeau" 14 | /* __COMO_VERSION__ = VRR */ 15 | # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) 16 | # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) 17 | 18 | #elif defined(__INTEL_COMPILER) || defined(__ICC) 19 | # define COMPILER_ID "Intel" 20 | # if defined(_MSC_VER) 21 | # define SIMULATE_ID "MSVC" 22 | # endif 23 | # if defined(__GNUC__) 24 | # define SIMULATE_ID "GNU" 25 | # endif 26 | /* __INTEL_COMPILER = VRP */ 27 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 28 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 29 | # if defined(__INTEL_COMPILER_UPDATE) 30 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 31 | # else 32 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 33 | # endif 34 | # if defined(__INTEL_COMPILER_BUILD_DATE) 35 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 36 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 37 | # endif 38 | # if defined(_MSC_VER) 39 | /* _MSC_VER = VVRR */ 40 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 41 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 42 | # endif 43 | # if defined(__GNUC__) 44 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 45 | # elif defined(__GNUG__) 46 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 47 | # endif 48 | # if defined(__GNUC_MINOR__) 49 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 50 | # endif 51 | # if defined(__GNUC_PATCHLEVEL__) 52 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 53 | # endif 54 | 55 | #elif defined(__PATHCC__) 56 | # define COMPILER_ID "PathScale" 57 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 58 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 59 | # if defined(__PATHCC_PATCHLEVEL__) 60 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 61 | # endif 62 | 63 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 64 | # define COMPILER_ID "Embarcadero" 65 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 66 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 67 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 68 | 69 | #elif defined(__BORLANDC__) 70 | # define COMPILER_ID "Borland" 71 | /* __BORLANDC__ = 0xVRR */ 72 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 73 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 74 | 75 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 76 | # define COMPILER_ID "Watcom" 77 | /* __WATCOMC__ = VVRR */ 78 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 79 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 80 | # if (__WATCOMC__ % 10) > 0 81 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 82 | # endif 83 | 84 | #elif defined(__WATCOMC__) 85 | # define COMPILER_ID "OpenWatcom" 86 | /* __WATCOMC__ = VVRP + 1100 */ 87 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 88 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 89 | # if (__WATCOMC__ % 10) > 0 90 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 91 | # endif 92 | 93 | #elif defined(__SUNPRO_CC) 94 | # define COMPILER_ID "SunPro" 95 | # if __SUNPRO_CC >= 0x5100 96 | /* __SUNPRO_CC = 0xVRRP */ 97 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) 98 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) 99 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 100 | # else 101 | /* __SUNPRO_CC = 0xVRP */ 102 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) 103 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) 104 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 105 | # endif 106 | 107 | #elif defined(__HP_aCC) 108 | # define COMPILER_ID "HP" 109 | /* __HP_aCC = VVRRPP */ 110 | # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) 111 | # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) 112 | # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) 113 | 114 | #elif defined(__DECCXX) 115 | # define COMPILER_ID "Compaq" 116 | /* __DECCXX_VER = VVRRTPPPP */ 117 | # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) 118 | # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) 119 | # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) 120 | 121 | #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) 122 | # define COMPILER_ID "zOS" 123 | /* __IBMCPP__ = VRP */ 124 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 125 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 126 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 127 | 128 | #elif defined(__ibmxl__) && defined(__clang__) 129 | # define COMPILER_ID "XLClang" 130 | # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 131 | # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 132 | # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 133 | # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 134 | 135 | 136 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 137 | # define COMPILER_ID "XL" 138 | /* __IBMCPP__ = VRP */ 139 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 140 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 141 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 142 | 143 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 144 | # define COMPILER_ID "VisualAge" 145 | /* __IBMCPP__ = VRP */ 146 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 147 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 148 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 149 | 150 | #elif defined(__PGI) 151 | # define COMPILER_ID "PGI" 152 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 153 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 154 | # if defined(__PGIC_PATCHLEVEL__) 155 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 156 | # endif 157 | 158 | #elif defined(_CRAYC) 159 | # define COMPILER_ID "Cray" 160 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 161 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 162 | 163 | #elif defined(__TI_COMPILER_VERSION__) 164 | # define COMPILER_ID "TI" 165 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 166 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 167 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 168 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 169 | 170 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 171 | # define COMPILER_ID "Fujitsu" 172 | 173 | #elif defined(__ghs__) 174 | # define COMPILER_ID "GHS" 175 | /* __GHS_VERSION_NUMBER = VVVVRP */ 176 | # ifdef __GHS_VERSION_NUMBER 177 | # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 178 | # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 179 | # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 180 | # endif 181 | 182 | #elif defined(__SCO_VERSION__) 183 | # define COMPILER_ID "SCO" 184 | 185 | #elif defined(__ARMCC_VERSION) && !defined(__clang__) 186 | # define COMPILER_ID "ARMCC" 187 | #if __ARMCC_VERSION >= 1000000 188 | /* __ARMCC_VERSION = VRRPPPP */ 189 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 190 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 191 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 192 | #else 193 | /* __ARMCC_VERSION = VRPPPP */ 194 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 195 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 196 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 197 | #endif 198 | 199 | 200 | #elif defined(__clang__) && defined(__apple_build_version__) 201 | # define COMPILER_ID "AppleClang" 202 | # if defined(_MSC_VER) 203 | # define SIMULATE_ID "MSVC" 204 | # endif 205 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 206 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 207 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 208 | # if defined(_MSC_VER) 209 | /* _MSC_VER = VVRR */ 210 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 211 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 212 | # endif 213 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 214 | 215 | #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) 216 | # define COMPILER_ID "ARMClang" 217 | # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) 218 | # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) 219 | # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) 220 | # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) 221 | 222 | #elif defined(__clang__) 223 | # define COMPILER_ID "Clang" 224 | # if defined(_MSC_VER) 225 | # define SIMULATE_ID "MSVC" 226 | # endif 227 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 228 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 229 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 230 | # if defined(_MSC_VER) 231 | /* _MSC_VER = VVRR */ 232 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 233 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 234 | # endif 235 | 236 | #elif defined(__GNUC__) || defined(__GNUG__) 237 | # define COMPILER_ID "GNU" 238 | # if defined(__GNUC__) 239 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 240 | # else 241 | # define COMPILER_VERSION_MAJOR DEC(__GNUG__) 242 | # endif 243 | # if defined(__GNUC_MINOR__) 244 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 245 | # endif 246 | # if defined(__GNUC_PATCHLEVEL__) 247 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 248 | # endif 249 | 250 | #elif defined(_MSC_VER) 251 | # define COMPILER_ID "MSVC" 252 | /* _MSC_VER = VVRR */ 253 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 254 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 255 | # if defined(_MSC_FULL_VER) 256 | # if _MSC_VER >= 1400 257 | /* _MSC_FULL_VER = VVRRPPPPP */ 258 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 259 | # else 260 | /* _MSC_FULL_VER = VVRRPPPP */ 261 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 262 | # endif 263 | # endif 264 | # if defined(_MSC_BUILD) 265 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 266 | # endif 267 | 268 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 269 | # define COMPILER_ID "ADSP" 270 | #if defined(__VISUALDSPVERSION__) 271 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 272 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 273 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 274 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 275 | #endif 276 | 277 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 278 | # define COMPILER_ID "IAR" 279 | # if defined(__VER__) && defined(__ICCARM__) 280 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 281 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 282 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 283 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 284 | # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) 285 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 286 | # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 287 | # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 288 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 289 | # endif 290 | 291 | 292 | /* These compilers are either not known or too old to define an 293 | identification macro. Try to identify the platform and guess that 294 | it is the native compiler. */ 295 | #elif defined(__hpux) || defined(__hpua) 296 | # define COMPILER_ID "HP" 297 | 298 | #else /* unknown compiler */ 299 | # define COMPILER_ID "" 300 | #endif 301 | 302 | /* Construct the string literal in pieces to prevent the source from 303 | getting matched. Store it in a pointer rather than an array 304 | because some compilers will just produce instructions to fill the 305 | array rather than assigning a pointer to a static array. */ 306 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 307 | #ifdef SIMULATE_ID 308 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 309 | #endif 310 | 311 | #ifdef __QNXNTO__ 312 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 313 | #endif 314 | 315 | #if defined(__CRAYXE) || defined(__CRAYXC) 316 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 317 | #endif 318 | 319 | #define STRINGIFY_HELPER(X) #X 320 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 321 | 322 | /* Identify known platforms by name. */ 323 | #if defined(__linux) || defined(__linux__) || defined(linux) 324 | # define PLATFORM_ID "Linux" 325 | 326 | #elif defined(__CYGWIN__) 327 | # define PLATFORM_ID "Cygwin" 328 | 329 | #elif defined(__MINGW32__) 330 | # define PLATFORM_ID "MinGW" 331 | 332 | #elif defined(__APPLE__) 333 | # define PLATFORM_ID "Darwin" 334 | 335 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 336 | # define PLATFORM_ID "Windows" 337 | 338 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 339 | # define PLATFORM_ID "FreeBSD" 340 | 341 | #elif defined(__NetBSD__) || defined(__NetBSD) 342 | # define PLATFORM_ID "NetBSD" 343 | 344 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 345 | # define PLATFORM_ID "OpenBSD" 346 | 347 | #elif defined(__sun) || defined(sun) 348 | # define PLATFORM_ID "SunOS" 349 | 350 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 351 | # define PLATFORM_ID "AIX" 352 | 353 | #elif defined(__hpux) || defined(__hpux__) 354 | # define PLATFORM_ID "HP-UX" 355 | 356 | #elif defined(__HAIKU__) 357 | # define PLATFORM_ID "Haiku" 358 | 359 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 360 | # define PLATFORM_ID "BeOS" 361 | 362 | #elif defined(__QNX__) || defined(__QNXNTO__) 363 | # define PLATFORM_ID "QNX" 364 | 365 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 366 | # define PLATFORM_ID "Tru64" 367 | 368 | #elif defined(__riscos) || defined(__riscos__) 369 | # define PLATFORM_ID "RISCos" 370 | 371 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 372 | # define PLATFORM_ID "SINIX" 373 | 374 | #elif defined(__UNIX_SV__) 375 | # define PLATFORM_ID "UNIX_SV" 376 | 377 | #elif defined(__bsdos__) 378 | # define PLATFORM_ID "BSDOS" 379 | 380 | #elif defined(_MPRAS) || defined(MPRAS) 381 | # define PLATFORM_ID "MP-RAS" 382 | 383 | #elif defined(__osf) || defined(__osf__) 384 | # define PLATFORM_ID "OSF1" 385 | 386 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 387 | # define PLATFORM_ID "SCO_SV" 388 | 389 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 390 | # define PLATFORM_ID "ULTRIX" 391 | 392 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 393 | # define PLATFORM_ID "Xenix" 394 | 395 | #elif defined(__WATCOMC__) 396 | # if defined(__LINUX__) 397 | # define PLATFORM_ID "Linux" 398 | 399 | # elif defined(__DOS__) 400 | # define PLATFORM_ID "DOS" 401 | 402 | # elif defined(__OS2__) 403 | # define PLATFORM_ID "OS2" 404 | 405 | # elif defined(__WINDOWS__) 406 | # define PLATFORM_ID "Windows3x" 407 | 408 | # else /* unknown platform */ 409 | # define PLATFORM_ID 410 | # endif 411 | 412 | #elif defined(__INTEGRITY) 413 | # if defined(INT_178B) 414 | # define PLATFORM_ID "Integrity178" 415 | 416 | # else /* regular Integrity */ 417 | # define PLATFORM_ID "Integrity" 418 | # endif 419 | 420 | #else /* unknown platform */ 421 | # define PLATFORM_ID 422 | 423 | #endif 424 | 425 | /* For windows compilers MSVC and Intel we can determine 426 | the architecture of the compiler being used. This is because 427 | the compilers do not have flags that can change the architecture, 428 | but rather depend on which compiler is being used 429 | */ 430 | #if defined(_WIN32) && defined(_MSC_VER) 431 | # if defined(_M_IA64) 432 | # define ARCHITECTURE_ID "IA64" 433 | 434 | # elif defined(_M_X64) || defined(_M_AMD64) 435 | # define ARCHITECTURE_ID "x64" 436 | 437 | # elif defined(_M_IX86) 438 | # define ARCHITECTURE_ID "X86" 439 | 440 | # elif defined(_M_ARM64) 441 | # define ARCHITECTURE_ID "ARM64" 442 | 443 | # elif defined(_M_ARM) 444 | # if _M_ARM == 4 445 | # define ARCHITECTURE_ID "ARMV4I" 446 | # elif _M_ARM == 5 447 | # define ARCHITECTURE_ID "ARMV5I" 448 | # else 449 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 450 | # endif 451 | 452 | # elif defined(_M_MIPS) 453 | # define ARCHITECTURE_ID "MIPS" 454 | 455 | # elif defined(_M_SH) 456 | # define ARCHITECTURE_ID "SHx" 457 | 458 | # else /* unknown architecture */ 459 | # define ARCHITECTURE_ID "" 460 | # endif 461 | 462 | #elif defined(__WATCOMC__) 463 | # if defined(_M_I86) 464 | # define ARCHITECTURE_ID "I86" 465 | 466 | # elif defined(_M_IX86) 467 | # define ARCHITECTURE_ID "X86" 468 | 469 | # else /* unknown architecture */ 470 | # define ARCHITECTURE_ID "" 471 | # endif 472 | 473 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 474 | # if defined(__ICCARM__) 475 | # define ARCHITECTURE_ID "ARM" 476 | 477 | # elif defined(__ICCRX__) 478 | # define ARCHITECTURE_ID "RX" 479 | 480 | # elif defined(__ICCRH850__) 481 | # define ARCHITECTURE_ID "RH850" 482 | 483 | # elif defined(__ICCRL78__) 484 | # define ARCHITECTURE_ID "RL78" 485 | 486 | # elif defined(__ICCRISCV__) 487 | # define ARCHITECTURE_ID "RISCV" 488 | 489 | # elif defined(__ICCAVR__) 490 | # define ARCHITECTURE_ID "AVR" 491 | 492 | # elif defined(__ICC430__) 493 | # define ARCHITECTURE_ID "MSP430" 494 | 495 | # elif defined(__ICCV850__) 496 | # define ARCHITECTURE_ID "V850" 497 | 498 | # elif defined(__ICC8051__) 499 | # define ARCHITECTURE_ID "8051" 500 | 501 | # else /* unknown architecture */ 502 | # define ARCHITECTURE_ID "" 503 | # endif 504 | 505 | #elif defined(__ghs__) 506 | # if defined(__PPC64__) 507 | # define ARCHITECTURE_ID "PPC64" 508 | 509 | # elif defined(__ppc__) 510 | # define ARCHITECTURE_ID "PPC" 511 | 512 | # elif defined(__ARM__) 513 | # define ARCHITECTURE_ID "ARM" 514 | 515 | # elif defined(__x86_64__) 516 | # define ARCHITECTURE_ID "x64" 517 | 518 | # elif defined(__i386__) 519 | # define ARCHITECTURE_ID "X86" 520 | 521 | # else /* unknown architecture */ 522 | # define ARCHITECTURE_ID "" 523 | # endif 524 | #else 525 | # define ARCHITECTURE_ID 526 | #endif 527 | 528 | /* Convert integer to decimal digit literals. */ 529 | #define DEC(n) \ 530 | ('0' + (((n) / 10000000)%10)), \ 531 | ('0' + (((n) / 1000000)%10)), \ 532 | ('0' + (((n) / 100000)%10)), \ 533 | ('0' + (((n) / 10000)%10)), \ 534 | ('0' + (((n) / 1000)%10)), \ 535 | ('0' + (((n) / 100)%10)), \ 536 | ('0' + (((n) / 10)%10)), \ 537 | ('0' + ((n) % 10)) 538 | 539 | /* Convert integer to hex digit literals. */ 540 | #define HEX(n) \ 541 | ('0' + ((n)>>28 & 0xF)), \ 542 | ('0' + ((n)>>24 & 0xF)), \ 543 | ('0' + ((n)>>20 & 0xF)), \ 544 | ('0' + ((n)>>16 & 0xF)), \ 545 | ('0' + ((n)>>12 & 0xF)), \ 546 | ('0' + ((n)>>8 & 0xF)), \ 547 | ('0' + ((n)>>4 & 0xF)), \ 548 | ('0' + ((n) & 0xF)) 549 | 550 | /* Construct a string literal encoding the version number components. */ 551 | #ifdef COMPILER_VERSION_MAJOR 552 | char const info_version[] = { 553 | 'I', 'N', 'F', 'O', ':', 554 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 555 | COMPILER_VERSION_MAJOR, 556 | # ifdef COMPILER_VERSION_MINOR 557 | '.', COMPILER_VERSION_MINOR, 558 | # ifdef COMPILER_VERSION_PATCH 559 | '.', COMPILER_VERSION_PATCH, 560 | # ifdef COMPILER_VERSION_TWEAK 561 | '.', COMPILER_VERSION_TWEAK, 562 | # endif 563 | # endif 564 | # endif 565 | ']','\0'}; 566 | #endif 567 | 568 | /* Construct a string literal encoding the internal version number. */ 569 | #ifdef COMPILER_VERSION_INTERNAL 570 | char const info_version_internal[] = { 571 | 'I', 'N', 'F', 'O', ':', 572 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', 573 | 'i','n','t','e','r','n','a','l','[', 574 | COMPILER_VERSION_INTERNAL,']','\0'}; 575 | #endif 576 | 577 | /* Construct a string literal encoding the version number components. */ 578 | #ifdef SIMULATE_VERSION_MAJOR 579 | char const info_simulate_version[] = { 580 | 'I', 'N', 'F', 'O', ':', 581 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 582 | SIMULATE_VERSION_MAJOR, 583 | # ifdef SIMULATE_VERSION_MINOR 584 | '.', SIMULATE_VERSION_MINOR, 585 | # ifdef SIMULATE_VERSION_PATCH 586 | '.', SIMULATE_VERSION_PATCH, 587 | # ifdef SIMULATE_VERSION_TWEAK 588 | '.', SIMULATE_VERSION_TWEAK, 589 | # endif 590 | # endif 591 | # endif 592 | ']','\0'}; 593 | #endif 594 | 595 | /* Construct the string literal in pieces to prevent the source from 596 | getting matched. Store it in a pointer rather than an array 597 | because some compilers will just produce instructions to fill the 598 | array rather than assigning a pointer to a static array. */ 599 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 600 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 601 | 602 | 603 | 604 | 605 | #if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L 606 | # if defined(__INTEL_CXX11_MODE__) 607 | # if defined(__cpp_aggregate_nsdmi) 608 | # define CXX_STD 201402L 609 | # else 610 | # define CXX_STD 201103L 611 | # endif 612 | # else 613 | # define CXX_STD 199711L 614 | # endif 615 | #elif defined(_MSC_VER) && defined(_MSVC_LANG) 616 | # define CXX_STD _MSVC_LANG 617 | #else 618 | # define CXX_STD __cplusplus 619 | #endif 620 | 621 | const char* info_language_dialect_default = "INFO" ":" "dialect_default[" 622 | #if CXX_STD > 201703L 623 | "20" 624 | #elif CXX_STD >= 201703L 625 | "17" 626 | #elif CXX_STD >= 201402L 627 | "14" 628 | #elif CXX_STD >= 201103L 629 | "11" 630 | #else 631 | "98" 632 | #endif 633 | "]"; 634 | 635 | /*--------------------------------------------------------------------------*/ 636 | 637 | int main(int argc, char* argv[]) 638 | { 639 | int require = 0; 640 | require += info_compiler[argc]; 641 | require += info_platform[argc]; 642 | #ifdef COMPILER_VERSION_MAJOR 643 | require += info_version[argc]; 644 | #endif 645 | #ifdef COMPILER_VERSION_INTERNAL 646 | require += info_version_internal[argc]; 647 | #endif 648 | #ifdef SIMULATE_ID 649 | require += info_simulate[argc]; 650 | #endif 651 | #ifdef SIMULATE_VERSION_MAJOR 652 | require += info_simulate_version[argc]; 653 | #endif 654 | #if defined(__CRAYXE) || defined(__CRAYXC) 655 | require += info_cray[argc]; 656 | #endif 657 | require += info_language_dialect_default[argc]; 658 | (void)argv; 659 | return require; 660 | } 661 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.16.5/CompilerIdCXX/a.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/3.16.5/CompilerIdCXX/a.exe -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "C:/Users/Yorkin/prj/cpp/ScriptC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "MinGW Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeCInformation.cmake" 11 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeCXXInformation.cmake" 12 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake" 13 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeCommonLanguageInclude.cmake" 14 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake" 15 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeFindCodeBlocks.cmake" 16 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeGenericSystem.cmake" 17 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeInitializeConfigs.cmake" 18 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeLanguageInformation.cmake" 19 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeRCInformation.cmake" 20 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeSystemSpecificInformation.cmake" 21 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/CMakeSystemSpecificInitialize.cmake" 22 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 23 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Compiler/GNU-C.cmake" 24 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Compiler/GNU-CXX.cmake" 25 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Compiler/GNU.cmake" 26 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Internal/CMakeCheckCompilerFlag.cmake" 27 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows-GNU-C-ABI.cmake" 28 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows-GNU-C.cmake" 29 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows-GNU-CXX-ABI.cmake" 30 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows-GNU-CXX.cmake" 31 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows-GNU.cmake" 32 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows-windres.cmake" 33 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/Windows.cmake" 34 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/Platform/WindowsPaths.cmake" 35 | "C:/Program Files/JetBrains/CLion 2020.1/bin/cmake/win/share/cmake-3.16/Modules/ProcessorCount.cmake" 36 | "../CMakeLists.txt" 37 | "CMakeFiles/3.16.5/CMakeCCompiler.cmake" 38 | "CMakeFiles/3.16.5/CMakeCXXCompiler.cmake" 39 | "CMakeFiles/3.16.5/CMakeRCCompiler.cmake" 40 | "CMakeFiles/3.16.5/CMakeSystem.cmake" 41 | ) 42 | 43 | # The corresponding makefile is: 44 | set(CMAKE_MAKEFILE_OUTPUTS 45 | "Makefile" 46 | "CMakeFiles/cmake.check_cache" 47 | ) 48 | 49 | # Byproducts of CMake generate step: 50 | set(CMAKE_MAKEFILE_PRODUCTS 51 | "CMakeFiles/CMakeDirectoryInformation.cmake" 52 | ) 53 | 54 | # Dependency information for all targets: 55 | set(CMAKE_DEPEND_INFO_FILES 56 | "CMakeFiles/ScriptC.dir/DependInfo.cmake" 57 | ) 58 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | #============================================================================= 10 | # Special targets provided by cmake. 11 | 12 | # Disable implicit rules so canonical targets will work. 13 | .SUFFIXES: 14 | 15 | 16 | # Remove some rules from gmake that .SUFFIXES does not remove. 17 | SUFFIXES = 18 | 19 | .SUFFIXES: .hpux_make_needs_suffix_list 20 | 21 | 22 | # Suppress display of executed commands. 23 | $(VERBOSE).SILENT: 24 | 25 | 26 | # A target that is always out of date. 27 | cmake_force: 28 | 29 | .PHONY : cmake_force 30 | 31 | #============================================================================= 32 | # Set environment variables for the build. 33 | 34 | SHELL = cmd.exe 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" 38 | 39 | # The command to remove a file. 40 | RM = "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = C:\Users\Yorkin\prj\cpp\ScriptC 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug 50 | 51 | #============================================================================= 52 | # Directory level rules for the build root directory 53 | 54 | # The main recursive "all" target. 55 | all: CMakeFiles/ScriptC.dir/all 56 | 57 | .PHONY : all 58 | 59 | # The main recursive "preinstall" target. 60 | preinstall: 61 | 62 | .PHONY : preinstall 63 | 64 | # The main recursive "clean" target. 65 | clean: CMakeFiles/ScriptC.dir/clean 66 | 67 | .PHONY : clean 68 | 69 | #============================================================================= 70 | # Target rules for target CMakeFiles/ScriptC.dir 71 | 72 | # All Build rule for target. 73 | CMakeFiles/ScriptC.dir/all: 74 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/depend 75 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/build 76 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles --progress-num=1,2 "Built target ScriptC" 77 | .PHONY : CMakeFiles/ScriptC.dir/all 78 | 79 | # Build rule for subdir invocation for target. 80 | CMakeFiles/ScriptC.dir/rule: cmake_check_build_system 81 | $(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles 2 82 | $(MAKE) -f CMakeFiles\Makefile2 CMakeFiles/ScriptC.dir/all 83 | $(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles 0 84 | .PHONY : CMakeFiles/ScriptC.dir/rule 85 | 86 | # Convenience name for target. 87 | ScriptC: CMakeFiles/ScriptC.dir/rule 88 | 89 | .PHONY : ScriptC 90 | 91 | # clean rule for target. 92 | CMakeFiles/ScriptC.dir/clean: 93 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/clean 94 | .PHONY : CMakeFiles/ScriptC.dir/clean 95 | 96 | #============================================================================= 97 | # Special targets to cleanup operation of make. 98 | 99 | # Special rule to run CMake to check the build system integrity. 100 | # No rule that depends on this can have commands that come from listfiles 101 | # because they might be regenerated. 102 | cmake_check_build_system: 103 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0 104 | .PHONY : cmake_check_build_system 105 | 106 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | C:/Users/Yorkin/prj/cpp/ScriptC/src/executor.cpp 10 | parser.cpp 11 | C:/Users/Yorkin/prj/cpp/ScriptC/src/parser.cpp 12 | map 13 | - 14 | string 15 | - 16 | iostream 17 | - 18 | list 19 | - 20 | 21 | C:/Users/Yorkin/prj/cpp/ScriptC/src/main.cpp 22 | stdio.h 23 | - 24 | string.h 25 | - 26 | iostream 27 | - 28 | scaner.cpp 29 | C:/Users/Yorkin/prj/cpp/ScriptC/src/scaner.cpp 30 | parser.cpp 31 | C:/Users/Yorkin/prj/cpp/ScriptC/src/parser.cpp 32 | executor.cpp 33 | C:/Users/Yorkin/prj/cpp/ScriptC/src/executor.cpp 34 | 35 | C:/Users/Yorkin/prj/cpp/ScriptC/src/parser.cpp 36 | string 37 | - 38 | scaner.cpp 39 | C:/Users/Yorkin/prj/cpp/ScriptC/src/scaner.cpp 40 | 41 | C:/Users/Yorkin/prj/cpp/ScriptC/src/scaner.cpp 42 | iostream 43 | - 44 | fstream 45 | - 46 | string 47 | - 48 | map 49 | - 50 | 51 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "C:/Users/Yorkin/prj/cpp/ScriptC/src/main.cpp" "C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug/CMakeFiles/ScriptC.dir/src/main.cpp.obj" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "GNU") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | ) 14 | 15 | # Targets to which this target links. 16 | set(CMAKE_TARGET_LINKED_INFO_FILES 17 | ) 18 | 19 | # Fortran module output directory. 20 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 21 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | SHELL = cmd.exe 34 | 35 | # The CMake executable. 36 | CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" 37 | 38 | # The command to remove a file. 39 | RM = "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -E remove -f 40 | 41 | # Escaping for special characters. 42 | EQUALS = = 43 | 44 | # The top-level source directory on which CMake was run. 45 | CMAKE_SOURCE_DIR = C:\Users\Yorkin\prj\cpp\ScriptC 46 | 47 | # The top-level build directory on which CMake was run. 48 | CMAKE_BINARY_DIR = C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug 49 | 50 | # Include any dependencies generated for this target. 51 | include CMakeFiles/ScriptC.dir/depend.make 52 | 53 | # Include the progress variables for this target. 54 | include CMakeFiles/ScriptC.dir/progress.make 55 | 56 | # Include the compile flags for this target's objects. 57 | include CMakeFiles/ScriptC.dir/flags.make 58 | 59 | CMakeFiles/ScriptC.dir/src/main.cpp.obj: CMakeFiles/ScriptC.dir/flags.make 60 | CMakeFiles/ScriptC.dir/src/main.cpp.obj: ../src/main.cpp 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/ScriptC.dir/src/main.cpp.obj" 62 | C:\mingw\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles\ScriptC.dir\src\main.cpp.obj -c C:\Users\Yorkin\prj\cpp\ScriptC\src\main.cpp 63 | 64 | CMakeFiles/ScriptC.dir/src/main.cpp.i: cmake_force 65 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/ScriptC.dir/src/main.cpp.i" 66 | C:\mingw\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E C:\Users\Yorkin\prj\cpp\ScriptC\src\main.cpp > CMakeFiles\ScriptC.dir\src\main.cpp.i 67 | 68 | CMakeFiles/ScriptC.dir/src/main.cpp.s: cmake_force 69 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/ScriptC.dir/src/main.cpp.s" 70 | C:\mingw\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S C:\Users\Yorkin\prj\cpp\ScriptC\src\main.cpp -o CMakeFiles\ScriptC.dir\src\main.cpp.s 71 | 72 | # Object files for target ScriptC 73 | ScriptC_OBJECTS = \ 74 | "CMakeFiles/ScriptC.dir/src/main.cpp.obj" 75 | 76 | # External object files for target ScriptC 77 | ScriptC_EXTERNAL_OBJECTS = 78 | 79 | ScriptC.exe: CMakeFiles/ScriptC.dir/src/main.cpp.obj 80 | ScriptC.exe: CMakeFiles/ScriptC.dir/build.make 81 | ScriptC.exe: CMakeFiles/ScriptC.dir/linklibs.rsp 82 | ScriptC.exe: CMakeFiles/ScriptC.dir/objects1.rsp 83 | ScriptC.exe: CMakeFiles/ScriptC.dir/link.txt 84 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable ScriptC.exe" 85 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles\ScriptC.dir\link.txt --verbose=$(VERBOSE) 86 | 87 | # Rule to build all files generated by this target. 88 | CMakeFiles/ScriptC.dir/build: ScriptC.exe 89 | 90 | .PHONY : CMakeFiles/ScriptC.dir/build 91 | 92 | CMakeFiles/ScriptC.dir/clean: 93 | $(CMAKE_COMMAND) -P CMakeFiles\ScriptC.dir\cmake_clean.cmake 94 | .PHONY : CMakeFiles/ScriptC.dir/clean 95 | 96 | CMakeFiles/ScriptC.dir/depend: 97 | $(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" C:\Users\Yorkin\prj\cpp\ScriptC C:\Users\Yorkin\prj\cpp\ScriptC C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles\ScriptC.dir\DependInfo.cmake --color=$(COLOR) 98 | .PHONY : CMakeFiles/ScriptC.dir/depend 99 | 100 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/ScriptC.dir/src/main.cpp.obj" 3 | "ScriptC.exe" 4 | "ScriptC.exe.manifest" 5 | "ScriptC.pdb" 6 | "libScriptC.dll.a" 7 | ) 8 | 9 | # Per-language clean rules from dependency scanning. 10 | foreach(lang CXX) 11 | include(CMakeFiles/ScriptC.dir/cmake_clean_${lang}.cmake OPTIONAL) 12 | endforeach() 13 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | CMakeFiles/ScriptC.dir/src/main.cpp.obj 5 | C:/Users/Yorkin/prj/cpp/ScriptC/src/executor.cpp 6 | C:/Users/Yorkin/prj/cpp/ScriptC/src/main.cpp 7 | C:/Users/Yorkin/prj/cpp/ScriptC/src/parser.cpp 8 | C:/Users/Yorkin/prj/cpp/ScriptC/src/scaner.cpp 9 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | CMakeFiles/ScriptC.dir/src/main.cpp.obj: ../src/executor.cpp 5 | CMakeFiles/ScriptC.dir/src/main.cpp.obj: ../src/main.cpp 6 | CMakeFiles/ScriptC.dir/src/main.cpp.obj: ../src/parser.cpp 7 | CMakeFiles/ScriptC.dir/src/main.cpp.obj: ../src/scaner.cpp 8 | 9 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | # compile CXX with C:/mingw/mingw64/bin/g++.exe 5 | CXX_FLAGS = -g -std=gnu++11 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = 10 | 11 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/link.txt: -------------------------------------------------------------------------------- 1 | "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -E remove -f CMakeFiles\ScriptC.dir/objects.a 2 | C:\mingw\mingw64\bin\ar.exe cr CMakeFiles\ScriptC.dir/objects.a @CMakeFiles\ScriptC.dir\objects1.rsp 3 | C:\mingw\mingw64\bin\g++.exe -g -Wl,--whole-archive CMakeFiles\ScriptC.dir/objects.a -Wl,--no-whole-archive -o ScriptC.exe -Wl,--out-implib,libScriptC.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\ScriptC.dir\linklibs.rsp 4 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/linklibs.rsp: -------------------------------------------------------------------------------- 1 | -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/objects.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/ScriptC.dir/objects.a -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/objects1.rsp: -------------------------------------------------------------------------------- 1 | CMakeFiles/ScriptC.dir/src/main.cpp.obj 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/src/executor.cpp.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/ScriptC.dir/src/executor.cpp.obj -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/src/main.cpp.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/ScriptC.dir/src/main.cpp.obj -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/src/parser.cpp.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/ScriptC.dir/src/parser.cpp.obj -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/ScriptC.dir/src/scaner.cpp.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/CMakeFiles/ScriptC.dir/src/scaner.cpp.obj -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug/CMakeFiles/ScriptC.dir 2 | C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug/CMakeFiles/edit_cache.dir 3 | C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug/CMakeFiles/rebuild_cache.dir 4 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/clion-environment.txt: -------------------------------------------------------------------------------- 1 | ToolSet: w64 5.0 (local)@C:\mingw\mingw64 2 | Options: 3 | 4 | Options: -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/clion-log.txt: -------------------------------------------------------------------------------- 1 | "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\Yorkin\prj\cpp\ScriptC 2 | -- Configuring done 3 | -- Generating done 4 | -- Build files have been written to: C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug 5 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /cmake-build-debug/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.16 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | SHELL = cmd.exe 39 | 40 | # The CMake executable. 41 | CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" 42 | 43 | # The command to remove a file. 44 | RM = "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -E remove -f 45 | 46 | # Escaping for special characters. 47 | EQUALS = = 48 | 49 | # The top-level source directory on which CMake was run. 50 | CMAKE_SOURCE_DIR = C:\Users\Yorkin\prj\cpp\ScriptC 51 | 52 | # The top-level build directory on which CMake was run. 53 | CMAKE_BINARY_DIR = C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug 54 | 55 | #============================================================================= 56 | # Targets provided globally by CMake. 57 | 58 | # Special rule for the target edit_cache 59 | edit_cache: 60 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 61 | "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -E echo "No interactive CMake dialog available." 62 | .PHONY : edit_cache 63 | 64 | # Special rule for the target edit_cache 65 | edit_cache/fast: edit_cache 66 | 67 | .PHONY : edit_cache/fast 68 | 69 | # Special rule for the target rebuild_cache 70 | rebuild_cache: 71 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 72 | "C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 73 | .PHONY : rebuild_cache 74 | 75 | # Special rule for the target rebuild_cache 76 | rebuild_cache/fast: rebuild_cache 77 | 78 | .PHONY : rebuild_cache/fast 79 | 80 | # The main all target 81 | all: cmake_check_build_system 82 | $(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles\progress.marks 83 | $(MAKE) -f CMakeFiles\Makefile2 all 84 | $(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Yorkin\prj\cpp\ScriptC\cmake-build-debug\CMakeFiles 0 85 | .PHONY : all 86 | 87 | # The main clean target 88 | clean: 89 | $(MAKE) -f CMakeFiles\Makefile2 clean 90 | .PHONY : clean 91 | 92 | # The main clean target 93 | clean/fast: clean 94 | 95 | .PHONY : clean/fast 96 | 97 | # Prepare targets for installation. 98 | preinstall: all 99 | $(MAKE) -f CMakeFiles\Makefile2 preinstall 100 | .PHONY : preinstall 101 | 102 | # Prepare targets for installation. 103 | preinstall/fast: 104 | $(MAKE) -f CMakeFiles\Makefile2 preinstall 105 | .PHONY : preinstall/fast 106 | 107 | # clear depends 108 | depend: 109 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1 110 | .PHONY : depend 111 | 112 | #============================================================================= 113 | # Target rules for targets named ScriptC 114 | 115 | # Build rule for target. 116 | ScriptC: cmake_check_build_system 117 | $(MAKE) -f CMakeFiles\Makefile2 ScriptC 118 | .PHONY : ScriptC 119 | 120 | # fast build rule for target. 121 | ScriptC/fast: 122 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/build 123 | .PHONY : ScriptC/fast 124 | 125 | src/main.obj: src/main.cpp.obj 126 | 127 | .PHONY : src/main.obj 128 | 129 | # target to build an object file 130 | src/main.cpp.obj: 131 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/src/main.cpp.obj 132 | .PHONY : src/main.cpp.obj 133 | 134 | src/main.i: src/main.cpp.i 135 | 136 | .PHONY : src/main.i 137 | 138 | # target to preprocess a source file 139 | src/main.cpp.i: 140 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/src/main.cpp.i 141 | .PHONY : src/main.cpp.i 142 | 143 | src/main.s: src/main.cpp.s 144 | 145 | .PHONY : src/main.s 146 | 147 | # target to generate assembly for a file 148 | src/main.cpp.s: 149 | $(MAKE) -f CMakeFiles\ScriptC.dir\build.make CMakeFiles/ScriptC.dir/src/main.cpp.s 150 | .PHONY : src/main.cpp.s 151 | 152 | # Help Target 153 | help: 154 | @echo The following are some of the valid targets for this Makefile: 155 | @echo ... all (the default if no target is provided) 156 | @echo ... clean 157 | @echo ... depend 158 | @echo ... ScriptC 159 | @echo ... edit_cache 160 | @echo ... rebuild_cache 161 | @echo ... src/main.obj 162 | @echo ... src/main.i 163 | @echo ... src/main.s 164 | .PHONY : help 165 | 166 | 167 | 168 | #============================================================================= 169 | # Special targets to cleanup operation of make. 170 | 171 | # Special rule to run CMake to check the build system integrity. 172 | # No rule that depends on this can have commands that come from listfiles 173 | # because they might be regenerated. 174 | cmake_check_build_system: 175 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0 176 | .PHONY : cmake_check_build_system 177 | 178 | -------------------------------------------------------------------------------- /cmake-build-debug/ScriptC.cbp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 90 | 91 | -------------------------------------------------------------------------------- /cmake-build-debug/ScriptC.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/cmake-build-debug/ScriptC.exe -------------------------------------------------------------------------------- /cmake-build-debug/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: C:/Users/Yorkin/prj/cpp/ScriptC 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/ScriptC") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Is this installation the result of a crosscompile? 31 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 32 | set(CMAKE_CROSSCOMPILING "FALSE") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "C:/Users/Yorkin/prj/cpp/ScriptC/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /demo/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/demo/1.png -------------------------------------------------------------------------------- /demo/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/demo/2.png -------------------------------------------------------------------------------- /doc/DFA.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/doc/DFA.xlsx -------------------------------------------------------------------------------- /doc/正则文法与状态机.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/ScriptC/9320e36a09f3a82e293adb8d4c2be836402f7210/doc/正则文法与状态机.pdf -------------------------------------------------------------------------------- /src/executor.cpp: -------------------------------------------------------------------------------- 1 | #ifndef EXECUTOR 2 | #define EXECUTOR 3 | #include"parser.cpp" 4 | #include 5 | #include 6 | #include 7 | #include 8 | using namespace std; 9 | /* 10 | 我知道原本可以靠良好的设计规避这个文件里的重复无用又长的代码 11 | 但是我懒得再改parser了 12 | 放飞自我硬编码算了 13 | 14 | 一堆因为parser没考虑周全多出来的if else switch 15 | 我要吐了 16 | */ 17 | namespace Executor 18 | { 19 | struct Var 20 | { 21 | union Value 22 | { 23 | int integer; 24 | float decmical; 25 | bool boolean; 26 | }value; 27 | void* array = nullptr; 28 | string text; 29 | AttrKind kind; 30 | }; 31 | int inLoop = 0; 32 | bool exitLoop = false; 33 | bool jumpLoop = false; 34 | typedef map VarClosure; 35 | list closures; 36 | void setVar(string name,Var* var) 37 | { 38 | closures.front().insert(make_pair(name,var)); 39 | } 40 | Var* getVar(string name) 41 | { 42 | for(auto iter=closures.begin();iter!=closures.end();iter++) 43 | { 44 | auto ret = iter->find(name); 45 | if(ret!=iter->end()) 46 | { 47 | return ret->second; 48 | } 49 | } 50 | reportError(Error::UndefinedID); 51 | } 52 | void constructClosure() 53 | { 54 | closures.push_front(VarClosure()); 55 | } 56 | void destructClosure() 57 | { 58 | for(auto pair:closures.front()) 59 | { 60 | delete pair.second; 61 | } 62 | closures.pop_front(); 63 | } 64 | 65 | #define GETDIGIT(node) (node->attrKind==AttrKind::Integer ? node->attr.integer : node->attr.decmical) 66 | bool checkDigit(treeNode* node) 67 | { 68 | return (node->attrKind==AttrKind::Integer||node->attrKind==AttrKind::Decmical); 69 | } 70 | treeNode* exp(treeNode* node) 71 | { 72 | treeNode* ret = nullptr; 73 | if(node->kind.expKind==ExpKind::constExp)return new treeNode(*node); 74 | if(node->kind.expKind==ExpKind::idExp) 75 | { 76 | auto retVar = getVar(node->text); 77 | switch(retVar->kind) 78 | { 79 | case AttrKind::Text:return new treeNode(retVar->text); 80 | case AttrKind::Integer:return new treeNode(retVar->value.integer); 81 | case AttrKind::Decmical:return new treeNode(retVar->value.decmical); 82 | case AttrKind::Boolean:return new treeNode(retVar->value.boolean); 83 | } 84 | } 85 | if(node->child[0]->kind.expKind==ExpKind::opExp) 86 | { 87 | ret = exp(node->child[1]); 88 | ret->attr.boolean=!ret->attr.boolean; 89 | return ret; 90 | } 91 | else 92 | { 93 | auto left = exp(node->child[0]); 94 | string op = node->child[1]->text; 95 | auto right = exp(node->child[2]); 96 | if(op=="+") 97 | { 98 | if(left->attrKind==AttrKind::Text&&right->attrKind==AttrKind::Text) 99 | ret = new treeNode(left->text + right->text); 100 | else if(checkDigit(left)&&checkDigit(right)) 101 | ret = new treeNode(GETDIGIT(left)+GETDIGIT(right));//string 102 | else 103 | reportError(Error::errorType); 104 | } 105 | else if(op=="-") ret = new treeNode(GETDIGIT(left)-GETDIGIT(right)); 106 | else if(op=="*") ret = new treeNode(GETDIGIT(left)*GETDIGIT(right)); 107 | else if(op=="/") 108 | { 109 | if(GETDIGIT(right)==0) 110 | reportError(Error::divZero); 111 | else 112 | ret = new treeNode(GETDIGIT(left)/GETDIGIT(right)); 113 | } 114 | else if(op=="&&"||op=="||") 115 | { 116 | if(right->attrKind!=AttrKind::Boolean&&left->attrKind!=AttrKind::Boolean) 117 | reportError(Error::errorType); 118 | else if(op=="&&")ret = new treeNode(left->attr.boolean && right->attr.boolean); 119 | else if(op=="||")ret = new treeNode(left->attr.boolean || right->attr.boolean); 120 | } 121 | else 122 | { 123 | if(!(checkDigit(left)&&checkDigit(right)))reportError(Error::errorType); 124 | else if(op==">")ret = new treeNode(GETDIGIT(left)>GETDIGIT(right)); 125 | else if(op=="<")ret = new treeNode(GETDIGIT(left)="||op=="=>")ret = new treeNode(GETDIGIT(left)>=GETDIGIT(right)); 130 | } 131 | delete left; 132 | delete right; 133 | return ret; 134 | } 135 | } 136 | 137 | void print(treeNode* node) 138 | { 139 | auto tmp = exp(node->child[0]); 140 | switch(tmp->attrKind) 141 | { 142 | case AttrKind::Text: 143 | cout<text; 144 | break; 145 | case AttrKind::Boolean: 146 | cout<<(tmp->attr.boolean?"true":"false"); 147 | break; 148 | case AttrKind::Integer: 149 | cout<attr.integer; 150 | break; 151 | case AttrKind::Decmical: 152 | cout<attr.decmical; 153 | break; 154 | } 155 | cout<child[0]); 162 | auto thenPart = node->child[1]; 163 | auto elsePart = node->child[2]; 164 | if(condition->attr.boolean==true) 165 | { 166 | if(thenPart!=nullptr)stmtSequence(thenPart); 167 | } 168 | else if(elsePart!=nullptr) 169 | { 170 | stmtSequence(elsePart); 171 | } 172 | delete condition; 173 | } 174 | void whileStmt(treeNode* node) 175 | { 176 | auto stmtClosure = node->child[1]; 177 | auto condition = exp(node->child[0]); 178 | //varclosure============================================================= 179 | inLoop++; 180 | constructClosure(); 181 | while(condition->attr.boolean) 182 | { 183 | if(stmtClosure!=nullptr)stmtSequence(stmtClosure); 184 | if(jumpLoop)jumpLoop=false; 185 | if(exitLoop) 186 | { 187 | exitLoop=false; 188 | break; 189 | } 190 | delete condition; 191 | condition = exp(node->child[0]); 192 | } 193 | destructClosure(); 194 | inLoop--; 195 | delete condition; 196 | } 197 | void doStmt(treeNode* node) 198 | { 199 | auto stmtClosure = node->child[0]; 200 | treeNode* condition = nullptr; 201 | inLoop++; 202 | constructClosure(); 203 | do 204 | { 205 | if(stmtClosure!=nullptr)stmtSequence(stmtClosure); 206 | if(jumpLoop)jumpLoop=false; 207 | if(exitLoop) 208 | { 209 | exitLoop=false; 210 | break; 211 | } 212 | if(condition!=nullptr)delete condition; 213 | condition = exp(node->child[1]); 214 | }while(condition->attr.boolean); 215 | destructClosure(); 216 | inLoop--; 217 | delete condition; 218 | } 219 | void forStmt(treeNode* node) 220 | { 221 | //auto declStmt = 222 | } 223 | void _break() 224 | { 225 | if(inLoop==0)reportError(Error::notAllowedBreak); 226 | exitLoop=true; 227 | } 228 | void _continue() 229 | { 230 | if(inLoop==0)reportError(Error::notAllowedContinue); 231 | jumpLoop=true; 232 | } 233 | 234 | treeNode* idExp(treeNode* node) 235 | { 236 | auto left = node->child[0]; 237 | auto name = node->child[1]->text; 238 | auto right = node->child[2]; 239 | auto var = getVar(name); 240 | if(left!=nullptr) 241 | { 242 | if(var->kind==AttrKind::Integer) 243 | { 244 | var->value.integer++; 245 | } 246 | else if(var->kind==AttrKind::Decmical) 247 | { 248 | var->value.decmical++; 249 | } 250 | else reportError(Error::errorType); 251 | return new treeNode(ExpKind::idExp,name); 252 | } 253 | if(right!=nullptr) 254 | { 255 | auto tmp = new treeNode(ExpKind::idExp,name); 256 | if(var->kind==AttrKind::Integer) 257 | { 258 | var->value.integer++; 259 | } 260 | else if(var->kind==AttrKind::Decmical) 261 | { 262 | var->value.decmical++; 263 | } 264 | else reportError(Error::errorType); 265 | return tmp; 266 | } 267 | 268 | if(var->kind==AttrKind::Integer) return new treeNode(var->value.integer); 269 | else if(var->kind==AttrKind::Decmical) return new treeNode(var->value.decmical); 270 | else if(var->kind==AttrKind::Boolean) return new treeNode(var->value.boolean); 271 | else if(var->kind==AttrKind::Text) return new treeNode(var->text); 272 | } 273 | 274 | void declareSequence(treeNode* node,string flag) 275 | { 276 | auto id = node->child[0]; 277 | auto val = node->child[1]; 278 | if(node->kind.expKind==ExpKind::idExp) 279 | { 280 | auto defalutVal = new Var(); 281 | if(flag=="int") {defalutVal->value.integer=0;defalutVal->kind=AttrKind::Integer;} 282 | else if(flag=="float") {defalutVal->value.decmical=0;defalutVal->kind=AttrKind::Decmical;} 283 | else if(flag=="bool") {defalutVal->value.boolean=false;defalutVal->kind=AttrKind::Boolean;} 284 | else if(flag=="string") {defalutVal->text="";defalutVal->kind=AttrKind::Text;} 285 | setVar(node->text,defalutVal); 286 | } 287 | else if(id->child[0]!=nullptr)//是数组!麻烦死了 288 | { 289 | // auto p1 = id->child[0]; 290 | // auto p2 = val; 291 | 292 | } 293 | else 294 | { 295 | auto var = new Var(); 296 | if(val->sibling!=nullptr)reportError(Error::errorType); 297 | val = exp(val); 298 | if(flag=="int") 299 | { 300 | if(val->attrKind!=AttrKind::Integer)reportError(Error::errorType); 301 | var->value.integer=val->attr.integer; 302 | var->kind=AttrKind::Integer; 303 | } 304 | else if(flag=="float") 305 | { 306 | if(val->attrKind!=AttrKind::Decmical)reportError(Error::errorType); 307 | var->value.decmical=val->attr.decmical; 308 | var->kind=AttrKind::Decmical; 309 | } 310 | else if(flag=="bool") 311 | { 312 | if(val->attrKind!=AttrKind::Boolean)reportError(Error::errorType); 313 | var->value.boolean=val->attr.boolean; 314 | var->kind=AttrKind::Boolean; 315 | } 316 | else if(flag=="string") 317 | { 318 | if(val->attrKind!=AttrKind::Text)reportError(Error::errorType); 319 | var->text=val->text; 320 | var->kind=AttrKind::Text; 321 | } 322 | setVar(id->text,var); 323 | delete val; 324 | } 325 | if(node->sibling!=nullptr)declareSequence(node->sibling,flag); 326 | } 327 | void declareStmt(treeNode* node) 328 | { 329 | declareSequence(node->child[1], node->child[0]->text); 330 | } 331 | 332 | void assignStmt(treeNode* node) 333 | { 334 | treeNode* left = idExp(node->child[0]); 335 | if(node->child[1]!=nullptr) 336 | { 337 | treeNode* right = exp(node->child[2]); 338 | string op = node->child[1]->text; 339 | if(node->child[0]->child[3]!=nullptr)reportError(Error::notAllowedSelfOp); 340 | auto var = getVar(left->text); 341 | if(var->kind!=right->attrKind)reportError(Error::errorType); 342 | if(var->kind==AttrKind::Boolean||right->attrKind==AttrKind::Boolean)reportError(Error::errorType); 343 | 344 | if(op=="=") 345 | { 346 | switch(var->kind) 347 | { 348 | case AttrKind::Integer:var->value.integer=right->attr.integer;break; 349 | case AttrKind::Decmical:var->value.decmical=right->attr.decmical;break; 350 | case AttrKind::Text:var->text=right->text;break; 351 | } 352 | } 353 | else if(op=="+=") 354 | { 355 | switch(var->kind) 356 | { 357 | case AttrKind::Integer:var->value.integer+=right->attr.integer;break; 358 | case AttrKind::Decmical:var->value.decmical+=right->attr.decmical;break; 359 | case AttrKind::Text:var->text=var->text+right->text;break; 360 | } 361 | } 362 | else if(op=="-=") 363 | { 364 | switch(var->kind) 365 | { 366 | case AttrKind::Integer:var->value.integer-=right->attr.integer;break; 367 | case AttrKind::Decmical:var->value.decmical-=right->attr.decmical;break; 368 | case AttrKind::Text:reportError(Error::notAllowOpInString);break; 369 | } 370 | } 371 | else if(op=="*=") 372 | { 373 | switch(var->kind) 374 | { 375 | case AttrKind::Integer:var->value.integer*=right->attr.integer;break; 376 | case AttrKind::Decmical:var->value.decmical*=right->attr.decmical;break; 377 | case AttrKind::Text:reportError(Error::notAllowOpInString);break; 378 | } 379 | } 380 | else if(op=="/=") 381 | { 382 | switch(var->kind) 383 | { 384 | case AttrKind::Integer:var->value.integer/=right->attr.integer;break; 385 | case AttrKind::Decmical:var->value.decmical/=right->attr.decmical;break; 386 | case AttrKind::Text:reportError(Error::notAllowOpInString);break; 387 | } 388 | } 389 | } 390 | } 391 | void read(treeNode* node) 392 | { 393 | auto id = node->child[0]; 394 | if(id->kind.expKind!=ExpKind::idExp)reportError(Error::lackIdentifiter); 395 | auto var = getVar(id->text); 396 | if(var->kind==AttrKind::Text) 397 | getline(cin,var->text); 398 | else if(var->kind==AttrKind::Integer) 399 | cin>>var->value.integer; 400 | else if(var->kind==AttrKind::Boolean) 401 | cin>>var->value.boolean; 402 | else if(var->kind==AttrKind::Decmical) 403 | cin>>var->value.decmical; 404 | // cout<<2333333333; 405 | } 406 | void statement(treeNode* node) 407 | { 408 | switch(node->kind.stmtKind) 409 | { 410 | case StmtKind::ifStmt:ifStmt(node);break; 411 | case StmtKind::printStmt:print(node);break; 412 | case StmtKind::whileRpt:whileStmt(node);break; 413 | case StmtKind::doRpt:doStmt(node);break; 414 | case StmtKind::forRpt:forStmt(node);break; 415 | case StmtKind::continueStmt:_continue();break; 416 | case StmtKind::assignStmt:assignStmt(node);break; 417 | case StmtKind::declareStmt:declareStmt(node);break; 418 | case StmtKind::readStmt:read(node);break; 419 | case StmtKind::breakStmt:_break();break; 420 | } 421 | } 422 | void stmtSequence(treeNode* node) 423 | { 424 | statement(node); 425 | if(jumpLoop||exitLoop)return; 426 | if(node->sibling!=nullptr)stmtSequence(node->sibling); 427 | } 428 | void execute(treeNode* tree) 429 | { 430 | closures.push_front(VarClosure()); 431 | stmtSequence(tree); 432 | } 433 | } 434 | #endif -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include"scaner.cpp" 5 | #include"parser.cpp" 6 | #include"executor.cpp" 7 | using namespace std; 8 | int main() 9 | { 10 | cout<<"Please input the script path:"<>path; 13 | ifstream file(path); 14 | treeNode* tree=parse(file); 15 | Executor::execute(tree); 16 | file.close(); 17 | } -------------------------------------------------------------------------------- /src/parser.cpp: -------------------------------------------------------------------------------- 1 | #ifndef PARSER 2 | #define PARSER 3 | #include 4 | #include"scaner.cpp" 5 | using namespace std; 6 | enum class NodeKind:int {statement,expression}; 7 | enum class StmtKind:int {Unknown,ifStmt,doRpt,whileRpt,forRpt,assignStmt,declareStmt,continueStmt,readStmt,printStmt,breakStmt}; 8 | enum ExpKind {opExp,constExp,idExp,Unknown}; 9 | enum AttrKind {Integer,Decmical,Boolean,Text}; 10 | class treeNode 11 | { 12 | public: 13 | treeNode()=default; 14 | treeNode(NodeKind kind) 15 | { 16 | nodeKind=kind; 17 | if(kind==NodeKind::expression) 18 | this->kind.expKind=ExpKind::Unknown; 19 | else 20 | this->kind.stmtKind=StmtKind::Unknown; 21 | } 22 | treeNode(StmtKind stmt,string text) 23 | { 24 | nodeKind=NodeKind::statement; 25 | kind.stmtKind=stmt; 26 | this->text=text; 27 | } 28 | treeNode(ExpKind exp,string text) 29 | { 30 | kind.expKind=exp; 31 | nodeKind=NodeKind::expression; 32 | this->text=text; 33 | } 34 | explicit treeNode(int integer) 35 | { 36 | attr.integer=integer; 37 | attrKind=AttrKind::Integer; 38 | nodeKind=NodeKind::expression; 39 | kind.expKind=ExpKind::constExp; 40 | text=to_string(integer); 41 | } 42 | explicit treeNode(float decmical) 43 | { 44 | attr.decmical=decmical; 45 | attrKind=AttrKind::Decmical; 46 | nodeKind=NodeKind::expression; 47 | kind.expKind=ExpKind::constExp; 48 | text=to_string(decmical); 49 | } 50 | explicit treeNode(bool boolean) 51 | { 52 | attr.boolean=boolean; 53 | attrKind=AttrKind::Boolean; 54 | nodeKind=NodeKind::expression; 55 | kind.expKind=ExpKind::constExp; 56 | text=boolean?"true":"false"; 57 | } 58 | treeNode(string text) 59 | { 60 | this->text=text; 61 | attrKind=AttrKind::Text; 62 | nodeKind=NodeKind::expression; 63 | kind.expKind=ExpKind::constExp; 64 | } 65 | LineNo lineNo; 66 | 67 | NodeKind nodeKind=NodeKind::statement; 68 | union Kind 69 | { 70 | Kind(){} 71 | StmtKind stmtKind=StmtKind::Unknown; 72 | ExpKind expKind; 73 | }kind; 74 | 75 | treeNode* child[3]={nullptr,nullptr,nullptr}; 76 | treeNode* sibling = nullptr; 77 | 78 | string text; 79 | AttrKind attrKind=AttrKind::Text; 80 | union Attr 81 | { 82 | Attr(){} 83 | ~Attr(){} 84 | int integer; 85 | float decmical; 86 | bool boolean; 87 | }attr; 88 | }; 89 | 90 | Token nextToken,preToken; 91 | istream *file; 92 | 93 | enum class Error{lackRightBucket,notAllowedContinue,notAllowOpInString,notAllowedSelfOp,notAllowedBreak,unknownKey,errorBool,divZero,errorType,UndefinedID,illegalKey,lackLeftBucket,lackSem,lackWhile,lackExp,unknownKind,lackIdentifiter,Empty,lackConst}; 94 | map errorTable={ 95 | {Error::lackRightBucket,"缺少右括号'}'、')'、']'或者分号';'"}, 96 | {Error::lackExp,"缺少表达式"}, 97 | {Error::unknownKind,"未知的数据类型"}, 98 | {Error::unknownKey,"未知的关键字"}, 99 | {Error::lackIdentifiter,"缺少标识符、表达式或']'"}, 100 | {Error::lackConst,"缺少或未知的常量"}, 101 | {Error::lackWhile,"此处应有关键字while"}, 102 | {Error::divZero,"除数为零"}, 103 | {Error::illegalKey,"未定义的关键字或缺少赋值表达式"}, 104 | {Error::lackSem,"缺少分号"}, 105 | {Error::lackLeftBucket,"缺少左括号'{'、'('或'['"}, 106 | {Error::UndefinedID,"未定义的变量"}, 107 | {Error::errorType,"数据类型错误或不匹配"}, 108 | {Error::errorBool,"布尔类型不可运算"}, 109 | {Error::notAllowedContinue,"不在循环里continue个p"}, 110 | {Error::notAllowedBreak,"不在循环和switch里break个p"}, 111 | {Error::notAllowedSelfOp,"赋值语句中左值不可使用后缀形式的自增运算"}, 112 | {Error::notAllowOpInString,"我想你该好好思考 这个操作对字符串到底是什么意思"} 113 | }; 114 | 115 | void reportError(Error error) 116 | { 117 | cout<clear(); 120 | file->seekg(0,ios::beg); 121 | for(int i=nextToken.lineNo.row;i>0;i--) 122 | getline(*file,line); 123 | cout<child[0]=new treeNode(ExpKind::opExp,preToken.text); 202 | } 203 | ret->child[1]=identifider(); 204 | if(match("++")||match("--")) 205 | { 206 | ret->child[2]=new treeNode(ExpKind::opExp,preToken.text); 207 | } 208 | 209 | if(ret->child[0]==nullptr&&ret->child[2]==nullptr) 210 | { 211 | auto tmp = ret->child[1]; 212 | delete ret; 213 | return tmp; 214 | } 215 | else 216 | return ret; 217 | } 218 | 219 | treeNode* factor() 220 | { 221 | if(match("(")) 222 | { 223 | treeNode* ret=exp(); 224 | match(")",Error::lackRightBucket); 225 | return ret; 226 | } 227 | else if(nextToken.text=="false"||nextToken.text=="true"||nextToken.kind==Token::Integer||nextToken.kind==Token::String||nextToken.kind==Token::Char||nextToken.kind==Token::Demical) 228 | { 229 | return constVal(); 230 | } 231 | else 232 | { 233 | return identifiderExp(); 234 | } 235 | } 236 | 237 | treeNode* term() 238 | { 239 | auto pfactor=factor(); 240 | if(match("*")||match("/")) 241 | { 242 | treeNode* ret = new treeNode(NodeKind::expression); 243 | ret->child[0]=pfactor; 244 | ret->child[1]=new treeNode(ExpKind::opExp,preToken.text); 245 | ret->child[2]=term(); 246 | return ret; 247 | } 248 | else 249 | { 250 | return pfactor; 251 | } 252 | } 253 | 254 | treeNode* simpleExp() 255 | { 256 | auto pterm=term(); 257 | if(match("+")||match("-")) 258 | { 259 | treeNode* ret=new treeNode(NodeKind::expression); 260 | ret->child[0]=pterm; 261 | ret->child[1]=new treeNode(ExpKind::opExp,preToken.text); 262 | ret->child[2]=simpleExp(); 263 | return ret; 264 | } 265 | else 266 | { 267 | return pterm; 268 | } 269 | } 270 | 271 | treeNode* comparisonExp() 272 | { 273 | auto psimpleExp=simpleExp(); 274 | if(match(">")||match("<")||match("==")||match(">=")||match("<=")||match("=>")||match("=<")||match("!=")) 275 | { 276 | treeNode* ret=new treeNode(NodeKind::expression); 277 | ret->child[0]=psimpleExp; 278 | ret->child[1]=new treeNode(ExpKind::opExp,preToken.text); 279 | ret->child[2]=comparisonExp(); 280 | return ret; 281 | } 282 | else 283 | { 284 | return psimpleExp; 285 | } 286 | } 287 | 288 | treeNode* logicExp() 289 | { 290 | auto pcomExp=comparisonExp(); 291 | if(match("&&")||match("||")) 292 | { 293 | treeNode* ret=new treeNode(NodeKind::expression); 294 | ret->child[0]=pcomExp; 295 | ret->child[1]=new treeNode(ExpKind::opExp,preToken.text); 296 | ret->child[2]=logicExp(); 297 | return ret; 298 | } 299 | else 300 | { 301 | return pcomExp; 302 | } 303 | } 304 | 305 | treeNode* exp() 306 | { 307 | if(match("!")) 308 | { 309 | treeNode* ret=new treeNode(NodeKind::expression); 310 | ret->child[0]=new treeNode(ExpKind::opExp,"!"); 311 | ret->child[1]=exp(); 312 | return ret; 313 | } 314 | else 315 | return logicExp(); 316 | 317 | } 318 | 319 | treeNode* identifider() 320 | { 321 | treeNode* id = ID(); 322 | if(match("[")) 323 | { 324 | if(nextToken.text!="]") 325 | id->child[0]=exp(); 326 | else 327 | id->child[0]=new treeNode(-1);//数组大小根据后接的表达式推测 328 | match("]",Error::lackRightBucket); 329 | auto p=id->child[0]; 330 | while(match("[")) 331 | { 332 | p->sibling=(nextToken.text=="]"?new treeNode(-1):exp()); 333 | p=p->sibling; 334 | match("]",Error::lackRightBucket); 335 | } 336 | } 337 | return id; 338 | } 339 | 340 | treeNode* valType() 341 | { 342 | if(!(match("int")||match("float")||match("bool")||match("byte")||match("string")||match("char"))) 343 | reportError(Error::unknownKind); 344 | return new treeNode(StmtKind::declareStmt,preToken.text); 345 | } 346 | 347 | treeNode* arrayClosure() 348 | { 349 | if(match("{")) 350 | { 351 | auto ret = new treeNode(StmtKind::declareStmt,"sequence"); 352 | ret->child[0]=arrayClosure(); 353 | auto p=ret->child[0]; 354 | while(match(",")) 355 | { 356 | p->sibling=arrayClosure(); 357 | p=p->sibling; 358 | } 359 | match("}",Error::lackRightBucket); 360 | return ret; 361 | } 362 | else 363 | { 364 | return exp(); 365 | } 366 | } 367 | treeNode* declare() 368 | { 369 | auto iden = identifider(); 370 | if(match("=")) 371 | { 372 | auto ret = new treeNode(StmtKind::declareStmt,"sequence"); 373 | ret->child[0]=iden; 374 | ret->child[1]=arrayClosure(); 375 | return ret; 376 | } 377 | else 378 | return iden; 379 | } 380 | treeNode* declareSequence() 381 | { 382 | auto ret = declare(); 383 | auto p=ret; 384 | while(match(",")) 385 | { 386 | p->sibling=declare(); 387 | p=p->sibling; 388 | } 389 | return ret; 390 | } 391 | treeNode* declareStmt() 392 | { 393 | auto ret = new treeNode(StmtKind::declareStmt,""); 394 | ret->child[0]=valType(); 395 | ret->child[1]=declareSequence(); 396 | return ret; 397 | } 398 | treeNode* assignStmt() 399 | { 400 | auto ret = new treeNode(StmtKind::assignStmt,""); 401 | ret->child[0]=identifiderExp(); 402 | if(match("=")||match("+=")||match("-=")||match("*=")||match("/=")) 403 | { 404 | ret->child[1]=new treeNode(ExpKind::opExp,preToken.text); 405 | ret->child[2]=exp(); 406 | } 407 | return ret; 408 | } 409 | treeNode* doStmt() 410 | { 411 | auto ret = new treeNode(StmtKind::doRpt,""); 412 | match("do"); 413 | ret->child[0]=statementClosure(); 414 | match("while",Error::lackWhile); 415 | match("("); 416 | ret->child[1]=exp(); 417 | match(")",Error::lackRightBucket); 418 | return ret; 419 | } 420 | treeNode* whileStmt() 421 | { 422 | auto ret = new treeNode(StmtKind::whileRpt,""); 423 | match("while"); 424 | match("("); 425 | ret->child[0]=exp(); 426 | match(")",Error::lackRightBucket); 427 | ret->child[1]=statementClosure(); 428 | return ret; 429 | } 430 | treeNode* forStmt() 431 | { 432 | auto ret = new treeNode(StmtKind::forRpt,""); 433 | auto forExp = new treeNode(StmtKind::forRpt,"forExp"); 434 | ret->child[0]=forExp; 435 | match("for"); 436 | match("("); 437 | forExp->child[0]=statement(); 438 | match(";",Error::lackSem); 439 | forExp->child[1]=(nextToken.text==";"?nullptr:exp()); 440 | match(";",Error::lackSem); 441 | forExp->child[2]=statement(); 442 | match(")",Error::lackRightBucket); 443 | ret->child[1]=statementClosure(); 444 | return ret; 445 | } 446 | treeNode* ifStmt() 447 | { 448 | auto ret = new treeNode(StmtKind::ifStmt,""); 449 | match("if"); 450 | match("("); 451 | ret->child[0]=exp(); 452 | match(")",Error::lackRightBucket); 453 | ret->child[1]=statementClosure(); 454 | if(match("else")) 455 | ret->child[2]=statementClosure(); 456 | return ret; 457 | } 458 | treeNode* statementClosure() 459 | { 460 | if(match("{")) 461 | { 462 | treeNode* ret = nullptr; 463 | if(nextToken.text!="}")ret = stmtSequence(); 464 | match("}",Error::lackRightBucket); 465 | return ret; 466 | } 467 | else 468 | { 469 | auto ret = statement(); 470 | switch(ret->kind.stmtKind) 471 | { 472 | case StmtKind::assignStmt: 473 | case StmtKind::breakStmt: 474 | case StmtKind::continueStmt: 475 | case StmtKind::doRpt: 476 | case StmtKind::printStmt: 477 | case StmtKind::readStmt: 478 | case StmtKind::declareStmt: 479 | match(";",Error::lackSem); 480 | break; 481 | } 482 | return ret; 483 | } 484 | } 485 | treeNode* readStmt() 486 | { 487 | auto ret = new treeNode(StmtKind::readStmt,""); 488 | match("read"); 489 | ret->child[0]=identifider(); 490 | return ret; 491 | } 492 | treeNode* printStmt() 493 | { 494 | auto ret = new treeNode(StmtKind::printStmt,""); 495 | match("print"); 496 | ret->child[0]=exp(); 497 | return ret; 498 | } 499 | treeNode* statement() 500 | { 501 | auto flag = nextToken.text; 502 | treeNode* ret=nullptr; 503 | if(flag=="if") 504 | return ifStmt(); 505 | else if(flag=="read") 506 | return readStmt(); 507 | else if(flag=="print") 508 | return printStmt(); 509 | else if(match("continue")) 510 | return new treeNode(StmtKind::continueStmt,""); 511 | else if(match("break")) 512 | return new treeNode(StmtKind::breakStmt,""); 513 | else if(flag=="do") 514 | ret = doStmt(); 515 | else if(flag=="while") 516 | return whileStmt(); 517 | else if(flag=="for") 518 | return forStmt(); 519 | else if(flag==";") 520 | return nullptr; 521 | else if(flag=="int"||flag=="float"||flag=="char"||flag=="string"||flag=="bool"||flag=="byte") 522 | ret = declareStmt(); 523 | else if(nextToken.kind==Token::ID) 524 | ret = assignStmt(); 525 | else 526 | return nullptr; 527 | 528 | 529 | //match(";",Error::lackSem); 530 | return ret; 531 | } 532 | treeNode* stmtSequence() 533 | { 534 | treeNode* ret=nullptr; 535 | treeNode* p=nullptr; 536 | treeNode* pre=nullptr; 537 | while(nextToken.kind!=Token::Eof&&nextToken.text!="}") 538 | { 539 | p=statement(); 540 | if(p!=nullptr) 541 | { 542 | if(pre!=nullptr)pre->sibling=p;else ret=p; 543 | pre=p; 544 | switch(pre->kind.stmtKind) 545 | { 546 | case StmtKind::assignStmt: 547 | case StmtKind::breakStmt: 548 | case StmtKind::continueStmt: 549 | case StmtKind::doRpt: 550 | case StmtKind::printStmt: 551 | case StmtKind::readStmt: 552 | case StmtKind::declareStmt: 553 | match(";",Error::lackSem); 554 | break; 555 | } 556 | } 557 | } 558 | //match(";",Error::lackSem); 559 | return ret; 560 | } 561 | treeNode* parse(istream &stream) 562 | { 563 | file=&stream; 564 | nextToken = getToken(*file); 565 | return stmtSequence(); 566 | } 567 | 568 | 569 | #endif -------------------------------------------------------------------------------- /src/scaner.cpp: -------------------------------------------------------------------------------- 1 | #ifndef SCANER 2 | #define SCANER 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | struct LineNo 10 | { 11 | int row=0; 12 | int col=0; 13 | }; 14 | 15 | struct Token 16 | { 17 | enum Enum{Empty,Integer,Demical,String,Char,ID,Sign,Undefined,Comment,Eof}kind=Empty; 18 | Token(){} 19 | Token(Enum k,string t):kind(k),text(t){} 20 | string text=""; 21 | LineNo lineNo; 22 | }; 23 | 24 | char c; 25 | int row=0,col=0; 26 | bool reserve = false; 27 | bool abandon = true; //设为true,使ret.text不记录未初始化的c 28 | 29 | inline bool isEnter() {return c=='\n';} 30 | inline bool isSpace() {return c==' ';} 31 | inline bool isLetter() {return (c>='a'&&c<='z')||(c>='A'&&c<='Z');} 32 | inline bool isReal() {return c>='0'&&c<='9';} 33 | inline bool isSingleSign() {return c=='{'||c=='}'||c=='('||c==')'||c=='['||c==']'||c==';'||c==',';} 34 | 35 | Token getToken(istream &file) 36 | { 37 | enum {start,inCommentSign,inCommentBlock,inCommentLine,exitCommentBlock, 38 | inCompare,inID,inInt,inDec,inSmaller,inGreater,inNot,inAdd,inSub, 39 | inAnd,inOr,inString,inChar,exitChar,inMul,done}state = start; 40 | Token ret; 41 | while(true) 42 | { 43 | if(reserve) 44 | reserve=false; 45 | else 46 | { 47 | if(abandon) 48 | abandon=false; 49 | else 50 | { 51 | ret.text+=c; 52 | } 53 | col++; 54 | 55 | if(!file.get(c)&&ret.kind==Token::Empty) 56 | { 57 | bool abandon = true; 58 | char c='\000'; 59 | return Token(Token::Eof,""); 60 | } 61 | } 62 | 63 | //done 64 | if(ret.kind!=Token::Empty) 65 | { 66 | reserve=true; 67 | if(ret.kind==Token::Comment)return getToken(file);//是注释就丢掉 68 | ret.lineNo.row=row; 69 | return ret; 70 | } 71 | 72 | switch(state) 73 | { 74 | case start: 75 | if(isEnter()) {state=start;abandon=true;row++;col=0;} 76 | else if(isSpace()) {state=start;abandon=true;} 77 | else if(isReal()) state=inInt; 78 | else if(isLetter()) state=inID; 79 | else if(c=='*') state=inMul; 80 | else if(c=='/') state=inCommentSign; 81 | else if(c=='=') state=inCompare; 82 | else if(c=='>') state=inGreater; 83 | else if(c=='<') state=inSmaller; 84 | else if(c=='!') state=inNot; 85 | else if(c=='+') state=inAdd; 86 | else if(c=='-') state=inSub; 87 | else if(c=='&') state=inAnd; 88 | else if(c=='|') state=inOr; 89 | else if(c=='"') {state=inString;abandon=true;} 90 | else if(c=='\'') state=inChar; 91 | else if(isSingleSign()) ret.kind=Token::Sign; 92 | else ret.kind=Token::Undefined; 93 | ret.lineNo.col=col; 94 | break; 95 | case inCommentSign: 96 | if(c=='*') state=inCommentBlock; 97 | else if(c=='/') state=inCommentLine; 98 | else if(c=='=') state=inInt; 99 | else {ret.kind=Token::Sign;reserve=true;} 100 | break; 101 | case inCommentBlock: 102 | if(c=='*') state=exitCommentBlock; 103 | //else state=inCommentBlock; 104 | break; 105 | case inCommentLine: 106 | if(isEnter()) {ret.kind=Token::Comment;reserve=true;} 107 | //else state=inCommentLine; 108 | break; 109 | case exitCommentBlock: 110 | if(c=='/') ret.kind=Token::Comment; 111 | else if(c=='*') state=exitCommentBlock; 112 | else state=inCommentBlock; 113 | break; 114 | case inCompare: 115 | if(c=='='||c=='>'||c=='<')ret.kind=Token::Sign; 116 | else {ret.kind=Token::Sign;reserve=true;} 117 | break; 118 | case inID: 119 | if(isReal()||isLetter())state=inID; 120 | else {ret.kind=Token::ID;reserve=true;} 121 | break; 122 | case inInt: 123 | if(isReal()) state=inInt; 124 | else if(c=='.') state=inDec; 125 | else {ret.kind=Token::Integer;reserve=true;} 126 | break; 127 | case inDec: 128 | if(isReal()) state=inDec; 129 | else {ret.kind=Token::Demical;reserve=true;} 130 | break; 131 | case inSmaller: 132 | if(c=='=') ret.kind=Token::Sign; 133 | else {ret.kind=Token::Sign;reserve=true;} 134 | break; 135 | case inGreater: 136 | if(c=='=') ret.kind=Token::Sign; 137 | else {ret.kind=Token::Sign;reserve=true;} 138 | break; 139 | case inNot: 140 | if(c=='=') ret.kind=Token::Sign; 141 | else {ret.kind=Token::Sign;reserve=true;} 142 | break; 143 | case inAdd: 144 | if(c=='=') ret.kind=Token::Sign; 145 | else if(c=='+') ret.kind=Token::Sign; 146 | else {ret.kind=Token::Sign;reserve=true;} 147 | break; 148 | case inOr: 149 | if(c=='|') ret.kind=Token::Sign; 150 | else {ret.kind=Token::Undefined;reserve=true;} 151 | break; 152 | case inString: 153 | if(c=='"') {ret.kind=Token::String;abandon=true;} 154 | else state=inString; 155 | break; 156 | case inChar: 157 | if(isEnter()) {ret.kind=Token::Undefined;reserve=true;} 158 | else state=exitChar; 159 | break; 160 | case exitChar: 161 | if(isEnter()) {ret.kind=Token::Undefined;;reserve=true;} 162 | else if(c=='\'') {ret.kind=Token::Char;} 163 | case inMul: 164 | if(c=='=') {ret.kind=Token::Sign;} 165 | else {ret.kind=Token::Sign;reserve=true;} 166 | break; 167 | case inAnd: 168 | if(c=='&') ret.kind=Token::Sign; 169 | else {ret.kind=Token::Undefined;reserve=true;} 170 | break; 171 | case inSub: 172 | if(c=='-') ret.kind=Token::Sign; 173 | else {ret.kind=Token::Sign;reserve=true;} 174 | break; 175 | } 176 | } 177 | } 178 | 179 | #endif -------------------------------------------------------------------------------- /src/unitTest.cpp: -------------------------------------------------------------------------------- 1 | #ifndef UNITTEST 2 | #define UNITTEST 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include"scaner.cpp" 9 | #include"parser.cpp" 10 | #include"executor.cpp" 11 | 12 | using namespace std; 13 | 14 | void testGetToken(ifstream &file) 15 | { 16 | string tokenTypeName[]={"Empty","Integer","Demical","String","Char","ID","Undefined","Comment","Eof"}; 17 | while(true) 18 | { 19 | Token token=getToken(file); 20 | if(token.kind==Token::Eof) 21 | break; 22 | else 23 | { 24 | cout<<"Token:"; 25 | cout.width(20); 26 | cout.fill(' '); 27 | cout.setf(ios::left); 28 | cout<nodeKind==NodeKind::statement ? STMTK[(int)node->kind.stmtKind] : EXPK[node->kind.expKind]); 55 | case 1:return node->text; 56 | } 57 | } 58 | PrintableTree* getChild(int index)override 59 | { 60 | return node->child[index]==nullptr ? nullptr : new TREE(node->child[index]); 61 | } 62 | }; 63 | //w:13*3+1 h:6 64 | void outputTree(treeNode* tree,ostream &stream,string leftSpace="",bool isLast = false,int index=0,bool isTop = true,bool isSibling=false) 65 | { 66 | string STMTK[]={"statement","ifStmt","doRpt","whileRpt","forRpt","asgnStmt","declStmt","continueStmt","readStmt","printStmt","breakStmt"}; 67 | string EXPK[]={"opExp","constExp","idExp","exp"}; 68 | if(tree!=nullptr) 69 | { 70 | 71 | if(!isTop) 72 | { 73 | if(isSibling) 74 | { 75 | stream<nodeKind==NodeKind::statement ? STMTK[(int)tree->kind.stmtKind] : EXPK[tree->kind.expKind]); 92 | stream<text<child[0]!=nullptr||tree->child[1]!=nullptr||tree->child[2]!=nullptr) 95 | { 96 | outputTree(tree->child[0],stream,leftSpace,false,0,false); 97 | outputTree(tree->child[1],stream,leftSpace,false,1,false); 98 | outputTree(tree->child[2],stream,leftSpace,true,2,false); 99 | } 100 | else if(isLast)stream<sibling!=nullptr) 105 | { 106 | stream<sibling,stream,leftSpace,p->sibling->sibling==nullptr,0,false,true); 109 | p=p->sibling; 110 | } 111 | 112 | } 113 | 114 | } 115 | else 116 | { 117 | stream<target) 7 | print "Too large!"; 8 | else if(i