URL: <http://savannah.gnu.org/support/?108481>
Summary: Assertion `!yytname_' failed. Project: bison Submitted by: None Submitted on: Thu 23 Jan 2014 04:30:53 PM UTC Category: None Priority: 5 - Normal Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Originator Email: amsilvacorr...@hotmail.com Open/Closed: Open Discussion Lock: Any Operating System: GNU/Linux _______________________________________________________ Details: Hi all, I was testing error recovery with bison and I'm getting this assertion here: /// Instantiate an empty \a T in here. template <typename T> T& build () { YYASSERT (!yytname_); YYASSERT (sizeof (T) <= S); yytname_ = typeid (T).name (); return *new (yyas_<T> ()) T; } when using this simple grammar. %token <char> CHAR "char" %token <int> NUM "number" %token SEMICOLON ";" %token END 0 "end of file" %% stms : stms CHAR ";" | CHAR ";" | error ";" {yyerrok;} ; %% I've used bison 3.0.2 and flex 2.5.37. I'm attaching all the code I used with this test. I was expecting two error messages, and in fact I get those messages when I remove the parse.assert definition. I used g++ *.cpp -o test to compile the code, after bison and flex. Cheers, Antonio _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 23 Jan 2014 04:30:53 PM UTC Name: assert_error.zip Size: 34kB By: None Example to reproduce the problem <http://savannah.gnu.org/support/download.php?file_id=30354> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/support/?108481> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison