git » unicorn-sparkle-basic.git » commit f504779

use gc for tokens

author Alan Dipert
2024-04-20 00:05:58 UTC
committer Alan Dipert
2024-04-20 00:05:58 UTC
parent 48c92d4c98edd53d73cdd035bfb41c15f5803c77

use gc for tokens

usbasic.l +6 -0

diff --git a/usbasic.l b/usbasic.l
index 1c2c951..005c8ab 100644
--- a/usbasic.l
+++ b/usbasic.l
@@ -6,7 +6,13 @@
  */
 
 %{
+#include <gc.h>
 #include "usbasic.tab.h"
+
+#define yyalloc(sz)        GC_malloc(sz)
+#define yyfree(ptr)        GC_free(ptr)
+#define yyrealloc(ptr, sz) GC_realloc(ptr, sz)
+
 %}
 
 %option nounput noinput