Files
bison/examples/calc++/calc++.cc
Akim Demaille 828c373b6d Bind examples/calc++ to the package.
* examples/calc++/Makefile: Remove, replaced by...
* examples/calc++/Makefile.am: ... this new file.
* examples/calc++/test: Remove input.
* examples/calc++/compile: Remove.
* examples/Makefile.am: New.
* configure.ac, Makefile.am: Adjust.
* doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2005-07-06 07:49:25 +00:00

20 lines
426 B
C++

#line 7416 "../../doc/bison.texinfo"
#include <iostream>
#include "calc++-driver.hh"
int
main (int argc, const char* argv[])
{
calcxx_driver driver;
for (++argv; argv[0]; ++argv)
if (*argv == std::string ("-p"))
driver.trace_parsing = true;
else if (*argv == std::string ("-s"))
driver.trace_scanning = true;
else
{
driver.parse (*argv);
std::cout << driver.result << std::endl;
}
}