There exist several BASIC dialects. BASIC V2 is hard wired, but any others can be configured externally.
Laser BASIC and BASIC Lightning have been special cased as their parser seems to behave differently from the common parser.
Adding new BASIC dialects with new token byte values (one or two bytes) is the expected process.
Several BASIC dialects come with C64Studio in the sub folder "BASIC Dialects". They are pretty self explanatory, a combination of text and CSV format file.
C64Studio reads all dialect files on startup. If there are any format errors a message is added to the "Output" view.
Lines starting with # or empty lines are skipped.
A line "ExOpcodes" starts the extended opcode section. These are used for C64Studio internally.
All other lines are expected to contain three csv columns, separated by semicolon.
The first csv line is treated as header and also skipped.
The three columns are "BASIC Token", "Byte Value(s)", and "BASIC Abbreviation".
For example:
NEXT;82;nE
NEXT is the regular BASIC command.
82 is the hexadecimal representation of the byte value(s) to be inserted. C64Studio supports one byte, and two byte tokens.
nE is the abbreviation. Normal token part is in lower case, any shifted letter is upper case. If there is no abbreviation for the token leave that column empty.
If an abreviation ends with an upper case letter typing that in the BASIC editor will automatically fill in the full command (e.g. "P-Shift-O" will turn to "POKE")