From 77a53d41a63f06089ecc83c84fccd7c4a42a89af Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Wed, 13 Mar 2019 15:36:46 -0700 Subject: switch to WarpXParser --- Source/Parser/wp_parser_c.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Source/Parser/wp_parser_c.c (limited to 'Source/Parser/wp_parser_c.c') diff --git a/Source/Parser/wp_parser_c.c b/Source/Parser/wp_parser_c.c new file mode 100644 index 000000000..ad7d5ec51 --- /dev/null +++ b/Source/Parser/wp_parser_c.c @@ -0,0 +1,13 @@ +#include "wp_parser_c.h" +#include "wp_parser.lex.h" +#include "wp_parser.tab.h" + +struct wp_parser* +wp_c_parser_new (char const* body) +{ + YY_BUFFER_STATE buffer = yy_scan_string(body); + yyparse(); + struct wp_parser* parser = wp_parser_new(); + yy_delete_buffer(buffer); + return parser; +} -- cgit v1.2.3