Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > cb2815c364c7c9ed0f714d3fccc2cce7 > files > 43

bison-3.0.4-1.mga5.i586.rpm

#include <iostream>
#include "calc++-driver.hh"


int
main (int argc, char *argv[])
{
  int res = 0;
  calcxx_driver driver;
  for (int i = 1; i < argc; ++i)
    if (argv[i] == std::string ("-p"))
      driver.trace_parsing = true;
    else if (argv[i] == std::string ("-s"))
      driver.trace_scanning = true;
    else if (!driver.parse (argv[i]))
      std::cout << driver.result << std::endl;
    else
      res = 1;
  return res;
}