From 900976d2d74e0de57858b265c2ef0d17a29e921a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 30 Jul 2006 06:39:27 +0000 Subject: Found out all of the c++ stuff in bison broke in 2.2, now we have to pick a version, there is no way around it nicely. --- src/builder.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/builder.cpp (limited to 'src/builder.cpp') diff --git a/src/builder.cpp b/src/builder.cpp new file mode 100644 index 0000000..8c72fef --- /dev/null +++ b/src/builder.cpp @@ -0,0 +1,34 @@ +#include + +#include "builder.h" +#include "build.tab.h" + +Builder::Builder() +{ +} + +Builder::~Builder() +{ +} + +void Builder::load( const char *sFN ) +{ + file = sFN; + + scanBegin(); + yy::BuildParser parser( *this ); + parser.set_debug_level( false ); + parser.parse(); + scanEnd(); +} + +void Builder::error( const yy::location &l, const std::string &m ) +{ + std::cerr << l << ": " << m << std::endl; +} + +void Builder::error( const std::string &m ) +{ + std::cerr << m << std::endl; +} + -- cgit v1.2.3