~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/examples/cparser/cparser.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
static bool DO_SEMANTICS = true;
26
26
static bool PRINT_TREE = true;
27
27
static bool PRINT_DB = true;
 
28
static int  ONLY_PRE = 0;
28
29
 
29
30
void evalOptions (int argc, char **argv) {
30
31
  if (argc < 2) {
40
41
    cout << "  -nd|--no-print-db     do not print the class database" << endl;
41
42
    cout << "  -nt|--no-print-tree   do not print the syntax tree" << endl;
42
43
    cout << "  -ns|--no-semantics    do not start the semantic process" << endl;
 
44
    cout << "  -E                    write preprocessor output to stdout" << endl;
43
45
    exit (1);
44
46
  }
45
47
  for (int i = 1; i < argc-1; i++) {
64
66
      PRINT_TREE = false;
65
67
    else if (! strcmp (arg, "-ns") || ! strcmp (arg, "--no-semantics"))
66
68
      DO_SEMANTICS = false;
 
69
    else if (! strcmp (arg, "-E"))
 
70
      ONLY_PRE = 1;
67
71
  }
68
72
}
69
73
 
90
94
#endif
91
95
 
92
96
  cout << "Starting parse process..." << endl;
93
 
  CTranslationUnit *tu = parser.parse (*unit, project);
 
97
  CTranslationUnit *tu = parser.parse (*unit, project, ONLY_PRE);
94
98
 
95
99
  if (tu->tree ()) {
96
100
    if (DO_SEMANTICS) {