Created
October 5, 2020 18:48
-
-
Save comex/7fbfd6d255d3892d0ac22d70059d9d3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c++ -o dptest depfile_parser.cc util.cc edit_distance.cc metrics.cc dptest.cc -std=c++11 | |
#include <stdio.h> | |
#include <assert.h> | |
#include "depfile_parser.h" | |
int main(int argc, char **argv) { | |
assert(argc == 2); | |
string err; | |
DepfileParser parser; | |
printf("input: {%s}\n", argv[1]); | |
string arg(argv[1]); | |
bool ok = parser.Parse(&arg, &err); | |
if (!ok) { | |
printf("err: %s\n", err.c_str()); | |
} else { | |
for (auto out : parser.outs_) { | |
printf("out: {%.*s}\n", (int)out.size(), out.str_); | |
} | |
for (auto in : parser.ins_) { | |
printf("in: {%.*s}\n", (int)in.size(), in.str_); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment