Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: bison/src/bison/2.4.1/bison-2.4.1-src/examples/calc++/calc++-driver.cc

Issue 10807020: Add native Windows binary for bison. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: bison/src/bison/2.4.1/bison-2.4.1-src/examples/calc++/calc++-driver.cc
===================================================================
--- bison/src/bison/2.4.1/bison-2.4.1-src/examples/calc++/calc++-driver.cc (revision 0)
+++ bison/src/bison/2.4.1/bison-2.4.1-src/examples/calc++/calc++-driver.cc (revision 0)
@@ -0,0 +1,38 @@
+#line 8370 "../../doc/bison.texinfo"
+#include "calc++-driver.hh"
+#include "calc++-parser.hh"
+
+calcxx_driver::calcxx_driver ()
+ : trace_scanning (false), trace_parsing (false)
+{
+ variables["one"] = 1;
+ variables["two"] = 2;
+}
+
+calcxx_driver::~calcxx_driver ()
+{
+}
+
+int
+calcxx_driver::parse (const std::string &f)
+{
+ file = f;
+ scan_begin ();
+ yy::calcxx_parser parser (*this);
+ parser.set_debug_level (trace_parsing);
+ int res = parser.parse ();
+ scan_end ();
+ return res;
+}
+
+void
+calcxx_driver::error (const yy::location& l, const std::string& m)
+{
+ std::cerr << l << ": " << m << std::endl;
+}
+
+void
+calcxx_driver::error (const std::string& m)
+{
+ std::cerr << m << std::endl;
+}
Property changes on: bison\src\bison\2.4.1\bison-2.4.1-src\examples\calc++\calc++-driver.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698