├── README.md
├── documents
├── 设计文档-lab1.pdf
├── 设计文档-lab2.pdf
├── 设计文档-lab3.pdf
└── 设计文档-lab4.pdf
├── lab1
├── .idea
│ ├── lab1.iml
│ ├── misc.xml
│ ├── modules.xml
│ └── workspace.xml
├── CMakeLists.txt
├── cmake-build-debug
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ │ ├── 3.14.2
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ └── CompilerIdC
│ │ │ │ ├── CMakeCCompilerId.c
│ │ │ │ └── a.out
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── CMakeOutput.log
│ │ ├── Makefile.cmake
│ │ ├── Makefile2
│ │ ├── TargetDirectories.txt
│ │ ├── clion-environment.txt
│ │ ├── clion-log.txt
│ │ ├── cmake.check_cache
│ │ ├── feature_tests.bin
│ │ ├── feature_tests.c
│ │ ├── lab1.dir
│ │ │ ├── C.includecache
│ │ │ ├── DependInfo.cmake
│ │ │ ├── build.make
│ │ │ ├── cmake_clean.cmake
│ │ │ ├── depend.internal
│ │ │ ├── depend.make
│ │ │ ├── flags.make
│ │ │ ├── link.txt
│ │ │ ├── main.c.o
│ │ │ └── progress.make
│ │ └── progress.marks
│ ├── Makefile
│ ├── cmake_install.cmake
│ ├── lab1
│ ├── lab1.cbp
│ └── output_file.txt
├── input_file.txt
├── main.c
└── output_file.txt
├── lab2
├── .idea
│ ├── lab2.iml
│ ├── misc.xml
│ ├── modules.xml
│ └── workspace.xml
├── CMakeLists.txt
├── action_table.txt
├── cmake-build-debug
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ │ ├── 3.14.2
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ ├── CompilerIdC
│ │ │ │ ├── CMakeCCompilerId.c
│ │ │ │ └── a.out
│ │ │ └── CompilerIdCXX
│ │ │ │ ├── CMakeCXXCompilerId.cpp
│ │ │ │ └── a.out
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── CMakeOutput.log
│ │ ├── Makefile.cmake
│ │ ├── Makefile2
│ │ ├── TargetDirectories.txt
│ │ ├── clion-environment.txt
│ │ ├── clion-log.txt
│ │ ├── cmake.check_cache
│ │ ├── feature_tests.bin
│ │ ├── feature_tests.c
│ │ ├── feature_tests.cxx
│ │ ├── lab2.dir
│ │ │ ├── CXX.includecache
│ │ │ ├── DependInfo.cmake
│ │ │ ├── build.make
│ │ │ ├── cmake_clean.cmake
│ │ │ ├── depend.internal
│ │ │ ├── depend.make
│ │ │ ├── flags.make
│ │ │ ├── link.txt
│ │ │ ├── main.cpp.o
│ │ │ └── progress.make
│ │ └── progress.marks
│ ├── Makefile
│ ├── cmake_install.cmake
│ ├── lab2
│ └── lab2.cbp
├── goto_table.txt
├── input_file.txt
├── main.cpp
└── output_file.txt
├── lab3
├── .idea
│ ├── lab3.iml
│ ├── misc.xml
│ ├── modules.xml
│ └── workspace.xml
├── CMakeLists.txt
├── action_table.txt
├── cmake-build-debug
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ │ ├── 3.14.2
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ ├── CompilerIdC
│ │ │ │ ├── CMakeCCompilerId.c
│ │ │ │ └── a.out
│ │ │ └── CompilerIdCXX
│ │ │ │ ├── CMakeCXXCompilerId.cpp
│ │ │ │ └── a.out
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── CMakeOutput.log
│ │ ├── Makefile.cmake
│ │ ├── Makefile2
│ │ ├── TargetDirectories.txt
│ │ ├── clion-environment.txt
│ │ ├── clion-log.txt
│ │ ├── cmake.check_cache
│ │ ├── feature_tests.bin
│ │ ├── feature_tests.c
│ │ ├── feature_tests.cxx
│ │ ├── lab3.dir
│ │ │ ├── CXX.includecache
│ │ │ ├── DependInfo.cmake
│ │ │ ├── build.make
│ │ │ ├── cmake_clean.cmake
│ │ │ ├── depend.internal
│ │ │ ├── depend.make
│ │ │ ├── flags.make
│ │ │ ├── link.txt
│ │ │ ├── main.cpp.o
│ │ │ └── progress.make
│ │ └── progress.marks
│ ├── Makefile
│ ├── cmake_install.cmake
│ ├── lab3
│ └── lab3.cbp
├── goto_table.txt
├── input_file.txt
├── main.cpp
└── output_file.txt
└── lab4
├── .idea
├── lab4.iml
├── misc.xml
├── modules.xml
└── workspace.xml
├── CMakeLists.txt
├── action_table.txt
├── cmake-build-debug
├── CMakeCache.txt
├── CMakeFiles
│ ├── 3.14.2
│ │ ├── CMakeCCompiler.cmake
│ │ ├── CMakeCXXCompiler.cmake
│ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ ├── CMakeSystem.cmake
│ │ ├── CompilerIdC
│ │ │ ├── CMakeCCompilerId.c
│ │ │ └── a.out
│ │ └── CompilerIdCXX
│ │ │ ├── CMakeCXXCompilerId.cpp
│ │ │ └── a.out
│ ├── CMakeDirectoryInformation.cmake
│ ├── CMakeOutput.log
│ ├── Makefile.cmake
│ ├── Makefile2
│ ├── TargetDirectories.txt
│ ├── clion-environment.txt
│ ├── clion-log.txt
│ ├── cmake.check_cache
│ ├── feature_tests.bin
│ ├── feature_tests.c
│ ├── feature_tests.cxx
│ ├── lab4.dir
│ │ ├── CXX.includecache
│ │ ├── DependInfo.cmake
│ │ ├── build.make
│ │ ├── cmake_clean.cmake
│ │ ├── depend.internal
│ │ ├── depend.make
│ │ ├── flags.make
│ │ ├── link.txt
│ │ ├── main.cpp.o
│ │ └── progress.make
│ └── progress.marks
├── Makefile
├── cmake_install.cmake
├── lab4
└── lab4.cbp
├── goto_table.txt
├── input_file.txt
├── main.cpp
├── output_file.txt
└── target_code_file.txt
/README.md:
--------------------------------------------------------------------------------
1 | # HITsz-Compilation-Principle-Project
2 | 哈工大(深圳)编译原理实验
3 |
--------------------------------------------------------------------------------
/documents/设计文档-lab1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/documents/设计文档-lab1.pdf
--------------------------------------------------------------------------------
/documents/设计文档-lab2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/documents/设计文档-lab2.pdf
--------------------------------------------------------------------------------
/documents/设计文档-lab3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/documents/设计文档-lab3.pdf
--------------------------------------------------------------------------------
/documents/设计文档-lab4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/documents/设计文档-lab4.pdf
--------------------------------------------------------------------------------
/lab1/.idea/lab1.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lab1/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/lab1/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lab1/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | 1605010558987
117 |
118 |
119 | 1605010558987
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 | *single_set[i]
160 | ObjectiveC
161 | EXPRESSION
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
--------------------------------------------------------------------------------
/lab1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(lab1 C)
3 |
4 | set(CMAKE_C_STANDARD 99)
5 |
6 | add_executable(lab1 main.c)
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/3.14.2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "10.0.0.10001044")
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 "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "")
21 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "")
23 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
24 | set(CMAKE_MT "")
25 | set(CMAKE_COMPILER_IS_GNUCC )
26 | set(CMAKE_C_COMPILER_LOADED 1)
27 | set(CMAKE_C_COMPILER_WORKS TRUE)
28 | set(CMAKE_C_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_C_COMPILER_ID_RUN 1)
42 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
43 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
44 | set(CMAKE_C_LINKER_PREFERENCE 10)
45 |
46 | # Save compiler ABI information.
47 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
48 | set(CMAKE_C_COMPILER_ABI "")
49 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
50 |
51 | if(CMAKE_C_SIZEOF_DATA_PTR)
52 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
53 | endif()
54 |
55 | if(CMAKE_C_COMPILER_ABI)
56 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
57 | endif()
58 |
59 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
60 | set(CMAKE_LIBRARY_ARCHITECTURE "")
61 | endif()
62 |
63 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
64 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
65 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
66 | endif()
67 |
68 |
69 |
70 |
71 |
72 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
73 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
74 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
75 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
76 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/3.14.2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab1/cmake-build-debug/CMakeFiles/3.14.2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/3.14.2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-18.2.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "18.2.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-18.2.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "18.2.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/3.14.2/CompilerIdC/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab1/cmake-build-debug/CMakeFiles/3.14.2/CompilerIdC/a.out
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/DWL/Desktop/projects/lab1")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/DWL/Desktop/projects/lab1/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 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/Makefile.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # The generator used is:
5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
6 |
7 | # The top level Makefile was generated from the following files:
8 | set(CMAKE_MAKEFILE_DEPENDS
9 | "CMakeCache.txt"
10 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCCompiler.cmake.in"
11 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCCompilerABI.c"
12 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCInformation.cmake"
13 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
14 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCommonLanguageInclude.cmake"
15 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeCompilerIdDetection.cmake"
16 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeDetermineCCompiler.cmake"
17 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeDetermineCompileFeatures.cmake"
18 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeDetermineCompiler.cmake"
19 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeDetermineCompilerABI.cmake"
20 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake"
21 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeDetermineSystem.cmake"
22 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
23 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeFindBinUtils.cmake"
24 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeFindCodeBlocks.cmake"
25 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeGenericSystem.cmake"
26 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeInitializeConfigs.cmake"
27 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeLanguageInformation.cmake"
28 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeParseImplicitIncludeInfo.cmake"
29 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeParseImplicitLinkInfo.cmake"
30 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystem.cmake.in"
31 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInformation.cmake"
32 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeSystemSpecificInitialize.cmake"
33 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake"
34 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeTestCompilerCommon.cmake"
35 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/CMakeUnixFindMake.cmake"
36 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/ADSP-DetermineCompiler.cmake"
37 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
38 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-C-FeatureTests.cmake"
39 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-C.cmake"
40 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
41 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Borland-DetermineCompiler.cmake"
42 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
43 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
44 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Clang-DetermineCompiler.cmake"
45 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
46 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Clang.cmake"
47 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
48 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Cray-DetermineCompiler.cmake"
49 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
50 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
51 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/GHS-DetermineCompiler.cmake"
52 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
53 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/GNU.cmake"
54 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/HP-C-DetermineCompiler.cmake"
55 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/IAR-DetermineCompiler.cmake"
56 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
57 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Intel-DetermineCompiler.cmake"
58 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
59 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/MSVC-DetermineCompiler.cmake"
60 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
61 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
62 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/PGI-DetermineCompiler.cmake"
63 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/PathScale-DetermineCompiler.cmake"
64 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/SCO-DetermineCompiler.cmake"
65 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
66 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
67 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/TI-DetermineCompiler.cmake"
68 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
69 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
70 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/Watcom-DetermineCompiler.cmake"
71 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/XL-C-DetermineCompiler.cmake"
72 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
73 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Internal/CMakeCheckCompilerFlag.cmake"
74 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Internal/FeatureTesting.cmake"
75 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-AppleClang-C.cmake"
76 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang-C.cmake"
77 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Apple-Clang.cmake"
78 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin-Initialize.cmake"
79 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/Darwin.cmake"
80 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/Platform/UnixPaths.cmake"
81 | "/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.14/Modules/ProcessorCount.cmake"
82 | "../CMakeLists.txt"
83 | "CMakeFiles/3.14.2/CMakeCCompiler.cmake"
84 | "CMakeFiles/3.14.2/CMakeSystem.cmake"
85 | "CMakeFiles/feature_tests.c"
86 | )
87 |
88 | # The corresponding makefile is:
89 | set(CMAKE_MAKEFILE_OUTPUTS
90 | "Makefile"
91 | "CMakeFiles/cmake.check_cache"
92 | )
93 |
94 | # Byproducts of CMake generate step:
95 | set(CMAKE_MAKEFILE_PRODUCTS
96 | "CMakeFiles/3.14.2/CMakeSystem.cmake"
97 | "CMakeFiles/3.14.2/CMakeCCompiler.cmake"
98 | "CMakeFiles/3.14.2/CMakeCCompiler.cmake"
99 | "CMakeFiles/CMakeDirectoryInformation.cmake"
100 | )
101 |
102 | # Dependency information for all targets:
103 | set(CMAKE_DEPEND_INFO_FILES
104 | "CMakeFiles/lab1.dir/DependInfo.cmake"
105 | )
106 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/Makefile2:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # The main recursive all target
10 | all:
11 |
12 | .PHONY : all
13 |
14 | # The main recursive preinstall target
15 | preinstall:
16 |
17 | .PHONY : preinstall
18 |
19 | # The main recursive clean target
20 | clean:
21 |
22 | .PHONY : clean
23 |
24 | #=============================================================================
25 | # Special targets provided by cmake.
26 |
27 | # Disable implicit rules so canonical targets will work.
28 | .SUFFIXES:
29 |
30 |
31 | # Remove some rules from gmake that .SUFFIXES does not remove.
32 | SUFFIXES =
33 |
34 | .SUFFIXES: .hpux_make_needs_suffix_list
35 |
36 |
37 | # Suppress display of executed commands.
38 | $(VERBOSE).SILENT:
39 |
40 |
41 | # A target that is always out of date.
42 | cmake_force:
43 |
44 | .PHONY : cmake_force
45 |
46 | #=============================================================================
47 | # Set environment variables for the build.
48 |
49 | # The shell in which to execute make rules.
50 | SHELL = /bin/sh
51 |
52 | # The CMake executable.
53 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
54 |
55 | # The command to remove a file.
56 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
57 |
58 | # Escaping for special characters.
59 | EQUALS = =
60 |
61 | # The top-level source directory on which CMake was run.
62 | CMAKE_SOURCE_DIR = /Users/DWL/Desktop/projects/lab1
63 |
64 | # The top-level build directory on which CMake was run.
65 | CMAKE_BINARY_DIR = /Users/DWL/Desktop/projects/lab1/cmake-build-debug
66 |
67 | #=============================================================================
68 | # Target rules for target CMakeFiles/lab1.dir
69 |
70 | # All Build rule for target.
71 | CMakeFiles/lab1.dir/all:
72 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/depend
73 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/build
74 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles --progress-num=1,2 "Built target lab1"
75 | .PHONY : CMakeFiles/lab1.dir/all
76 |
77 | # Include target in all.
78 | all: CMakeFiles/lab1.dir/all
79 |
80 | .PHONY : all
81 |
82 | # Build rule for subdir invocation for target.
83 | CMakeFiles/lab1.dir/rule: cmake_check_build_system
84 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles 2
85 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/lab1.dir/all
86 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles 0
87 | .PHONY : CMakeFiles/lab1.dir/rule
88 |
89 | # Convenience name for target.
90 | lab1: CMakeFiles/lab1.dir/rule
91 |
92 | .PHONY : lab1
93 |
94 | # clean rule for target.
95 | CMakeFiles/lab1.dir/clean:
96 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/clean
97 | .PHONY : CMakeFiles/lab1.dir/clean
98 |
99 | # clean rule for target.
100 | clean: CMakeFiles/lab1.dir/clean
101 |
102 | .PHONY : clean
103 |
104 | #=============================================================================
105 | # Special targets to cleanup operation of make.
106 |
107 | # Special rule to run CMake to check the build system integrity.
108 | # No rule that depends on this can have commands that come from listfiles
109 | # because they might be regenerated.
110 | cmake_check_build_system:
111 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
112 | .PHONY : cmake_check_build_system
113 |
114 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles/rebuild_cache.dir
2 | /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles/edit_cache.dir
3 | /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles/lab1.dir
4 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/DWL/Desktop/projects/lab1
2 | -- The C compiler identification is AppleClang 10.0.0.10001044
3 | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
4 | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
5 | -- Detecting C compiler ABI info
6 | -- Detecting C compiler ABI info - done
7 | -- Detecting C compile features
8 | -- Detecting C compile features - done
9 | -- Configuring done
10 | -- Generating done
11 | -- Build files have been written to: /Users/DWL/Desktop/projects/lab1/cmake-build-debug
12 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab1/cmake-build-debug/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/C.includecache:
--------------------------------------------------------------------------------
1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">])
2 |
3 | #IncludeRegexScan: ^.*$
4 |
5 | #IncludeRegexComplain: ^$
6 |
7 | #IncludeRegexTransform:
8 |
9 | /Users/DWL/Desktop/projects/lab1/main.c
10 | stdio.h
11 | -
12 | string.h
13 | -
14 |
15 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/DependInfo.cmake:
--------------------------------------------------------------------------------
1 | # The set of languages for which implicit dependencies are needed:
2 | set(CMAKE_DEPENDS_LANGUAGES
3 | "C"
4 | )
5 | # The set of files for implicit dependencies of each language:
6 | set(CMAKE_DEPENDS_CHECK_C
7 | "/Users/DWL/Desktop/projects/lab1/main.c" "/Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles/lab1.dir/main.c.o"
8 | )
9 | set(CMAKE_C_COMPILER_ID "AppleClang")
10 |
11 | # The include file search paths:
12 | set(CMAKE_C_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 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/build.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
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 | # The shell in which to execute make rules.
34 | SHELL = /bin/sh
35 |
36 | # The CMake executable.
37 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
38 |
39 | # The command to remove a file.
40 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -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 = /Users/DWL/Desktop/projects/lab1
47 |
48 | # The top-level build directory on which CMake was run.
49 | CMAKE_BINARY_DIR = /Users/DWL/Desktop/projects/lab1/cmake-build-debug
50 |
51 | # Include any dependencies generated for this target.
52 | include CMakeFiles/lab1.dir/depend.make
53 |
54 | # Include the progress variables for this target.
55 | include CMakeFiles/lab1.dir/progress.make
56 |
57 | # Include the compile flags for this target's objects.
58 | include CMakeFiles/lab1.dir/flags.make
59 |
60 | CMakeFiles/lab1.dir/main.c.o: CMakeFiles/lab1.dir/flags.make
61 | CMakeFiles/lab1.dir/main.c.o: ../main.c
62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/lab1.dir/main.c.o"
63 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/lab1.dir/main.c.o -c /Users/DWL/Desktop/projects/lab1/main.c
64 |
65 | CMakeFiles/lab1.dir/main.c.i: cmake_force
66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/lab1.dir/main.c.i"
67 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /Users/DWL/Desktop/projects/lab1/main.c > CMakeFiles/lab1.dir/main.c.i
68 |
69 | CMakeFiles/lab1.dir/main.c.s: cmake_force
70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/lab1.dir/main.c.s"
71 | /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /Users/DWL/Desktop/projects/lab1/main.c -o CMakeFiles/lab1.dir/main.c.s
72 |
73 | # Object files for target lab1
74 | lab1_OBJECTS = \
75 | "CMakeFiles/lab1.dir/main.c.o"
76 |
77 | # External object files for target lab1
78 | lab1_EXTERNAL_OBJECTS =
79 |
80 | lab1: CMakeFiles/lab1.dir/main.c.o
81 | lab1: CMakeFiles/lab1.dir/build.make
82 | lab1: CMakeFiles/lab1.dir/link.txt
83 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable lab1"
84 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/lab1.dir/link.txt --verbose=$(VERBOSE)
85 |
86 | # Rule to build all files generated by this target.
87 | CMakeFiles/lab1.dir/build: lab1
88 |
89 | .PHONY : CMakeFiles/lab1.dir/build
90 |
91 | CMakeFiles/lab1.dir/clean:
92 | $(CMAKE_COMMAND) -P CMakeFiles/lab1.dir/cmake_clean.cmake
93 | .PHONY : CMakeFiles/lab1.dir/clean
94 |
95 | CMakeFiles/lab1.dir/depend:
96 | cd /Users/DWL/Desktop/projects/lab1/cmake-build-debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/DWL/Desktop/projects/lab1 /Users/DWL/Desktop/projects/lab1 /Users/DWL/Desktop/projects/lab1/cmake-build-debug /Users/DWL/Desktop/projects/lab1/cmake-build-debug /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles/lab1.dir/DependInfo.cmake --color=$(COLOR)
97 | .PHONY : CMakeFiles/lab1.dir/depend
98 |
99 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/lab1.dir/main.c.o"
3 | "lab1.pdb"
4 | "lab1"
5 | )
6 |
7 | # Per-language clean rules from dependency scanning.
8 | foreach(lang C)
9 | include(CMakeFiles/lab1.dir/cmake_clean_${lang}.cmake OPTIONAL)
10 | endforeach()
11 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/lab1.dir/main.c.o
5 | /Users/DWL/Desktop/projects/lab1/main.c
6 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/lab1.dir/main.c.o: ../main.c
5 |
6 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # compile C with /Library/Developer/CommandLineTools/usr/bin/cc
5 | C_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu99
6 |
7 | C_DEFINES =
8 |
9 | C_INCLUDES =
10 |
11 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/cc -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/lab1.dir/main.c.o -o lab1
2 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/main.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab1/cmake-build-debug/CMakeFiles/lab1.dir/main.c.o
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/lab1.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 1
2 | CMAKE_PROGRESS_2 = 2
3 |
4 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 2
2 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/Makefile:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
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 | # The shell in which to execute make rules.
39 | SHELL = /bin/sh
40 |
41 | # The CMake executable.
42 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
43 |
44 | # The command to remove a file.
45 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
46 |
47 | # Escaping for special characters.
48 | EQUALS = =
49 |
50 | # The top-level source directory on which CMake was run.
51 | CMAKE_SOURCE_DIR = /Users/DWL/Desktop/projects/lab1
52 |
53 | # The top-level build directory on which CMake was run.
54 | CMAKE_BINARY_DIR = /Users/DWL/Desktop/projects/lab1/cmake-build-debug
55 |
56 | #=============================================================================
57 | # Targets provided globally by CMake.
58 |
59 | # Special rule for the target rebuild_cache
60 | rebuild_cache:
61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
62 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
63 | .PHONY : rebuild_cache
64 |
65 | # Special rule for the target rebuild_cache
66 | rebuild_cache/fast: rebuild_cache
67 |
68 | .PHONY : rebuild_cache/fast
69 |
70 | # Special rule for the target edit_cache
71 | edit_cache:
72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
73 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
74 | .PHONY : edit_cache
75 |
76 | # Special rule for the target edit_cache
77 | edit_cache/fast: edit_cache
78 |
79 | .PHONY : edit_cache/fast
80 |
81 | # The main all target
82 | all: cmake_check_build_system
83 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles/progress.marks
84 | $(MAKE) -f CMakeFiles/Makefile2 all
85 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab1/cmake-build-debug/CMakeFiles 0
86 | .PHONY : all
87 |
88 | # The main clean target
89 | clean:
90 | $(MAKE) -f CMakeFiles/Makefile2 clean
91 | .PHONY : clean
92 |
93 | # The main clean target
94 | clean/fast: clean
95 |
96 | .PHONY : clean/fast
97 |
98 | # Prepare targets for installation.
99 | preinstall: all
100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
101 | .PHONY : preinstall
102 |
103 | # Prepare targets for installation.
104 | preinstall/fast:
105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
106 | .PHONY : preinstall/fast
107 |
108 | # clear depends
109 | depend:
110 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
111 | .PHONY : depend
112 |
113 | #=============================================================================
114 | # Target rules for targets named lab1
115 |
116 | # Build rule for target.
117 | lab1: cmake_check_build_system
118 | $(MAKE) -f CMakeFiles/Makefile2 lab1
119 | .PHONY : lab1
120 |
121 | # fast build rule for target.
122 | lab1/fast:
123 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/build
124 | .PHONY : lab1/fast
125 |
126 | main.o: main.c.o
127 |
128 | .PHONY : main.o
129 |
130 | # target to build an object file
131 | main.c.o:
132 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/main.c.o
133 | .PHONY : main.c.o
134 |
135 | main.i: main.c.i
136 |
137 | .PHONY : main.i
138 |
139 | # target to preprocess a source file
140 | main.c.i:
141 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/main.c.i
142 | .PHONY : main.c.i
143 |
144 | main.s: main.c.s
145 |
146 | .PHONY : main.s
147 |
148 | # target to generate assembly for a file
149 | main.c.s:
150 | $(MAKE) -f CMakeFiles/lab1.dir/build.make CMakeFiles/lab1.dir/main.c.s
151 | .PHONY : main.c.s
152 |
153 | # Help Target
154 | help:
155 | @echo "The following are some of the valid targets for this Makefile:"
156 | @echo "... all (the default if no target is provided)"
157 | @echo "... clean"
158 | @echo "... depend"
159 | @echo "... rebuild_cache"
160 | @echo "... edit_cache"
161 | @echo "... lab1"
162 | @echo "... main.o"
163 | @echo "... main.i"
164 | @echo "... main.s"
165 | .PHONY : help
166 |
167 |
168 |
169 | #=============================================================================
170 | # Special targets to cleanup operation of make.
171 |
172 | # Special rule to run CMake to check the build system integrity.
173 | # No rule that depends on this can have commands that come from listfiles
174 | # because they might be regenerated.
175 | cmake_check_build_system:
176 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
177 | .PHONY : cmake_check_build_system
178 |
179 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/DWL/Desktop/projects/lab1
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
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 "/Users/DWL/Desktop/projects/lab1/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/lab1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab1/cmake-build-debug/lab1
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/lab1.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/lab1/cmake-build-debug/output_file.txt:
--------------------------------------------------------------------------------
1 | Error! opening file
--------------------------------------------------------------------------------
/lab1/input_file.txt:
--------------------------------------------------------------------------------
1 | S = 123;
2 | mul_x = s * 2;
3 | while(mul_x > 100)
4 | {
5 | mul_x = mul_x - 1;
6 | }
7 | test = 012 / 0x1f;
--------------------------------------------------------------------------------
/lab1/output_file.txt:
--------------------------------------------------------------------------------
1 | *****输出单词*****
2 | (25, S)
3 | (35, =)
4 | (26, 123)
5 | (23, ;)
6 | (25, mul_x)
7 | (35, =)
8 | (25, s)
9 | (18, *)
10 | (26, 2)
11 | (23, ;)
12 | (2, while)
13 | (19, ()
14 | (25, mul_x)
15 | (29, >)
16 | (26, 100)
17 | (20, ))
18 | (21, {)
19 | (25, mul_x)
20 | (35, =)
21 | (25, mul_x)
22 | (16, -)
23 | (26, 1)
24 | (23, ;)
25 | (22, })
26 | (25, test)
27 | (35, =)
28 | (28, 012)
29 | (17, /)
30 | (27, 0x1f)
31 | (23, ;)
32 | *****符号表*****
33 | (S, -1, ?)
34 | (mul_x, -1, ?)
35 | (s, -1, ?)
36 | (test, -1, ?)
37 |
--------------------------------------------------------------------------------
/lab2/.idea/lab2.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lab2/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/lab2/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lab2/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | 1606198516090
120 |
121 |
122 | 1606198516090
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
--------------------------------------------------------------------------------
/lab2/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(lab2)
3 |
4 | set(CMAKE_CXX_STANDARD 14)
5 |
6 | add_executable(lab2 main.cpp)
--------------------------------------------------------------------------------
/lab2/action_table.txt:
--------------------------------------------------------------------------------
1 | + * ( ) a $
2 | 0 S1 S2
3 | 1 S6 S7
4 | 2 R6 R6 R6
5 | 3 S11 ACC
6 | 4 R2 S12 R2
7 | 5 R4 R4 R4
8 | 6 S6 S7
9 | 7 R6 R6 R6
10 | 8 S14 S15
11 | 9 R2 S16 R2
12 | 10 R4 R4 R4
13 | 11 S1 S2
14 | 12 S1 S2
15 | 13 S14 S19
16 | 14 S6 S7
17 | 15 R5 R5 R5
18 | 16 S6 S7
19 | 17 R1 S12 R1
20 | 18 R3 R3 R3
21 | 19 R5 R5 R5
22 | 20 R1 S16 R1
23 | 21 R3 R3 R3
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "10.0.0.10001044")
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 "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "")
21 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "")
23 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
24 | set(CMAKE_MT "")
25 | set(CMAKE_COMPILER_IS_GNUCC )
26 | set(CMAKE_C_COMPILER_LOADED 1)
27 | set(CMAKE_C_COMPILER_WORKS TRUE)
28 | set(CMAKE_C_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_C_COMPILER_ID_RUN 1)
42 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
43 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
44 | set(CMAKE_C_LINKER_PREFERENCE 10)
45 |
46 | # Save compiler ABI information.
47 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
48 | set(CMAKE_C_COMPILER_ABI "")
49 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
50 |
51 | if(CMAKE_C_SIZEOF_DATA_PTR)
52 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
53 | endif()
54 |
55 | if(CMAKE_C_COMPILER_ABI)
56 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
57 | endif()
58 |
59 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
60 | set(CMAKE_LIBRARY_ARCHITECTURE "")
61 | endif()
62 |
63 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
64 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
65 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
66 | endif()
67 |
68 |
69 |
70 |
71 |
72 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
73 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
74 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
75 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
76 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Library/Developer/CommandLineTools/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
4 | set(CMAKE_CXX_COMPILER_VERSION "10.0.0.10001044")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98")
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 "Darwin")
16 | set(CMAKE_CXX_SIMULATE_ID "")
17 | set(CMAKE_CXX_SIMULATE_VERSION "")
18 |
19 |
20 |
21 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
22 | set(CMAKE_CXX_COMPILER_AR "")
23 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
24 | set(CMAKE_CXX_COMPILER_RANLIB "")
25 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
26 | set(CMAKE_MT "")
27 | set(CMAKE_COMPILER_IS_GNUCXX )
28 | set(CMAKE_CXX_COMPILER_LOADED 1)
29 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
30 | set(CMAKE_CXX_ABI_COMPILED TRUE)
31 | set(CMAKE_COMPILER_IS_MINGW )
32 | set(CMAKE_COMPILER_IS_CYGWIN )
33 | if(CMAKE_COMPILER_IS_CYGWIN)
34 | set(CYGWIN 1)
35 | set(UNIX 1)
36 | endif()
37 |
38 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
39 |
40 | if(CMAKE_COMPILER_IS_MINGW)
41 | set(MINGW 1)
42 | endif()
43 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
44 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
45 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
46 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
47 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
48 |
49 | # Save compiler ABI information.
50 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
51 | set(CMAKE_CXX_COMPILER_ABI "")
52 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
53 |
54 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
55 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
56 | endif()
57 |
58 | if(CMAKE_CXX_COMPILER_ABI)
59 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
60 | endif()
61 |
62 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
63 | set(CMAKE_LIBRARY_ARCHITECTURE "")
64 | endif()
65 |
66 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
67 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
68 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
69 | endif()
70 |
71 |
72 |
73 |
74 |
75 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include;/Library/Developer/CommandLineTools/usr/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include")
76 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++")
77 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib")
78 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks")
79 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-18.2.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "18.2.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-18.2.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "18.2.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CompilerIdC/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/CMakeFiles/3.14.2/CompilerIdC/a.out
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/3.14.2/CompilerIdCXX/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/CMakeFiles/3.14.2/CompilerIdCXX/a.out
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/DWL/Desktop/projects/lab2")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/DWL/Desktop/projects/lab2/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 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/Makefile2:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 |
7 | .PHONY : default_target
8 |
9 | # The main recursive all target
10 | all:
11 |
12 | .PHONY : all
13 |
14 | # The main recursive preinstall target
15 | preinstall:
16 |
17 | .PHONY : preinstall
18 |
19 | # The main recursive clean target
20 | clean:
21 |
22 | .PHONY : clean
23 |
24 | #=============================================================================
25 | # Special targets provided by cmake.
26 |
27 | # Disable implicit rules so canonical targets will work.
28 | .SUFFIXES:
29 |
30 |
31 | # Remove some rules from gmake that .SUFFIXES does not remove.
32 | SUFFIXES =
33 |
34 | .SUFFIXES: .hpux_make_needs_suffix_list
35 |
36 |
37 | # Suppress display of executed commands.
38 | $(VERBOSE).SILENT:
39 |
40 |
41 | # A target that is always out of date.
42 | cmake_force:
43 |
44 | .PHONY : cmake_force
45 |
46 | #=============================================================================
47 | # Set environment variables for the build.
48 |
49 | # The shell in which to execute make rules.
50 | SHELL = /bin/sh
51 |
52 | # The CMake executable.
53 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
54 |
55 | # The command to remove a file.
56 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
57 |
58 | # Escaping for special characters.
59 | EQUALS = =
60 |
61 | # The top-level source directory on which CMake was run.
62 | CMAKE_SOURCE_DIR = /Users/DWL/Desktop/projects/lab2
63 |
64 | # The top-level build directory on which CMake was run.
65 | CMAKE_BINARY_DIR = /Users/DWL/Desktop/projects/lab2/cmake-build-debug
66 |
67 | #=============================================================================
68 | # Target rules for target CMakeFiles/lab2.dir
69 |
70 | # All Build rule for target.
71 | CMakeFiles/lab2.dir/all:
72 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/depend
73 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/build
74 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles --progress-num=1,2 "Built target lab2"
75 | .PHONY : CMakeFiles/lab2.dir/all
76 |
77 | # Include target in all.
78 | all: CMakeFiles/lab2.dir/all
79 |
80 | .PHONY : all
81 |
82 | # Build rule for subdir invocation for target.
83 | CMakeFiles/lab2.dir/rule: cmake_check_build_system
84 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles 2
85 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/lab2.dir/all
86 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles 0
87 | .PHONY : CMakeFiles/lab2.dir/rule
88 |
89 | # Convenience name for target.
90 | lab2: CMakeFiles/lab2.dir/rule
91 |
92 | .PHONY : lab2
93 |
94 | # clean rule for target.
95 | CMakeFiles/lab2.dir/clean:
96 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/clean
97 | .PHONY : CMakeFiles/lab2.dir/clean
98 |
99 | # clean rule for target.
100 | clean: CMakeFiles/lab2.dir/clean
101 |
102 | .PHONY : clean
103 |
104 | #=============================================================================
105 | # Special targets to cleanup operation of make.
106 |
107 | # Special rule to run CMake to check the build system integrity.
108 | # No rule that depends on this can have commands that come from listfiles
109 | # because they might be regenerated.
110 | cmake_check_build_system:
111 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
112 | .PHONY : cmake_check_build_system
113 |
114 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles/rebuild_cache.dir
2 | /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles/edit_cache.dir
3 | /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles/lab2.dir
4 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/DWL/Desktop/projects/lab2
2 | -- The C compiler identification is AppleClang 10.0.0.10001044
3 | -- The CXX compiler identification is AppleClang 10.0.0.10001044
4 | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
5 | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
6 | -- Detecting C compiler ABI info
7 | -- Detecting C compiler ABI info - done
8 | -- Detecting C compile features
9 | -- Detecting C compile features - done
10 | -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
11 | -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
12 | -- Detecting CXX compiler ABI info
13 | -- Detecting CXX compiler ABI info - done
14 | -- Detecting CXX compile features
15 | -- Detecting CXX compile features - done
16 | -- Configuring done
17 | -- Generating done
18 | -- Build files have been written to: /Users/DWL/Desktop/projects/lab2/cmake-build-debug
19 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/CXX.includecache:
--------------------------------------------------------------------------------
1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">])
2 |
3 | #IncludeRegexScan: ^.*$
4 |
5 | #IncludeRegexComplain: ^$
6 |
7 | #IncludeRegexTransform:
8 |
9 | /Users/DWL/Desktop/projects/lab2/main.cpp
10 | cstdio
11 | -
12 | vector
13 | -
14 | string
15 | -
16 | iostream
17 | -
18 | fstream
19 | -
20 | map
21 | -
22 | set
23 | -
24 | stack
25 | -
26 | queue
27 | -
28 |
29 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.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 | "/Users/DWL/Desktop/projects/lab2/main.cpp" "/Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles/lab2.dir/main.cpp.o"
8 | )
9 | set(CMAKE_CXX_COMPILER_ID "AppleClang")
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 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/build.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
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 | # The shell in which to execute make rules.
34 | SHELL = /bin/sh
35 |
36 | # The CMake executable.
37 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
38 |
39 | # The command to remove a file.
40 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -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 = /Users/DWL/Desktop/projects/lab2
47 |
48 | # The top-level build directory on which CMake was run.
49 | CMAKE_BINARY_DIR = /Users/DWL/Desktop/projects/lab2/cmake-build-debug
50 |
51 | # Include any dependencies generated for this target.
52 | include CMakeFiles/lab2.dir/depend.make
53 |
54 | # Include the progress variables for this target.
55 | include CMakeFiles/lab2.dir/progress.make
56 |
57 | # Include the compile flags for this target's objects.
58 | include CMakeFiles/lab2.dir/flags.make
59 |
60 | CMakeFiles/lab2.dir/main.cpp.o: CMakeFiles/lab2.dir/flags.make
61 | CMakeFiles/lab2.dir/main.cpp.o: ../main.cpp
62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/lab2.dir/main.cpp.o"
63 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/lab2.dir/main.cpp.o -c /Users/DWL/Desktop/projects/lab2/main.cpp
64 |
65 | CMakeFiles/lab2.dir/main.cpp.i: cmake_force
66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lab2.dir/main.cpp.i"
67 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /Users/DWL/Desktop/projects/lab2/main.cpp > CMakeFiles/lab2.dir/main.cpp.i
68 |
69 | CMakeFiles/lab2.dir/main.cpp.s: cmake_force
70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lab2.dir/main.cpp.s"
71 | /Library/Developer/CommandLineTools/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /Users/DWL/Desktop/projects/lab2/main.cpp -o CMakeFiles/lab2.dir/main.cpp.s
72 |
73 | # Object files for target lab2
74 | lab2_OBJECTS = \
75 | "CMakeFiles/lab2.dir/main.cpp.o"
76 |
77 | # External object files for target lab2
78 | lab2_EXTERNAL_OBJECTS =
79 |
80 | lab2: CMakeFiles/lab2.dir/main.cpp.o
81 | lab2: CMakeFiles/lab2.dir/build.make
82 | lab2: CMakeFiles/lab2.dir/link.txt
83 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable lab2"
84 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/lab2.dir/link.txt --verbose=$(VERBOSE)
85 |
86 | # Rule to build all files generated by this target.
87 | CMakeFiles/lab2.dir/build: lab2
88 |
89 | .PHONY : CMakeFiles/lab2.dir/build
90 |
91 | CMakeFiles/lab2.dir/clean:
92 | $(CMAKE_COMMAND) -P CMakeFiles/lab2.dir/cmake_clean.cmake
93 | .PHONY : CMakeFiles/lab2.dir/clean
94 |
95 | CMakeFiles/lab2.dir/depend:
96 | cd /Users/DWL/Desktop/projects/lab2/cmake-build-debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/DWL/Desktop/projects/lab2 /Users/DWL/Desktop/projects/lab2 /Users/DWL/Desktop/projects/lab2/cmake-build-debug /Users/DWL/Desktop/projects/lab2/cmake-build-debug /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles/lab2.dir/DependInfo.cmake --color=$(COLOR)
97 | .PHONY : CMakeFiles/lab2.dir/depend
98 |
99 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/lab2.dir/main.cpp.o"
3 | "lab2.pdb"
4 | "lab2"
5 | )
6 |
7 | # Per-language clean rules from dependency scanning.
8 | foreach(lang CXX)
9 | include(CMakeFiles/lab2.dir/cmake_clean_${lang}.cmake OPTIONAL)
10 | endforeach()
11 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/lab2.dir/main.cpp.o
5 | /Users/DWL/Desktop/projects/lab2/main.cpp
6 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | CMakeFiles/lab2.dir/main.cpp.o: ../main.cpp
5 |
6 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
3 |
4 | # compile CXX with /Library/Developer/CommandLineTools/usr/bin/c++
5 | CXX_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu++14
6 |
7 | CXX_DEFINES =
8 |
9 | CXX_INCLUDES =
10 |
11 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/c++ -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/lab2.dir/main.cpp.o -o lab2
2 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/main.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/CMakeFiles/lab2.dir/main.cpp.o
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/lab2.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 1
2 | CMAKE_PROGRESS_2 = 2
3 |
4 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 2
2 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/Makefile:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14
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 | # The shell in which to execute make rules.
39 | SHELL = /bin/sh
40 |
41 | # The CMake executable.
42 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
43 |
44 | # The command to remove a file.
45 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E remove -f
46 |
47 | # Escaping for special characters.
48 | EQUALS = =
49 |
50 | # The top-level source directory on which CMake was run.
51 | CMAKE_SOURCE_DIR = /Users/DWL/Desktop/projects/lab2
52 |
53 | # The top-level build directory on which CMake was run.
54 | CMAKE_BINARY_DIR = /Users/DWL/Desktop/projects/lab2/cmake-build-debug
55 |
56 | #=============================================================================
57 | # Targets provided globally by CMake.
58 |
59 | # Special rule for the target rebuild_cache
60 | rebuild_cache:
61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
62 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
63 | .PHONY : rebuild_cache
64 |
65 | # Special rule for the target rebuild_cache
66 | rebuild_cache/fast: rebuild_cache
67 |
68 | .PHONY : rebuild_cache/fast
69 |
70 | # Special rule for the target edit_cache
71 | edit_cache:
72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
73 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
74 | .PHONY : edit_cache
75 |
76 | # Special rule for the target edit_cache
77 | edit_cache/fast: edit_cache
78 |
79 | .PHONY : edit_cache/fast
80 |
81 | # The main all target
82 | all: cmake_check_build_system
83 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles/progress.marks
84 | $(MAKE) -f CMakeFiles/Makefile2 all
85 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/DWL/Desktop/projects/lab2/cmake-build-debug/CMakeFiles 0
86 | .PHONY : all
87 |
88 | # The main clean target
89 | clean:
90 | $(MAKE) -f CMakeFiles/Makefile2 clean
91 | .PHONY : clean
92 |
93 | # The main clean target
94 | clean/fast: clean
95 |
96 | .PHONY : clean/fast
97 |
98 | # Prepare targets for installation.
99 | preinstall: all
100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
101 | .PHONY : preinstall
102 |
103 | # Prepare targets for installation.
104 | preinstall/fast:
105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall
106 | .PHONY : preinstall/fast
107 |
108 | # clear depends
109 | depend:
110 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
111 | .PHONY : depend
112 |
113 | #=============================================================================
114 | # Target rules for targets named lab2
115 |
116 | # Build rule for target.
117 | lab2: cmake_check_build_system
118 | $(MAKE) -f CMakeFiles/Makefile2 lab2
119 | .PHONY : lab2
120 |
121 | # fast build rule for target.
122 | lab2/fast:
123 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/build
124 | .PHONY : lab2/fast
125 |
126 | main.o: main.cpp.o
127 |
128 | .PHONY : main.o
129 |
130 | # target to build an object file
131 | main.cpp.o:
132 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/main.cpp.o
133 | .PHONY : main.cpp.o
134 |
135 | main.i: main.cpp.i
136 |
137 | .PHONY : main.i
138 |
139 | # target to preprocess a source file
140 | main.cpp.i:
141 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/main.cpp.i
142 | .PHONY : main.cpp.i
143 |
144 | main.s: main.cpp.s
145 |
146 | .PHONY : main.s
147 |
148 | # target to generate assembly for a file
149 | main.cpp.s:
150 | $(MAKE) -f CMakeFiles/lab2.dir/build.make CMakeFiles/lab2.dir/main.cpp.s
151 | .PHONY : main.cpp.s
152 |
153 | # Help Target
154 | help:
155 | @echo "The following are some of the valid targets for this Makefile:"
156 | @echo "... all (the default if no target is provided)"
157 | @echo "... clean"
158 | @echo "... depend"
159 | @echo "... rebuild_cache"
160 | @echo "... edit_cache"
161 | @echo "... lab2"
162 | @echo "... main.o"
163 | @echo "... main.i"
164 | @echo "... main.s"
165 | .PHONY : help
166 |
167 |
168 |
169 | #=============================================================================
170 | # Special targets to cleanup operation of make.
171 |
172 | # Special rule to run CMake to check the build system integrity.
173 | # No rule that depends on this can have commands that come from listfiles
174 | # because they might be regenerated.
175 | cmake_check_build_system:
176 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
177 | .PHONY : cmake_check_build_system
178 |
179 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/DWL/Desktop/projects/lab2
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
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 "/Users/DWL/Desktop/projects/lab2/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/lab2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeilingDu/HITsz-Compilation-Principle-Project/705556165e2a69340c8374798a55f02f2de359ea/lab2/cmake-build-debug/lab2
--------------------------------------------------------------------------------
/lab2/cmake-build-debug/lab2.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/lab2/goto_table.txt:
--------------------------------------------------------------------------------
1 | A T F
2 | 0 3 4 5
3 | 1 8 9 10
4 | 2
5 | 3
6 | 4
7 | 5
8 | 6 13 9 10
9 | 7
10 | 8
11 | 9
12 | 10
13 | 11 17 5
14 | 12 18
15 | 13
16 | 14 20 10
17 | 15
18 | 16 21
19 | 17
20 | 18
21 | 19
22 | 20
23 | 21
24 |
--------------------------------------------------------------------------------
/lab2/input_file.txt:
--------------------------------------------------------------------------------
1 | 7
2 | S->A
3 | A->A+T
4 | A->T
5 | T->T*F
6 | T->F
7 | F->(A)
8 | F->a
9 | + * ( ) a #
10 | S A T F #
11 | a+a*a
12 |
13 |
--------------------------------------------------------------------------------
/lab2/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | # include
6 | #include