Commit Graph

5 Commits

Author SHA1 Message Date
d59559d327 Add registers data table
Change the validated primitive parse_register so that it uses the data
table instead
2025-04-16 13:46:19 +02:00
d3d69b82d5 Add .import and .export directive to the grammar and parser 2025-04-16 13:46:10 +02:00
242fd9baa5 Fix grammar not being able to disambiguate some instructions
When two identifiers follow eachother it could be two instruction
mnemonics or one instruction mnemonic and one operand. To fix this
TOKEN_NEWLINE has been reintroduced as a semantic token. The grammar has
been changed to allow empty statements and every instruction and
directive has to end in a newline. Labels do not have to end in a
newline.

In addition to updating the grammar, the implementation of tokenlist,
ast and parser has been updated to reflect these changes.
2025-04-16 12:34:44 +02:00
b70b6896bf Partial parser implementation 2025-04-02 20:56:59 +02:00
44fa66c2b7 Add "primitive" parsers for all the non-trivia tokens in the lexer grammar 2025-04-02 20:41:42 +02:00