[antlr-interest] How to override the default reportError of Parser
macromliu <macromliu at yahoo.com.cn>
macromliu at yahoo.com.cn
Wed Jan 1 01:26:54 PST 2003
Enviroment:
VC++ 6.0 Enterprise(SP5) Win2k SP3(en) JDK 1.3 ANTLR2.7.2RC1
when i tried to override the reportError of the Parser like this:
//--------------------------------------
header{
#include <afxcoll.h> //CPtrList
#include <iostream>
#include "antlr/RecognitionException.hpp"
}
options{
language="Cpp";
}
class GMSPassParser extends Parser;
options {
exportVocab=GMSPass;
k = 1;
}
{
void reportError(RecognitionException &ex )
{
AfxMessageBox(ex.toString().c_str() );
}
}
.........
..........
//---------------------------
i got the following compile error:
error C2061: syntax error : identifier 'RecognitionException'
how to get ride of this compile error???
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list