14 Commits

Author SHA1 Message Date
118942521e test: add initial test makefile
This also adds support for "#" characters prior to immediates.

nop may also now appear in an op_t. The parser no longer generates nop_t--this
is instead now represented as an op_t with a zero-length ops vector.
2023-08-23 19:21:43 -07:00
f51ec95713 grammar: update
This moves the expression grammar from parser.cpp to grammar.txt.
2023-08-23 19:17:10 -07:00
37fe5d5f81 parser: add error hint for x = 1
I've accidentally attempted this multiple times myself during testing.
2023-08-23 20:41:23 +00:00
7f69f6b2e1 ast: improve error messages 2023-08-23 20:23:09 +00:00
d8b8bc7850 stmt: add instruction masks and codes
The parser now checks for conflicts in op control words.
2023-08-21 05:15:00 +00:00
05664bb132 parser: add identifiers 2023-08-20 17:42:57 +00:00
cd0c9c7c8c parser: add assign and label 2023-08-20 08:45:16 +00:00
867ee171a5 parser: add jump 2023-08-20 06:02:18 +00:00
b97abc776c parser: add dma and mvi parsers 2023-08-20 05:54:53 +00:00
22625c7c90 ast: add printers for all instructions 2023-08-19 19:40:20 -07:00
e520a0de19 parser: initial op parsing 2023-08-20 00:59:41 +00:00
cc7345ec33 lexer: loop if the current character does not produce a token 2023-08-16 19:52:02 +00:00
b6d4ae5e8e parser: initial expression parser 2023-08-15 20:18:35 -07:00
e2f587437d expr: add more expression structures 2023-08-15 23:01:35 +00:00