Code Monkey home page Code Monkey logo

headache's Introduction

Headache

Headache is a programming language that compiles to 8-Bit Brainfuck.

Documentation

For documentation, please visit Headache's wiki: https://github.com/LucasMW/Headache/wiki

Support Headache

Help Headache launch on Homebrew. This repository needs 50 stargazers to become a brew package.

Build

You may build the project by running make.

Install

Run make install and the include $HOME/.Headache/ in your PATH variable in order to enable hac and bfi in your shell.

Usage

Compiling headache (.ha) files

In order to compile headache (.ha) files to brainfuck, run:

./hac file.ha

It generates and executes a brainfuck file named a.bf.

Options
Lexical analyzer

To run a lexical analyzer, execute:

./hac -lex
Syntactical Analyzer

To run a syntactical analyzer, execute:

./hac -syntax
AST

To output the current program's AST, execute:

./hac -tree
Warning and errors checking

To check for errors and warnings without compiling, execute:

./hac -check

Tests

Execute make test to run the default tests.

Other test options

For testing only type checks, run:

make testchecks

For testing only the lexical scope, run:

make testlexical

For testing only the syntax scope, run:

make testsyntax

For testing only programs that are compiled and run successfully, run:

make testrunnable

Donation Addresses:

Support Headache with cryptocurrency:

  • BTC: 1NcdcAjkKj9ywiCfinwFi1W3QfsvFSFsAH
  • Doge: D5wEBGcwLeBSQvwnBckco1EvQQcuXCBvRj
  • LTC: Ldj6ax1CzdYFRbSiZjpCvcPoxQ2BvX42Kb
  • ZEC: t1PsMPGuoZfD5YwAgmyd3j2cb8siysxR9fE
  • Dash: Xt7qYtLiLx6mHR1fUeQVYiHgEbX7YNugM2
  • BCH: 1NCYSnFb44ybHtzwG51cUYWLa67PZdsREG
  • XMR: 4CTKuktQ8eQFriMu3xDALEawuu9iWQhFYffgffqgC3RHCWgcLGTG9oyNWgvLiAoDPpYUvsJmRkTAudGSXNqnRFsuT9LNU3Up81F2x3fzkj

headache's People

Contributors

lucasmw avatar luizperes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

headache's Issues

Optimize brainfuck code

I compiled this headache program:

void main(){
    int a;
    int b;
    #a;
    #b;
    @((a+b) as int);
}

and found out that the size of the resulting program can be easily optimized by removing redundant +-'s and <>'s and -+'s and ><'s.

Also, there is the page brainfuck constants, so I think you can perhaps optimize the Hello World examples?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.