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.
This commit is contained in:
Carl Worth
2010-05-12 12:17:10 -07:00
parent df2ab5b992
commit 33cc400714
5 changed files with 203 additions and 54 deletions
+6 -4
View File
@@ -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;
}