Am Sun, 6 Sep 2009 09:40:44 +0200 schrieb Andreas Volz:

> Then I installed ANTLR-3.0.1 (Ubuntu) from repository and the C
> runtime from ANTLR-3.0.1 from source. This should fit together.

After get it working with a C compiler I tried a C++ compiler, but
failed:

In file included from /usr/include/antlr3tokenstream.h:14,
                 from /usr/include/antlr3baserecognizer.h:11,
                 from /usr/include/antlr3cyclicdfa.h:9,
                 from /usr/include/antlr3.h:11,
                 from VCardLexer.h:47,
                 from VCard.h:21,
                 from VCard.c:14:
/usr/include/antlr3bitset.h:51: error: expected unqualified-id before
'||' token /usr/include/antlr3bitset.h:51: error: expected `)' before
'||' token /usr/include/antlr3bitset.h:51: error: expected ';' before
'||' token VCard.c: In function 'int main(int, char**)':
VCard.c:94: warning: unused variable 'nodes'
make: *** [VCard.o] Error 1

I tried:

#ifdef __cplusplus
extern "C"
{
#endif

#include "VCard.h"

#ifdef __cplusplus
}
#endif

without success. Then I found this:

http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets

"C target as of release 3.1 is C++ compatible, compile .c files as C+.
C+ classes will be provided as a separate library later in 2008. "

Could the error message be a problem that 3.0.1 is not yet C++
compatible?

BTW: What is the current status of the C++ target/facade?

regards
        Andreas

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to