Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

YianAndCode/pineapple-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

31 Commits

Repository files navigation

PINEAPPLE

pineapple lang 是一个简单的编程语言 demo。它包含了个手写的递归下降解析器和一个简单的解释器。虽然该语言甚至不是图灵完备的。但 pineapple 的主要目的是让编译原理初学者有一个预热,简单了解一个编程语言是怎么构建的。

本项目是 pineapple lang 的 C 实现

编译&运行

注意,由于使用了 regex.h 库,在 Windows 下的编译可能会不通过

# 把依赖拉取到本地
git submodule init && git submodule update
# 创建编译目录
mkdir build && cd build
# 使用 cmake 生成 Makefile
cmake ..
# 编译
make
# 运行
./pineapple-c ../examples/hello-world.pineapple

小教程

GitHub

知乎专栏

贡献者

开源协议

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /