git » unicorn-sparkle-basic.git » commit 3f8a107

ast.{c,h} -> parse.{c,h}

author Alan Dipert
2024-01-09 16:58:45 UTC
committer Alan Dipert
2024-01-09 16:58:45 UTC
parent e23ac9213c9d5fce2bbee44a6c3e07cae032120f

ast.{c,h} -> parse.{c,h}

Makefile +5 -5
bbasic.y +1 -1
main.c +1 -1
ast.c => parse.c +1 -1
ast.h => parse.h +0 -0

diff --git a/Makefile b/Makefile
index aede200..2c6e49a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,13 +8,13 @@ YFLAGS=-d
 
 all: bbasic
 
-bbasic: lex.yy.o bbasic.tab.o ast.o main.o
-	$(CC) $(CFLAGS) -o bbasic lex.yy.o bbasic.tab.o ast.o main.o -lfl
+bbasic: lex.yy.o bbasic.tab.o parse.o main.o
+	$(CC) $(CFLAGS) -o bbasic lex.yy.o bbasic.tab.o parse.o main.o -lfl
 
-ast.o: ast.c ast.h
-	$(CC) $(CFLAGS) -c ast.c
+parse.o: parse.c parse.h
+	$(CC) $(CFLAGS) -c parse.c
 
-main.o: main.c
+main.o: main.c bbasic.tab.h parse.h
 	$(CC) $(CFLAGS) -c main.c
 
 lex.yy.o: lex.yy.c bbasic.tab.h
diff --git a/bbasic.y b/bbasic.y
index f633697..38d8a2f 100644
--- a/bbasic.y
+++ b/bbasic.y
@@ -1,7 +1,7 @@
 %{
 #include <stdio.h>
 #include <stdlib.h>
-#include "ast.h"
+#include "parse.h"
 extern int yylex();
 extern int yyparse();
 extern FILE *yyin;
diff --git a/main.c b/main.c
index b881bdd..934e9fb 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include "bbasic.tab.h"
-#include "ast.h"
+#include "parse.h"
 
 extern int yyparse();
 extern void yy_scan_string(char*);
diff --git a/ast.c b/parse.c
similarity index 98%
rename from ast.c
rename to parse.c
index f403fb0..c0422c0 100644
--- a/ast.c
+++ b/parse.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include "ast.h"
+#include "parse.h"
 
 struct node_tag* ast_last_numbered_line;
 
diff --git a/ast.h b/parse.h
similarity index 100%
rename from ast.h
rename to parse.h