ddf46ce8fd
stmt_ins: refactor
...
The overall intent is to make writing a decompiler require less code
duplication.
"bits.hpp" and "stmt_enum.hpp" are replaced with "stmt_ins.hpp" which
is generated directly from dsp-notes.csv.
2023-09-03 04:46:34 +00:00
0dbb339ca1
parser: change default dma add mode to 2
2023-08-24 09:01:45 +00:00
c13b1b2466
parser: DMA memory src/dst arguments update CTn
...
This means that they are more appropriately named MCn rather than Mn.
2023-08-24 08:06:28 +00:00
107eb18cd4
parser: allow immediate values that end with colon
...
This is funky syntax, but it doesn't hurt the accuracy of a parser.
Some people might prefer this to stylize references to labels.
2023-08-24 03:31:35 +00:00
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