dcsimg
assert when I do a semantic_throw
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anton_Tagunov
Posted On:   Saturday, April 9, 2005 10:16 PM

Hi, I use ANTLR 2.7.5 for creatting compiler. I wrote the following parser: options { language="Cpp"; } class WatcherParser extends Parser; expression : c:CONSTANT { if(IsNotGood()) { // LT(1); throw ANTLR_USE_NAMESPACE(antlr)SemanticException("error", getFilename(), 1, 1); } } ; class WatcherLexer extends Lexer; CONSTANT: ('a'..'z')+; When IsNotGood returns true, the follwing error message is printed: Assertion failed: nb <= entries(), file u:/mnt/antlr-2.7.5/lib/cppantlr/CircularQueue.hpp, line 59    More>>

Hi,



I use ANTLR 2.7.5 for creatting compiler. I wrote the following parser:


			
options
{
language="Cpp";
}

class WatcherParser extends Parser;
expression
: c:CONSTANT
{
if(IsNotGood())
{
// LT(1);
throw ANTLR_USE_NAMESPACE(antlr)SemanticException("error", getFilename(), 1, 1);
}
}
;

class WatcherLexer extends Lexer;

CONSTANT: ('a'..'z')+;


When IsNotGood returns true, the follwing error message is printed:



Assertion failed: nb <= entries(), file u:/mnt/antlr-2.7.5/lib/cppantlr/CircularQueue.hpp, line 59


But there are no any messages if I remove the comment of line "LT(1)". Is this bug?

   <<Less
About | Sitemap | Contact