helpbison - Support: sr #108481, Assertion `!yytname_' failed.


sr #108481: Assertion `!yytname_' failed.

Submitted by:  None
Submitted on:  Thu 23 Jan 2014 04:30:53 PM UTC  
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu 23 Jan 2014 04:30:53 PM UTC, original submission:

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>
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.




(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #30354: added by None (34kB - application/octet-stream - Example to reproduce the problem)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Jan 2014 04:30:53 PM UTCNoneAttached File-=>Added, #30354

    Back to the top

    Powered by Savane 3.1-cleanup