From ec3c2aab43130d96c599e38474e3467b47a4bfcd Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 8 May 2020 20:32:35 -0700 Subject: Parser: .c -> .cpp (#999) Rationale: The parser conditionally includes CUDA qualifiers in GPU builds. There is only CUDA C++, no CUDA C. C is (mostly) a subset of C++. Consequently: those are now C++ files :-) Simplifies build logic with build system generators. --- Source/Parser/wp_parser_c.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Source/Parser/wp_parser_c.cpp (limited to 'Source/Parser/wp_parser_c.cpp') diff --git a/Source/Parser/wp_parser_c.cpp b/Source/Parser/wp_parser_c.cpp new file mode 100644 index 000000000..ad7d5ec51 --- /dev/null +++ b/Source/Parser/wp_parser_c.cpp @@ -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