diff options
author | 2020-05-08 20:32:35 -0700 | |
---|---|---|
committer | 2020-05-08 20:32:35 -0700 | |
commit | ec3c2aab43130d96c599e38474e3467b47a4bfcd (patch) | |
tree | fe22de4b8377e16e8d749b27558ad5b4e8857d76 /Source/Parser/wp_parser_c.cpp | |
parent | 47f91938af6c92f36d234738d267ac18e00842a6 (diff) | |
download | WarpX-ec3c2aab43130d96c599e38474e3467b47a4bfcd.tar.gz WarpX-ec3c2aab43130d96c599e38474e3467b47a4bfcd.tar.zst WarpX-ec3c2aab43130d96c599e38474e3467b47a4bfcd.zip |
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.
Diffstat (limited to 'Source/Parser/wp_parser_c.cpp')
-rw-r--r-- | Source/Parser/wp_parser_c.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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; +} |