Inspiration
We took the theme of "legacy" rather literally and began looking into old programming languages, including briefly considering: writing a Jacquard Loom simulator and some programs in ALGOL68 (until we learned the GCC frontend had not been upstreamed yet). We then decided to try and write a compiler for a very outdated language.
What it does
It was meant to take in any Minimal BASIC program written according to the ANSI X3.60-1978/ECMA-55 specifications, compile it to a basic bytecode, and execute it in a VM.
How we built it
We started by writing out the BNF grammar and working on the Token list and lexer. We then began began work on the parser and AST, combining the products of the previous two steps. Then after this was mostly complete, making an interpreter/virtual machine to execute programs
Challenges we ran into
The specification for ECMA-55 was not very informative, with some minor mistakes, and vague about details on how certain constructs worked. Very ambitious for us to be able to complete all of this in the time allotted.
Accomplishments that we're proud of
We got 95% of the way there with lexing and parsing into an AST, with the only language construct not included being unquoted strings which were difficult to tokenise, as they introduced ambiguity.
What we learned
Dont implement a existing language for a hackathon no matter how simple it seems at the start.
What's next for Bassic
Rewrite in OCaml.

Log in or sign up for Devpost to join the conversation.