Hi, the error you spotted is new to me, but it is easily solved. Additionally, there are further errors, that I fixed upstream some time ago.
Please find the attached patch. Upstream commits: 08eed45f5ec8753276fca8e756f7876936e2bd82 (fix bison errors, also remove depration warning about error_verbose) 4fada3c29b437836fe24635ad7f88c88a1ded9f5 Catch exceptions by reference. I'll try to prepare a debdiff and have a new version uploaded soonish, but as always, feel free to NMU. Thanks for the BR, Stefan.
diff --git a/src/compiler/FAUhdlc.cpp b/src/compiler/FAUhdlc.cpp index afa99918..51d92ac2 100644 --- a/src/compiler/FAUhdlc.cpp +++ b/src/compiler/FAUhdlc.cpp @@ -191,10 +191,10 @@ FAUhdlc::run(void) try { this->doSemanticAnalysis(); - } catch (std::runtime_error f) { + } catch (std::runtime_error &f) { this->resultCode = FAUHDLC_EXIT_EXCEPTION; std::cerr << f.what() << std::endl; - } catch (ast::CompileError ce) { + } catch (ast::CompileError &ce) { this->resultCode = FAUHDLC_EXIT_EXCEPTION; std::cerr << "ERROR> " << ce << std::endl; } catch (...) { @@ -210,7 +210,7 @@ FAUhdlc::run(void) try { this->doIntermediateTransform(); - } catch (std::runtime_error f) { + } catch (std::runtime_error &f) { this->resultCode = FAUHDLC_EXIT_EXCEPTION; std::cerr << f.what() << std::endl; @@ -242,7 +242,7 @@ FAUhdlc::doParse(void) try { driver.parse(*((*i)->filename), (*i)->library); - } catch (yy::SyntaxError e) { + } catch (yy::SyntaxError &e) { if (ast::ErrorRegistry::hasErrors()) { // don't report syntax errors, there are // other, probably more accute errors @@ -253,11 +253,11 @@ FAUhdlc::doParse(void) std::cerr << e.what() << std::endl; this->resultCode = FAUHDLC_EXIT_ERROR; return; - } catch (std::runtime_error g) { + } catch (std::runtime_error &g) { std::cerr << g.what() << std::endl; this->resultCode = FAUHDLC_EXIT_EXCEPTION; return; - } catch (ast::CompileError h) { + } catch (ast::CompileError &h) { std::cerr << "ERROR> " << h << std::endl; } catch (...) { std::cerr << "unknown exception occured." diff --git a/src/frontend/ast/DiscreteRange.cpp b/src/frontend/ast/DiscreteRange.cpp index fc7ca59b..f697191d 100644 --- a/src/frontend/ast/DiscreteRange.cpp +++ b/src/frontend/ast/DiscreteRange.cpp @@ -29,7 +29,7 @@ DiscreteRange::DiscreteRange( { try { this->setFromAndTo(si); - } catch(std::runtime_error) { + } catch(std::runtime_error &) { std::string msg = "Not a constraint type found for range " + util::MiscUtil::toString(si); CompileError *ce = new CompileError(*this, msg); diff --git a/src/frontend/newparser/FAUhdlParser.yy b/src/frontend/newparser/FAUhdlParser.yy index 2c3a73df..2518add1 100644 --- a/src/frontend/newparser/FAUhdlParser.yy +++ b/src/frontend/newparser/FAUhdlParser.yy @@ -10,9 +10,9 @@ %skeleton "lalr1.cc" /* -*- C++ -*- */ %require "2.1a" /* need this for c++ skeleton */ -%define "parser_class_name" "FAUhdlParser" +%define api.parser.class {FAUhdlParser} %defines -%error-verbose +%define parse.error verbose %parse-param {yy::ParserDriver &driver} /* %lex-param {location_type* yylloc} */
signature.asc
Description: PGP signature