@@ -255,7 +255,7 @@ flowchart TD;
255
255
# ## Q & A:为什么要输出到 `llvm::json`?
256
256
257
257
1. 输出到 json,便于使用 python 脚本和 clang 导出的语法树对比,自动批改。
258
- 2. 输出到 json,因为 json 格式非常容易理解,不需要像 [LLVM 官方教程](https://releases.llvm.org/17.0.0 /docs/tutorial/MyFirstLanguageFrontend/LangImpl02.html) 一样定义很多节点。
258
+ 2. 输出到 json,因为 json 格式非常容易理解,不需要像 [LLVM 官方教程](https://releases.llvm.org/18.1.8 /docs/tutorial/MyFirstLanguageFrontend/LangImpl02.html) 一样定义很多节点。
259
259
3. 输出到 ` llvm::json` ,可以让同学们提前上手 LLVM 库的使用,平滑下一个实验的难度。
260
260
261
261
# # 评分规则
@@ -310,9 +310,9 @@ flowchart TD;
310
310
- ` sysu-refactor` :面向 SYsU 的代码重构工具
311
311
- 将输入代码的 ` while (Cond) Simt` 替换为 ` if (Cond) do Simt while (Cond)`
312
312
- 或者相反!
313
- 6. 鉴于本次实验已经开始进入 LLVM 开发范畴,建议遵守 [LLVM Coding Standards](https://releases.llvm.org/17.0.0 /docs/CodingStandards.html)
313
+ 6. 鉴于本次实验已经开始进入 LLVM 开发范畴,建议遵守 [LLVM Coding Standards](https://releases.llvm.org/18.1.8 /docs/CodingStandards.html)
314
314
- 可以使用 ` clang-tidy` 与 ` clang-format` 工具检查你的代码是否规范,如 ` cmake -DCMAKE_CXX_CLANG_TIDY=clang-tidy # ...`
315
- - 将 [LLVM Coding Standards](https://releases.llvm.org/17.0.0 /docs/CodingStandards.html) 与 [GNU](https://www.gnu.org/prep/standards/standards.html)、[Google](https://google.github.io/styleguide/)、[Chromium](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md)、[Microsoft](https://docs.microsoft.com/zh-cn/dotnet/csharp/fundamentals/coding-style/coding-conventions)、[Mozilla](https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html)、[WebKit](https://webkit.org/code-style-guidelines/) 等其他知名编程规范进行比较,选出一种或是基于他们归纳出一个你认为最合理的编程规范,编写对应的 ` .clang-format` 与 ` .clang-tidy` 文件,并在以后坚持使用下去!~~(就助教来说更加偏好 LLVM,毕竟没有人会比编译器更懂语言)~~
315
+ - 将 [LLVM Coding Standards](https://releases.llvm.org/18.1.8 /docs/CodingStandards.html) 与 [GNU](https://www.gnu.org/prep/standards/standards.html)、[Google](https://google.github.io/styleguide/)、[Chromium](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md)、[Microsoft](https://docs.microsoft.com/zh-cn/dotnet/csharp/fundamentals/coding-style/coding-conventions)、[Mozilla](https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html)、[WebKit](https://webkit.org/code-style-guidelines/) 等其他知名编程规范进行比较,选出一种或是基于他们归纳出一个你认为最合理的编程规范,编写对应的 ` .clang-format` 与 ` .clang-tidy` 文件,并在以后坚持使用下去!~~(就助教来说更加偏好 LLVM,毕竟没有人会比编译器更懂语言)~~
316
316
7. 将 ` sysu-lexer` 与 ` sysu-parser` 的核心代码链接到一起,作为 ` sysu-lang` 完整编译器的一部分。
317
317
- 输入一个经过预处理的 SYsU 源程序,输出其语法分析树。
318
318
- 建议:将 ` sysu-lexer` 的核心代码打包成一个 ` libsysuLexer.so` ,将 ` sysu-parser` 的核心代码打包成一个 ` libsysuParser.so` ,然后链接到到同一个 ` main.cc` 。
@@ -324,5 +324,5 @@ flowchart TD;
324
324
325
325
- [GNU Bison - The Yacc-compatible Parser Generator](https://www.gnu.org/software/bison/manual/)
326
326
- [FindBISON — CMake 3.20.6 Documentation](https://cmake.org/cmake/help/v3.20/module/FindBISON.html)
327
- - [llvm::json](https://github.com/llvm/llvm-project/blob/llvmorg-17 .0.6/llvm/include/llvm/Support/JSON.h)
328
- - 该文件同样位于 ubuntu:noble 中 [llvm-dev](https://packages.ubuntu.com/noble/llvm-dev) 包的 < /usr/include/llvm/Support/JSON.h> 。
327
+ - [llvm::json](https://github.com/llvm/llvm-project/blob/llvmorg-18 .0.6/llvm/include/llvm/Support/JSON.h)
328
+ - 该文件同样位于 ubuntu:24.04 中 [llvm-dev](https://packages.ubuntu.com/noble/llvm-dev) 包的 < /usr/include/llvm/Support/JSON.h> 。
0 commit comments