mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Rename asmy to more explicit parser
This should make the purpose of that file clearer to newcomers
This commit is contained in:
4
Makefile
4
Makefile
@@ -53,13 +53,13 @@ RM := rm -rf
|
|||||||
all: rgbasm rgblink rgbfix rgbgfx
|
all: rgbasm rgblink rgbfix rgbgfx
|
||||||
|
|
||||||
rgbasm_obj := \
|
rgbasm_obj := \
|
||||||
src/asm/asmy.o \
|
|
||||||
src/asm/charmap.o \
|
src/asm/charmap.o \
|
||||||
src/asm/fstack.o \
|
src/asm/fstack.o \
|
||||||
src/asm/lexer.o \
|
src/asm/lexer.o \
|
||||||
src/asm/macro.o \
|
src/asm/macro.o \
|
||||||
src/asm/main.o \
|
src/asm/main.o \
|
||||||
src/asm/math.o \
|
src/asm/math.o \
|
||||||
|
src/asm/parser.o \
|
||||||
src/asm/output.o \
|
src/asm/output.o \
|
||||||
src/asm/rpn.o \
|
src/asm/rpn.o \
|
||||||
src/asm/section.o \
|
src/asm/section.o \
|
||||||
@@ -72,7 +72,7 @@ rgbasm_obj := \
|
|||||||
src/hashmap.o \
|
src/hashmap.o \
|
||||||
src/linkdefs.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 := \
|
rgblink_obj := \
|
||||||
src/link/assign.o \
|
src/link/assign.o \
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ struct Expression {
|
|||||||
uint32_t nRPNPatchSize; // Size the expression will take in the obj file
|
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;
|
extern int32_t nPCOffset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ else()
|
|||||||
pkg_check_modules(LIBPNG REQUIRED libpng)
|
pkg_check_modules(LIBPNG REQUIRED libpng)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
BISON_TARGET(ASMy "asm/asmy.y"
|
BISON_TARGET(PARSER "asm/parser.y"
|
||||||
"${PROJECT_SOURCE_DIR}/src/asm/asmy.c"
|
"${PROJECT_SOURCE_DIR}/src/asm/parser.c"
|
||||||
DEFINES_FILE "${PROJECT_SOURCE_DIR}/src/asm/asmy.h"
|
DEFINES_FILE "${PROJECT_SOURCE_DIR}/src/asm/parser.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(rgbasm_src
|
set(rgbasm_src
|
||||||
"${BISON_ASMy_OUTPUT_SOURCE}"
|
"${BISON_PARSER_OUTPUT_SOURCE}"
|
||||||
"asm/charmap.c"
|
"asm/charmap.c"
|
||||||
"asm/fstack.c"
|
"asm/fstack.c"
|
||||||
"asm/lexer.c"
|
"asm/lexer.c"
|
||||||
|
|||||||
4
src/asm/.gitignore
vendored
4
src/asm/.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
asmy.c
|
/parser.c
|
||||||
asmy.h
|
/parser.h
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#include "asm/util.h"
|
#include "asm/util.h"
|
||||||
#include "asm/warning.h"
|
#include "asm/warning.h"
|
||||||
/* Include this last so it gets all type & constant definitions */
|
/* 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
|
#ifdef LEXER_DEBUG
|
||||||
#define dbgPrint(...) fprintf(stderr, "[lexer] " __VA_ARGS__)
|
#define dbgPrint(...) fprintf(stderr, "[lexer] " __VA_ARGS__)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "asm/rpn.h"
|
#include "asm/rpn.h"
|
||||||
#include "asm/symbol.h"
|
#include "asm/symbol.h"
|
||||||
#include "asm/warning.h"
|
#include "asm/warning.h"
|
||||||
#include "asmy.h"
|
#include "parser.h"
|
||||||
|
|
||||||
#include "extern/err.h"
|
#include "extern/err.h"
|
||||||
#include "extern/getopt.h"
|
#include "extern/getopt.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user