Show HN: A Minimal Basic Inspired by Brainfuck
9 hours ago
- #minimal-basic
- #compiler
- #programming-language
- Minimal BASIC is a minimalist version of BASIC with commands for printing, input, assignment, and conditional jumps.
- Programs can be represented as a single string without whitespace; tools like mbStr.py and mbFormat.py convert between formatted and string representations.
- The BNF for Minimal BASIC defines a simple syntax for programs, statements, expressions, variables, labels, and integers.
- Minimal BASIC can serve as a target for compilers; tbc.py translates higher-level tb language features like if-then-else and loops into Minimal BASIC.
- Extensions to Minimal BASIC include more complex expressions with precedence and brackets, and potential support for GOSUB/RETURN, with exprCompiler.py as a starting point.