Skip to content

Mikescher/BefunCompile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BefunCompile Build status

BefunCompile is a Befunge-93 compiler. (Like all of my Befunge-93 content the Befunge-93 size restriction is removed, programs can be any size - much like in Befunge-98) There are many general compiler out there. But mine is not one of them. It can only compile Befunge-code which does not modify its own source code (its ok to modify other, non interpreted, cells). But nearly every program in Befunge, handmade or automatically generated does not change its own code while running.

So no, this is not a solution to the main challenge of Befunge, but a nice way to generate executables out of your Befunge code.

Download

You can download the binaries from my website www.mikescher.com

Or you can get the latest Github release (In case AppVeyor is down)

Or you can download the latest (nightly) version from the AppVeyor build server

Usage

BefunCompile itself is a console program. Call it with help or without parameters to see a list of all possible arguments.
BefunCompile is able to compile multiple files after each other when you supply it with an file pattern.

To compile all the code in my Project-Euler Repository I used this command:

"Path\To\BefunCompile.exe" ^
    --file="processed\*.b93" ^
    --languages=c;cs ^
    --out="compiled\{l}\{f}.{le}" ^
    --format ^
    --safestack ^
    --safegrid ^
    --override ^
    --unsafe

after that you can compile the resulting code with the respective compilers:

csc Euler_Problem-001.cs
gcc Euler_Problem-001.c
python Euler_Problem-001.py
...

Supported Output Languages

Examples

My repository Mikescher/Project-Euler_Befunge contains a lot of examples. Every Befunge source code there is also as compiled C/C#/Python source code available.

Download

You can download the binaries from my website www.mikescher.com.
Or compile them yourself by forking this repository

Or you can download the latest (nightly) version from the AppVeyor build server

Set Up

This program was developed under Windows with Visual Studio.

You don't need other BefunUtils projects to run this.
Theoretically you can only clone this repository and run it.
But it could be useful to get the whole BefunUtils solution like described here
Especially BefunDebug could be useful for testing.

Screenshots

BefunCompile:

BefunCompile (Graph display of Euler_Problem-002 Level 0) (via BefunDebug):

BefunCompile (Graph display of Euler_Problem-002 Level 2) (via BefunDebug):

BefunCompile (Graph display of Euler_Problem-002 Level 3) (via BefunDebug):

BefunCompile (Graph display of Euler_Problem-002 Level 5) (via BefunDebug):

Contributions

Yes, please

About

An (non-general) Befunge-93 compiler. Compile your Befunge-93 code to C, C# or Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published