A slight syntactic superset of BF.
Development requirements:
- cxxopts -> v2.2.1
- antlr4 -> v4
HelloWorld.bfe
-[-7>+<]>-.-[->+5<]>++.+7..+3.[-3>+<]>-5.--[->+4<]>-.-8.+3.-6.-8.
- Interpret bfe(and bf) files
- Convert bf/bfe to bf
- Convert bf/bfe to C++ (not optimized)
./bfc -h #Help
./bfc prog.bfe #Execute
./bfc prog.bfe -a bf #Translate file to bf
./bfc prog.bfe -a cpp # Translate file to cpp
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
- Generate parsers to
./libs/generated
or use VSCode with the ANTLR extension or use a downloaded ANTLR JAR.
- Grammar
- Number shorthand
- Loop statements
- Ignore rest
- Shorthand segments
- Processing
- Translate to bf
- Execute results