mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
* 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.
20 lines
426 B
C++
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;
|
|
}
|
|
}
|