mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
27 lines
No EOL
664 B
C++
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");
|
|
}
|
|
} |