From 33cc400714f379ef13e876b4aedd0de8cb5d033d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 12 May 2010 12:17:10 -0700 Subject: Fix defines involving both literals and other defined macros. We now store a list of tokens in our hash-table rather than a single string. This lets us replace each macro in the value as necessary. This code adds a link dependency on talloc which does exactly what we want in terms of memory management for a parser. The 3 tests added in the previous commit now pass. --- glcpp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'glcpp.c') diff --git a/glcpp.c b/glcpp.c index d6c89df2f9..fcdc4ed8a0 100644 --- a/glcpp.c +++ b/glcpp.c @@ -23,17 +23,19 @@ #include "glcpp.h" +extern int yydebug; + int main (void) { - glcpp_parser_t parser; + glcpp_parser_t *parser; int ret; - glcpp_parser_init (&parser); + parser = glcpp_parser_create (); - ret = glcpp_parser_parse (&parser); + ret = glcpp_parser_parse (parser); - glcpp_parser_fini (&parser); + glcpp_parser_destroy (parser); return ret; } -- cgit v1.2.3