bf-llvm

所属分类:编译器/解释器
开发工具:C
文件大小:3KB
下载次数:0
上传日期:2018-05-31 02:12:00
上 传 者sh-1993
说明:  简单的BF到LLVM IR编译器实现,供实践和参考。
(Simple BF to LLVM IR compiler implementation for practice and reference.)

文件列表:
Makefile (50, 2018-05-31)
examples (0, 2018-05-31)
examples\char.bf (72, 2018-05-31)
examples\hello.bf (112, 2018-05-31)
examples\io.bf (7, 2018-05-31)
examples\loop.bf (25, 2018-05-31)
examples\ptr.bf (137, 2018-05-31)
src (0, 2018-05-31)
src\bfc.c (4728, 2018-05-31)

# bf-llvm This is a simple implementation of a [Bf](https://en.wikipedia.org/wiki/Brain***) to [LLVM](http://llvm.org/) IR compiler. It has no practical purpose beyond providing a sample project for playing with LLVM. This compiler was built and tested with LLVM versions 4.0.1 and 6.0.0. ## Building This project can be built with the included Makefile. The executable is called, `bfc`. ## Usage Running Hello World: cat examples/hello.bf | ./bfc > hello.ll lli hello.ll Running the IO Example (this will print "ABC"): cat examples/io.bf | ./bfc > io.ll echo "ABC" | lli io.ll ## Compiling to a Binary Alternatively, these examples can be compiled to binary files with `llc` and `clang`: cat examples/hello.bf | ./bfc > hello.ll llc hello.ll clang -s hello.s ./a.out

近期下载者

相关文件


收藏者