BrainF*ck interpreter & java compiler
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
LICENSE.txt
README.md
pom.xml

README.md

BrainF*ck interpreter and Java compiler

Another implementation for brainf*ck, using the compiler-framework.

Process

  • Source file
  • List of tokens
  • Parsing Tree
  • Abstract syntax tree
  • Optimized abstract syntax tree (not optimizations are really implemented)
  • Interpreter or Java Compiler runs over the abstract syntax tree

Interpreter

java bfk.Interpreter <path to brainf*ck source>

Javac

Translate an abstract syntax tree to java 1.7 byte code using asm5. Result is stored into a class file and is runnable as usual java console application.

java bfk.Javac <path to brainf*ck source>

Grammar

See bfk.common.BrainFKGrammar.java for grammar details

License

The code is released under Apache License Version 2.0

Contacts