Skip to content

SBasalaev/jbfc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced brainfuck compiler written in Java.

Features:
 * Generates error and warning messages
 * Optimizes code
 * Can produce executable code for multiple targets
 * Support for custom building targets and AST visitors

Command line options:
 -o <name>                       Use given output name to generate files
 -t, -target <name>              Generate file for given target
 -vc, -visitorclass <classname>  Apply specified visitor to BF tree
 -d <directory>                  Specify where to place generated files
 -r, -range <number>             Specify max array size
 -g                              Generate debugging info
 -h, -help                       Show help message and exit
 -v, -version                    Show program version and exit

Available targets:
            Binary
 -t class                        Generate Java class file

            Source
 -t java                         Java source
 -t c                            C source

Available optimizations (all turned on by default):
 * Reduces sequences of >>><< and +++-- to single shift/increment
 * Reduces [+] and [-] to zero assignment
 * Tries to calculate needed array size reducing memory consuming

About

Advanced brainfuck compiler written in Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages