There are four types of "lexical elements".
- Operations: These are basically what is excecuted on the gpu. You can find a tale of operations here
- Arguments: After an operation, you place arguments! This is specified by the brackets on the argument names after the instruction.
- Statement: These are basically just made up of everything in a line. It can either contain an operation and it's arguements, or a single comment. Each statement is separated by a line break.
- Comments: These begin with a # and you can place them on single lines or after statements! Keep in mind that when putting comments after statements, you must include a space (the assembler uses it as a delimiter)
Here's an example of the syntax:
v 0.2 0.5 0.3 #This is a comment
#This is another comment
clr FFFF00
v 0.2 0.6 0.2 00FF00
You might've noticed I took a bit of inspiration from the obj file format.