mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* doc/bison.texinfo (Calc++): Add the extraction marks. * examples/extexi: New, from the aborted GNU Programming 2E. Separate the different paragraph of a file with empty lines. * examples/Makefile: Use it to extract the whole calc++ example.
20 lines
426 B
C++
20 lines
426 B
C++
#line 7414 "../../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;
|
|
}
|
|
}
|