[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #108481] Assertion `!yytname_' failed.
From: |
anonymous |
Subject: |
[sr #108481] Assertion `!yytname_' failed. |
Date: |
Thu, 23 Jan 2014 16:30:55 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36 |
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: address@hidden
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/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [sr #108481] Assertion `!yytname_' failed.,
anonymous <=