Stage 65

Follow the development of the SharpBASIC compiler and share your thoughts and ideas.
Locked
User avatar
frank
Site Admin
Posts: 40
Joined: Sun Nov 21, 2021 12:04 pm
Location: Netherlands
Contact:

Stage 65

Post by frank »

The SharpBASIC compiler is in its early stages and not yet ready for custom testing. Currently, string manipulation is being implemented and there is good news on this front: three string types are supported, constant and variable strings, which are null-terminated, and fixed length strings, which are not null-terminated. Variable and fixed length strings have a descriptor in the format [addr-size] whereby the size of variable length strings is always set to null and the size of fixed length strings is the actual length as declared in the dim-statement.

Code: Select all

const con = "hello";               ' null terminated, no descriptor
dim var: string = "Sharp";         ' null terminated and descriptor [addr:0]
dim fix: string*5 = "BASIC";       ' not null terminated and descriptor [addr:5]
The development of the compiler took off in early 2020 (stages 1-64) with the development of the tokenizer, the lexer, the parser and the assembly emitter. The numeric expression parser, including type checking, was developed at the same time. From June 2020 to October 2021 the development was paused due to the corona crisis.
Keep it simple!
Locked