From 75649381132924c4cb5e4fa215e200e2457a1434 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 1 Nov 2023 21:39:48 +0000 Subject: Implemented lexer and parser for new memory management instructions --- asm/parser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'asm/parser.c') diff --git a/asm/parser.c b/asm/parser.c index 41ffdb9..a7340f9 100644 --- a/asm/parser.c +++ b/asm/parser.c @@ -221,6 +221,18 @@ perr_t parse_next_inst(token_stream_t *stream, inst_t *ret) case TOKEN_DUP: ret->opcode = OP_DUP_BYTE; return parse_utype_inst_with_operand(stream, ret); + case TOKEN_MALLOC: + ret->opcode = OP_MALLOC_BYTE; + return parse_utype_inst_with_operand(stream, ret); + case TOKEN_MSET: + ret->opcode = OP_MSET_BYTE; + return parse_utype_inst_with_operand(stream, ret); + case TOKEN_MGET: + ret->opcode = OP_MGET_BYTE; + return parse_utype_inst_with_operand(stream, ret); + case TOKEN_MDELETE: + ret->opcode = OP_MDELETE; + break; case TOKEN_NOT: ret->opcode = OP_NOT_BYTE; return parse_utype_inst(stream, ret); -- cgit v1.2.3-13-gbd6f