Created the skeleton for the parser.

This commit is contained in:
2022-02-07 15:33:58 +00:00
parent 7c6e5e1541
commit 3d4ab57f05
5 changed files with 74 additions and 3 deletions
+5
View File
@@ -3,6 +3,7 @@
#include <string.h>
#include "../includes/list.h"
#include "../includes/lexer.h"
#include "../includes/parser.h"
typedef struct {
char *opcode;
@@ -38,6 +39,10 @@ int main(int argc, char* args[]) {
while((bytes_read = getline(&line, &len, file)) != -1) {
List* tokens = GetTokensFromLine(line);
if (line_number == 1 || line_number == 2) {
ParseTokens(tokens);
}
for (int i = 0; i < tokens->size; i++) {
Token* t = (Token*) tokens->content[i];