]> git.saurik.com Git - bison.git/blob - examples/calc++/calc++.cc
* bootstrap (gnulib_modules): Add gettext, now that it's no longer
[bison.git] / examples / calc++ / calc++.cc
1 #line 7416 "../../doc/bison.texinfo"
2 #include <iostream>
3 #include "calc++-driver.hh"
4
5 int
6 main (int argc, const char* argv[])
7 {
8 calcxx_driver driver;
9 for (++argv; argv[0]; ++argv)
10 if (*argv == std::string ("-p"))
11 driver.trace_parsing = true;
12 else if (*argv == std::string ("-s"))
13 driver.trace_scanning = true;
14 else
15 {
16 driver.parse (*argv);
17 std::cout << driver.result << std::endl;
18 }
19 }