From d4e69a388b5435ee1c409ebdce3ff8dcd3df1462 Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Fri, 22 Feb 2013 13:20:04 -0500 Subject: [PATCH] updated parser to use garbage collector --- premake4.lua | 3 ++- source/parser/main.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/premake4.lua b/premake4.lua index f078ed1..720f70d 100644 --- a/premake4.lua +++ b/premake4.lua @@ -49,7 +49,8 @@ project "sclpl-parse" kind "ConsoleApp" language "C" location "build" - files { "source/parser/**.*" } + includedirs { "source/lexer/**", "source/runtime/**" } + files { "source/parser/**.*", "source/runtime/collector/**.*"} project "sclpl-parse-tests" kind "ConsoleApp" diff --git a/source/parser/main.c b/source/parser/main.c index 7a7c380..07b88a1 100644 --- a/source/parser/main.c +++ b/source/parser/main.c @@ -1,6 +1,16 @@ +#include "gc.h" int main(int argc, char** argv) { + /* init the collector */ + int foo; + gc_set_stack_base(&foo); + + /* main program */ + + + /* shutdown the collector */ + gc_shutdown(); return 0; } -- 2.55.0