aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-25 21:43:51 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-25 21:43:51 +0100
commit131d70a9a37bdbfacaea9cfe2f78867dd9e16942 (patch)
treeb315754eff8396192c3714c2c523db182b7dfab3 /asm
parent94abb9e3d43e7559befb0aa02894227ec02eab41 (diff)
downloadovm-131d70a9a37bdbfacaea9cfe2f78867dd9e16942.tar.gz
ovm-131d70a9a37bdbfacaea9cfe2f78867dd9e16942.tar.bz2
ovm-131d70a9a37bdbfacaea9cfe2f78867dd9e16942.zip
Started working on a parser
No implementations yet
Diffstat (limited to 'asm')
-rw-r--r--asm/parser.c11
-rw-r--r--asm/parser.h24
2 files changed, 35 insertions, 0 deletions
diff --git a/asm/parser.c b/asm/parser.c
new file mode 100644
index 0000000..f796dfc
--- /dev/null
+++ b/asm/parser.c
@@ -0,0 +1,11 @@
+/* Copyright (C) 2023 Aryadev Chavali
+
+ * You may distribute and modify this code under the terms of the
+ * GPLv2 license. You should have received a copy of the GPLv2
+ * license with this file. If not, please write to:
+ * aryadev@aryadevchavali.com.
+
+ * Created: 2023-10-24
+ * Author: Aryadev Chavali
+ * Description:
+ */
diff --git a/asm/parser.h b/asm/parser.h
new file mode 100644
index 0000000..699539b
--- /dev/null
+++ b/asm/parser.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 2023 Aryadev Chavali
+
+ * You may distribute and modify this code under the terms of the GPLv2
+ * license. You should have received a copy of the GPLv2 license with
+ * this file. If not, please write to: aryadev@aryadevchavali.com.
+
+ * Created: 2023-10-24
+ * Author: Aryadev Chavali
+ * Description: Parser for assembly language
+ */
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include "./lexer.h"
+
+#include <vm/inst.h>
+
+typedef darr_t token_stream_t;
+
+inst_t parse_next_inst(token_stream_t *);
+inst_t *parse_stream(token_stream_t *, size_t *);
+
+#endif