https://github.com/itdevwu/naive-pascal-compiler
A compiler for the Pascal programming language
https://github.com/itdevwu/naive-pascal-compiler
antlr4 compiler cpp pascal xmake
Last synced: about 1 year ago
JSON representation
A compiler for the Pascal programming language
- Host: GitHub
- URL: https://github.com/itdevwu/naive-pascal-compiler
- Owner: itdevwu
- Created: 2023-02-21T09:30:15.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-14T12:32:42.000Z (almost 3 years ago)
- Last Synced: 2024-11-16T22:32:12.204Z (over 1 year ago)
- Topics: antlr4, compiler, cpp, pascal, xmake
- Language: C++
- Homepage:
- Size: 241 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# naive-pascal-compiler
npc is a compiler for the Pascal programming language, written in C++ as a course project of BUPT. It uses ANTLR4 to write lexer and parser, then generates an Abstract Syntax Tree (AST), converts the AST into LLVM IR and finally uses LLVM as the backend to compile into binary code.
## Documents
See [naive-pascal-compiler 文档索引表](./docs/README.md)
## TODO
- [ ] CLI
- [x] Frontend
- [x] Lexer
- [x] Parser
- [x] AST interfaces
- [ ] Backend
- [ ] LLVM IR translator
- [X] LLVM controller
- [X] Tests (partly)
## Copyright
Copyright (c) 2023 Zhenglong WU, Zili YAO, Kexiao WU, Yiran REN and Xiyue ZU
This project is protected by copyright law. Unauthorized reproduction or distribution of this project, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.