SharpBASIC

“ — what Pascal could have been and what BASIC should have been — ”

SharpBASIC is a new programming language that is currently in development. Here, BASIC means Beginners to Advanced Symbolic Instruction Code. The project started out as an experiment, to test a different approach, away from traditional compiler building concepts. The language has commonalities with traditional BASIC, Pascal and a bit of C. In the developer's view, it is what Pascal could have been and what BASIC should have been: structured without verbosity and powerful without ambiguity, to make it pleasant for the programmer to use and for the compiler to process. The compiler is aimed to produce 32 and 64 bits native code (currently on Linux).

Development started in early 2020 by Frank Hoogerbeets, but was halted soon after the corona crisis began. Development resumed in late 2021, but was halted again in 2022 due to lack of time. Development resumed again in 2023. No time has been set yet for the release of the first compiler version.

The SharpBASIC compiler uses a recursive descent or 'top-down' predictive technique. As such, it does not do any backtracking or left-recursion. This requires the grammar to be clear and without ambiguity, which is what the SharpBASIC language aims to be, to make it easier for the programmer to use and for the compiler to process.

It should be noted that no grammar tools, such as ANTLR, JavaCC and Yacc, are being used or have been used. The compiler is being built from scratch, including the tokenizer and lexer. Early on in the development, during the experimental stage, Jack Crenshaw's series "Let's build a compiler" served as a guide. It was particularly useful for the development of the expression parser, which has since grown far beyond what Crenshaw proposed and supports both implicit and explicit type recognition/conversion.

For the latest development news and code examples, check out the forum. We're also in the process of building a documentation wiki.

sharpbasic recursive programming