6f568918512c4c44d16283a49b56341a6b775d18
bfc (*.bfe)
An extension of a language that shall not be named
Requires:
- cxxopts -> v2.2.1
- antlr4
HelloWorld.bfe
-[-7>+<]>-.-[->+5<]>++.+7..+3.[-3>+<]>-5.--[->+4<]>-.-8.+3.-6.-8.
Usage
./bfc -h #Help
./bfc prog.bfe #Execute
./bfc prog.bfe -t #Translate file to bf
Setup oddities
- Copy antlr4's cpp libs to
./libs/antlr4. (Please take care that the include folder points straight to the files not toantlr-runtime) - Copy
antlr-4.8-complete.jarto./thirdparty/antlr. - Generate parsers to
./libs/generatedor 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
Languages
C++
97.2%
ANTLR
1.5%
CMake
1.3%