2020-10-01 20:43:00 +05:30
2020-10-01 19:33:47 +05:30
2020-10-01 19:46:39 +05:30
2020-10-01 19:33:47 +05:30
2020-10-01 19:50:16 +05:30
2020-10-01 19:50:16 +05:30
2020-09-30 01:20:58 +05:30
2020-09-30 01:20:58 +05:30
2020-10-01 13:14:57 +05:30
2020-10-01 20:43:00 +05:30

bfc (*.bfe)

An extension of a language that shall not be named

HelloWorld.bfe

-[-7>+<]>-.-[->+5<]>++.+7..+3.[-3>+<]>-5.--[->+4<]>-.-8.+3.-6.-8.

Setup oddities

  1. Copy antlr4's cpp libs to ./libs/antlr4. (Please take care that the include folder points straight to the files not to antlr-runtime)
  2. Copy antlr-4.8-complete.jar to ./thirdparty/antlr.
  3. Generate parsers to ./libs/generated or use VSCode with the ANTLR extension.

Todo (Tentative)

  • Grammar
    • Number shorthand
    • Loop statements
    • Shorthand segments
  • Processing
    • Translate to bf
    • Execute results

Syntax

Basic

,. IO
<> Address manipulation
+- Value manipulation
[] Looping construct

Comments

// - Single Line

/* */ - Multi Line

Repeats

<symbol><number>
(<symbols>)<number>

Eg.

+65. //prints A
>
(+65>)3 //stores AAA
(<.)3   //prints AAA
Description
A Parser and interpreter for BFE, a syntactic superset of bf
Readme 2.6 MiB
Languages
C++ 97.2%
ANTLR 1.5%
CMake 1.3%