Skip to content

lizhijian-cn/c0-java

Repository files navigation

C0-java

c0 编译器, 具体文法请参见 here

Environment

  • JDK15 (need to enable preview feature)

推荐使用sdkman来管理、下载相关的SDK

Usage

git clone https://github.com/lizhijian-cn/c0-java.git
cd c0-java

./gradlew build
java --enable-preview -jar build/libs/c0-java.jar example/fn-main.c0 -o example/fn-main.o0

./navm example/fn-main.o0
# the sum from 1 to 50 equals to:
# 5050

其中虚拟机navm是助教提供的

TODO

  • control flow check
  • support DaclNode
  • location
  • error handler

Grade

57/57 passed