Initial encoding implementation #19

Merged
omicron merged 14 commits from encoding_start into main 2025-04-16 22:16:32 +00:00

14 Commits

Author SHA1 Message Date
d97cfb97be Implement printing the encoding in main
All checks were successful
Validate the build / validate-build (push) Successful in 33s
2025-04-16 23:10:17 +02:00
99c9dcd985 Incomplete second pass encoding 2025-04-16 23:10:09 +02:00
7e9c1bfda2 Add bytes type and tests
bytes_t is a local (automatic) allocation array that carries the length
and capacity with it.
2025-04-16 23:10:09 +02:00
d8ae126e9a Add opcode encoding value for NODE_INSTRUCTION entries in the AST 2025-04-16 23:10:09 +02:00
68dcd9dcce Add first encoding pass
First pass collects all the symbols and interprets number and register
tokens into usable data for the later passes.
2025-04-16 23:10:00 +02:00
dcf90b72e0 Add register and number values to AST nodes 2025-04-16 23:10:00 +02:00
2cf69f5e18 Add initial limited opcode data 2025-04-16 23:09:47 +02:00
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
ac14925a0a Add symbols tests 2025-04-16 13:46:19 +02:00
2a7bb479ac initial symbol table implementation 2025-04-16 13:46:19 +02:00
ef22c0b620 Add .import and .export to the input test file 2025-04-16 13:46:19 +02:00
8c0e9926c5 Make main properly return with failure on parsing errors 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
dc210e409c fix parse_immediate to accept label_reference instead of identifier 2025-04-16 13:41:28 +02:00