Rename asmy to more explicit parser

This should make the purpose of that file clearer to newcomers
This commit is contained in:
ISSOtm
2020-10-11 21:03:41 +02:00
parent 6a8ae643d5
commit 01637768cf
7 changed files with 11 additions and 11 deletions

View File

@@ -53,13 +53,13 @@ RM := rm -rf
all: rgbasm rgblink rgbfix rgbgfx
rgbasm_obj := \
src/asm/asmy.o \
src/asm/charmap.o \
src/asm/fstack.o \
src/asm/lexer.o \
src/asm/macro.o \
src/asm/main.o \
src/asm/math.o \
src/asm/parser.o \
src/asm/output.o \
src/asm/rpn.o \
src/asm/section.o \
@@ -72,7 +72,7 @@ rgbasm_obj := \
src/hashmap.o \
src/linkdefs.o
src/asm/lexer.o src/asm/main.o: src/asm/asmy.h
src/asm/lexer.o src/asm/main.o: src/asm/parser.h
rgblink_obj := \
src/link/assign.o \

View File

@@ -27,7 +27,7 @@ struct Expression {
uint32_t nRPNPatchSize; // Size the expression will take in the obj file
};
/* FIXME: Should be defined in `asmy.h`, but impossible with POSIX Yacc */
/* FIXME: Should be defined in `parser.h`, but impossible with POSIX Yacc */
extern int32_t nPCOffset;
/*

View File

@@ -22,13 +22,13 @@ else()
pkg_check_modules(LIBPNG REQUIRED libpng)
endif()
BISON_TARGET(ASMy "asm/asmy.y"
"${PROJECT_SOURCE_DIR}/src/asm/asmy.c"
DEFINES_FILE "${PROJECT_SOURCE_DIR}/src/asm/asmy.h"
BISON_TARGET(PARSER "asm/parser.y"
"${PROJECT_SOURCE_DIR}/src/asm/parser.c"
DEFINES_FILE "${PROJECT_SOURCE_DIR}/src/asm/parser.h"
)
set(rgbasm_src
"${BISON_ASMy_OUTPUT_SOURCE}"
"${BISON_PARSER_OUTPUT_SOURCE}"
"asm/charmap.c"
"asm/fstack.c"
"asm/lexer.c"

4
src/asm/.gitignore vendored
View File

@@ -1,2 +1,2 @@
asmy.c
asmy.h
/parser.c
/parser.h

View File

@@ -36,7 +36,7 @@
#include "asm/util.h"
#include "asm/warning.h"
/* Include this last so it gets all type & constant definitions */
#include "asmy.h" /* For token definitions, generated from asmy.y */
#include "parser.h" /* For token definitions, generated from parser.y */
#ifdef LEXER_DEBUG
#define dbgPrint(...) fprintf(stderr, "[lexer] " __VA_ARGS__)

View File

@@ -26,7 +26,7 @@
#include "asm/rpn.h"
#include "asm/symbol.h"
#include "asm/warning.h"
#include "asmy.h"
#include "parser.h"
#include "extern/err.h"
#include "extern/getopt.h"