Files
bfc/README.md

56 lines
939 B
Markdown
Raw Normal View History

2020-10-01 20:43:00 +05:30
# bfc (*.bfe)
2020-09-30 01:15:57 +05:30
An extension of a language that shall not be named
2020-10-01 20:43:00 +05:30
*HelloWorld.bfe*
2020-09-30 01:27:09 +05:30
```
-[-7>+<]>-.-[->+5<]>++.+7..+3.[-3>+<]>-5.--[->+4<]>-.-8.+3.-6.-8.
```
2020-10-01 20:43:00 +05:30
2020-09-30 01:15:57 +05:30
## Setup oddities
2020-09-30 01:27:09 +05:30
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`)
2020-09-30 01:15:57 +05:30
2. Copy `antlr-4.8-complete.jar` to `./thirdparty/antlr`.
3. Generate parsers to `./libs/generated` or use VSCode with the ANTLR extension.
2020-09-30 01:27:09 +05:30
## Todo (Tentative)
- [ ] Grammar
- [X] Number shorthand
- [X] Loop statements
2020-10-01 13:14:57 +05:30
- [ ] Shorthand segments
2020-10-01 20:43:00 +05:30
- [X] Processing
2020-10-01 13:14:57 +05:30
- [X] Translate to bf
2020-10-01 20:43:00 +05:30
- [X] Execute results
## Syntax
**Basic**
```bf
,. 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
```