Aryadev Chavali
44125d7ad9
Implemented OP_MSIZE into lexer/parser of ASM
2023-11-01 21:47:19 +00:00
Aryadev Chavali
7564938113
Implemented lexer and parser for new memory management instructions
2023-11-01 21:40:25 +00:00
Aryadev Chavali
83678ad29a
Add MULT to lexer and parser for assembler
2023-11-01 18:09:00 +00:00
Aryadev Chavali
57e6923279
Fixed bug where comparators wouldn't be parsed correctly
...
This is because comparators may apply to signed types, so I need to
use the right parsing function.
2023-11-01 17:55:54 +00:00
Aryadev Chavali
6a270eda1e
Parser now uses updated lexer
...
Much simpler, uses a switch case which is a much faster method of
doing the parsing. Though roughly equivalent in terms of LOC, I feel
that this is more extensible
2023-11-01 15:09:56 +00:00
Aryadev Chavali
7817b5acc9
Use standardised signed version of word type from base.h
2023-10-31 21:24:50 +00:00
Aryadev Chavali
fa640f13e8
parse_word deals with characters now
...
Just takes the character literally as a number.
2023-10-31 20:38:03 +00:00
Aryadev Chavali
228f548bd9
Changed asm/parser instruction push-reg->push.reg
2023-10-31 20:37:11 +00:00
Aryadev Chavali
eac8cbf1da
asm/parser supports all opcodes, introduced parse errors
...
Introduced some functions to parse differing types of opcodes. Use
the same style of a.b.c... for namespacing or type specification for
certain opcodes. Bit hacky and not tested, but does work.
Parse errors can be reported with an exact location using the token
column, line.
2023-10-28 18:21:09 +01:00
Aryadev Chavali
2fe2af22a9
Implemented a rudimentary parser with support for 4 instruction types
2023-10-26 11:17:55 +01:00
Aryadev Chavali
7bf6b53230
Unified literal for numbers, main program now tokenises
2023-10-26 07:15:52 +01:00
Aryadev Chavali
131d70a9a3
Started working on a parser
...
No implementations yet
2023-10-25 21:43:51 +01:00