From d68fe923a1974cc82ab3b12dc1f70b509bf06a95 Mon Sep 17 00:00:00 2001 From: couriersud Date: Mon, 25 May 2015 18:28:03 +0200 Subject: Added a simple preprocessor to the netlist parsing pipeline. This preprpcessor understands defines and nested if/else/endif #define MYMACRO 0 #if (MYMACRO) .... #else #endif One can now run ./nltool -c run -f src/mame/drivers/nl_pong.c -t 10 without removing preprocessor elements first. This does not work with netlist originating from DICE currently. These have to be converted first. In addition, cleaned up __attribute__ madness in the code. Specifically removed ATTR_COLD from virtual definitions to avoid the vtable being declared as cold. --- scripts/src/netlist.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/src/netlist.lua') diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 96d81688fc3..d1f9c97a74b 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -18,11 +18,13 @@ files { MAME_DIR .. "src/emu/netlist/pconfig.h", MAME_DIR .. "src/emu/netlist/palloc.c", MAME_DIR .. "src/emu/netlist/palloc.h", - MAME_DIR .. "src/emu/netlist/pstring.c", - MAME_DIR .. "src/emu/netlist/pstring.h", MAME_DIR .. "src/emu/netlist/plists.h", + MAME_DIR .. "src/emu/netlist/pparser.c", + MAME_DIR .. "src/emu/netlist/pparser.h", MAME_DIR .. "src/emu/netlist/pstate.c", MAME_DIR .. "src/emu/netlist/pstate.h", + MAME_DIR .. "src/emu/netlist/pstring.c", + MAME_DIR .. "src/emu/netlist/pstring.h", MAME_DIR .. "src/emu/netlist/analog/nld_bjt.c", MAME_DIR .. "src/emu/netlist/analog/nld_bjt.h", MAME_DIR .. "src/emu/netlist/analog/nld_fourterm.c", -- cgit v1.2.3-70-g09d2