flush
authorMichael Wallner <mike@php.net>
Thu, 15 Oct 2015 14:48:32 +0000 (16:48 +0200)
committerMichael Wallner <mike@php.net>
Thu, 15 Oct 2015 14:48:32 +0000 (16:48 +0200)
Makefile.frag
src/compiler.c

index 79af1be30d759bc6147f83426290a480754da552..99f708aec56338585dfe85e25703520975d2c3ea 100644 (file)
@@ -22,6 +22,7 @@ lemon.c:
        curl -sSo $@ "http://www.sqlite.org/src/raw/tool/lemon.c?name=039f813b520b9395740c52f9cbf36c90b5d8df03"
 
 ./lemon: lemon.c | lempar.c
        curl -sSo $@ "http://www.sqlite.org/src/raw/tool/lemon.c?name=039f813b520b9395740c52f9cbf36c90b5d8df03"
 
 ./lemon: lemon.c | lempar.c
+       $(CC) -o $@ $<
 
 $(PHP_PSI_SRCDIR)/src/parser_proc.c: $(PHP_PSI_SRCDIR)/src/parser_proc.y $(LEMON)
        $(LEMON) -c $<
 
 $(PHP_PSI_SRCDIR)/src/parser_proc.c: $(PHP_PSI_SRCDIR)/src/parser_proc.y $(LEMON)
        $(LEMON) -c $<
index 0c5fcb5e63d35a5b3675774c56b84ea617928b4b..660c968c3d138ae534bfcd9153c29942628edf66 100644 (file)
@@ -21,6 +21,20 @@ PSI_Compiler *PSI_CompilerInit(PSI_Compiler *C, PSI_Validator *V, void *context)
        return C;
 }
 
        return C;
 }
 
+void PSI_CompilerDtor(PSI_Compiler *C)
+{
+       PSI_DataDtor((PSI_Data *) C);
+}
+
+void PSI_Compiler_Free(PSI_Compiler **C)
+{
+       if (*C) {
+               PSI_CompilerDtor(*C);
+               free(*C);
+               *C = NULL;
+       }
+}
+
 typedef struct PSI_ClosureData {
        void *context;
        impl *impl;
 typedef struct PSI_ClosureData {
        void *context;
        impl *impl;