ultimatepp/uppbox/UppBuilder/Skeleton.hpp
dolik d34a194cc9 .lpbuild2, .UppBuilder: various fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@4598 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2012-02-15 19:12:59 +00:00

27 lines
No EOL
664 B
C++

/*
This is an example file. Anyone can use it as a base for
additional parser output formats.
*/
#define DUMP(X) \
printf(#X":\n");\
for(int q = 0; q < X.GetCount(); q++) \
printf(" [%i] = %s\n", q, ~X[q]);
void Parser::Process(){
DUMP(flags);
DUMP(nests);
DUMP(dflags);
printf("packages:\n");
for(int i = 0; i < pkgs.GetCount(); i++){
printf(" %s\n", ~pkgs[i].name);
for(int j = 0; j < pkgs[i].flags.GetCount(); j++){
printf("%s%s", j ?", ":" ", ~pkgs[i].flags[j]);
}
printf("\n");
for(int j = 0; j < pkgs[i].custom.GetCount(); j++){
printf(" %s%s\n", ~pkgs[i].custom[j].when, ~pkgs[i].custom[j].item);
}
printf("\n");
}
}