[antlr-interest] Assertion failure

togol machillan togolmach2 at lycos.com
Wed Mar 23 11:30:42 PST 2005


Hi,

I get the following error messages at run time due to assertion failure. 

  col == 1
Assertion failed: nb <= entries(), file c:\antlr-2.7.5\lib\cpp\antlr\circularqueue.hpp, line 59

Here col is a global integer variable which has the column number of the keyword after that rule is called. The rule which generates this message looks like

paragraph: keyword {col == 1} ...
         ; 

keyword: t:"TITLE" {col = t->getColumn();}
         |in:"IN-UNITS" {col = t->getColumn();} 
         |data:"DATABANKS" {col = t->getColumn();}
        ;


The difficulty is that the assertion fails even when the keyword like TITLE occurs in column 1. Can somebody please explain how to avoid this assertion failure. 
Secondly, is there a better way of getting the column number in the keyword rule without defining a label for every alternative literal.

Thank you all for your helpful suggestions to my previous queries.

Togol  

-- 
_______________________________________________
NEW! Lycos Dating Search. The only place to search multiple dating sites at once.
http://datingsearch.lycos.com



More information about the antlr-interest mailing list