mbtcc is a C compiler written in Moonbit, aiming to support the full C11 standard. This project is currently under development.
You can compile a C source file as follows:
mbtcc -file your_source_file.c
Or compile a string directly:
mbtcc -code "int main() { return 0; }"
-code <code>: Compile the given code string.-file <file>: Compile the code from the specified file.--print-toks: Print the tokens after lexing.--stop-after=lex: Stop after the lexing phase.--stop-after=parse: Stop after the parsing phase.--help: Show the help message.This project is experimental and under heavy development. It is not suitable for production environments. Please use it for educational or experimental purposes only.
mbtcc 是一个使用 Moonbit 编写的 C 语言编译器,目标是支持完整的 C11 标准。项目正在积极开发中。
你可以像下面这样编译一个 C 源文件:
mbtcc -file your_source_file.c
或者直接编译一个代码字符串:
mbtcc -code "int main() { return 0; }"
-code <code>: 编译给定的代码字符串。-file <file>: 编译指定的源文件。--print-toks: 在词法分析后打印 token 序列。--stop-after=lex: 在词法分析阶段结束后停止。--stop-after=parse: 在语法分析阶段结束后停止。--help: 显示帮助信息。本项目是实验性的,正在密集开发中,不适合在生产环境中使用。请仅将其用于学习或实验目的。
312 commits
2 commits
MoonBit
56.0%
C
39.5%
ANTLR
2.2%
Shell
1.5%
mbtcc is a C compiler written in Moonbit, aiming to support the full C11 standard. This project is currently under development.
You can compile a C source file as follows:
mbtcc -file your_source_file.c
Or compile a string directly:
mbtcc -code "int main() { return 0; }"
-code <code>: Compile the given code string.-file <file>: Compile the code from the specified file.--print-toks: Print the tokens after lexing.--stop-after=lex: Stop after the lexing phase.--stop-after=parse: Stop after the parsing phase.--help: Show the help message.This project is experimental and under heavy development. It is not suitable for production environments. Please use it for educational or experimental purposes only.
mbtcc 是一个使用 Moonbit 编写的 C 语言编译器,目标是支持完整的 C11 标准。项目正在积极开发中。
你可以像下面这样编译一个 C 源文件:
mbtcc -file your_source_file.c
或者直接编译一个代码字符串:
mbtcc -code "int main() { return 0; }"
-code <code>: 编译给定的代码字符串。-file <file>: 编译指定的源文件。--print-toks: 在词法分析后打印 token 序列。--stop-after=lex: 在词法分析阶段结束后停止。--stop-after=parse: 在语法分析阶段结束后停止。--help: 显示帮助信息。本项目是实验性的,正在密集开发中,不适合在生产环境中使用。请仅将其用于学习或实验目的。
312 commits
2 commits
MoonBit
56.0%
C
39.5%
ANTLR
2.2%
Shell
1.5%