GithubHelp home page GithubHelp logo

fabrv / brasic Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 7 KB

BASIC like language that compiles to Brainfuck

Brainfuck 99.87% Batchfile 0.13%
esoteric-language compiler high-level-language brainfuck brainfuck-compiler

brasic's Introduction

Brasic

Modify sample.basic

Basic/Assembly like language that compiles to Brainfuck written in Bflat. Probably the first high level brainfuck language written in a brainfuck derivative, most likely not.

Install NodeJS

npm i -g bfrun
bfrun start brasm.bf

Making it work

This project was made as a proof of concept of Bflat and not as a real fully-working compiler, so there are many bugs/errors that I didn't think are worth fixing. This errors make the compiler barely work, practically anything will brake the compiler. So here are somethings to have in mind to make it work:

  • Every command has to be written exactly as in the commands section.
  • Your text editor must do "Return Carriage, New Line".
  • Everyline has to have code.
  • Tabs must be double-spaces.
  • No trailing spaces after each line.
  • Every command has to have a parameter.
  • No trailing line after code.
  • Strings (STR) must have opening and closing ""

I'm sorry :/. sample.basic has an example project; it is the 99 Bottles song, and a.bf is the compiled code.

Commands

  • (LFT) LEFT number
  • (RHT) RIGHT number
  • (ADD) ADD number
  • (SUB) SUBSTRACT number
  • (WHL N) WHILE NOT ZERO
    • (END WHL) END
  • (PRT) PRINT
  • (INP) INPUT
  • (CPY) COPY
  • (CLR) CLEAR
  • (STR) STRING

brasic's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

trimsku

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.