# compiler **Repository Path**: dahuoyzs/compiler ## Basic Information - **Project Name**: compiler - **Description**: 学习编译原理 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-18 - **Last Updated**: 2024-07-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 编译原理 测试库 ### 理论知识 [国防科技大学-编译原理(国家级精品课)高清流畅_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV11t411V74n/?spm_id_from=333.337.search-card.all.click&vd_source=b9283c570ce8b63efca21eca6835ced7) 《编译原理 第二版》(龙书) #### 初步试炼 《两周自制脚本语言》 一个完整的编译器前端(学习记录) https://blog.csdn.net/Zheng_lan/article/details/115916527 ## 极客时间宫文学 源代码 宫文学gitEE地址 https://gitee.com/richard-gong 极客时间《编译原理之美》课程代码。 https://gitee.com/richard-gong/PlayWithCompiler 极客时间《编译原理实战课》课程的示例代码。 https://gitee.com/richard-gong/CompilersInPractice 极客时间《手把手带你写一门计算机语言》课程示例代码。 https://gitee.com/richard-gong/craft-a-language 宫文学github地址 https://github.com/RichardGong 极客时间《编译原理之美》课程代码。 https://github.com/RichardGong/PlayWithCompiler 极客时间《编译原理实战课》课程的示例代码。 https://github.com/RichardGong/CompilersInPractice ## Antlr4相关 Antlr4官方下载地址 https://www.antlr.org/download.html Antlr4官方下载地址历史版本(包含多版本 其中antlr 在 4.10仍然支持JDK 1.8,在4.10.1之后需要JDK11。) https://github.com/antlr/website-antlr4/tree/gh-pages/download ### 开源语法 antlr4 各种语法 https://github.com/antlr/grammars-v4 antlr作者开源的Java.g4语法(单文件) https://github.com/antlr/codebuff/blob/master/grammars/org/antlr/codebuff/Java.g4 CSV.g4 https://github.com/antlr/grammars-v4/blob/master/csv/CSV.g4 JSON.g4 https://github.com/antlr/grammars-v4/blob/master/json/JSON.g4 Protobuf2.g4 https://github.com/antlr/grammars-v4/blob/master/protobuf2/Protobuf2.g4 Protobuf3.g4 https://github.com/antlr/grammars-v4/blob/master/protobuf3/Protobuf3.g4 ### 博客与教程 antlr4权威指南(中文版)几乎搜到的关于ANTLR4的基础教程全部都出自于这篇教程文档,所以在看到文字档之后分享出来了。 百度网盘链接:https://pan.baidu.com/s/1FPXTTgVedeIPlrbF8QRorw 提取码:z0u8 推荐一位大佬的阅读笔记文章(推荐等级1) https://blog.csdn.net/qq_37771475/category_10049277.html Antlr4官方中文教程:(推荐等级2) https://wizardforcel.gitbooks.io/antlr4-short-course/content/introduction.html 打破国外垄断,开发中国人自己的编程语言(1):编写解析表达式的计算器(推荐等级3) https://cloud.tencent.com/developer/article/1671098?from=15425 Antlr4 快速入门 - 编写语法解析器(推荐等级4) https://blog.csdn.net/BASK2312/article/details/128220613 用idea测试antlr4其实就不用再下载antlr包了。直接maven依赖对应的版本就行。然后idea插件可以根据g4文件生成java代码 位置要根据目录自己选择 输出包名,如下 antlr4.gen.*