[antlr-interest] C++ Parser

geofuntasma wardf at sympatico.ca
Thu Jun 3 08:56:49 PDT 2004


I'm having problems with the C++ grammar available on the ANTLR site.
When I compile the CPP_Parser.g file, I got this message: 

----------------------------------------------------------------------
[@bash][~/ANTLR/C++ Grammar]> java antlr.Tool CPP_parser.g
ANTLR Parser Generator   Version 2.7.3   1989-2004 jGuru.com
CPP_parser.g:1222: warning:nondeterminism upon
CPP_parser.g:1222:     k==1:COMMA
CPP_parser.g:1222:    
k==2:"typedef","enum",ID,"extern","inline","_inlin
e","__inline","virtual","explicit","friend","_stdc
all","__stdcall","auto","register","static","mutab
le","const","const_cast","volatile","char","wchar_
t","bool","short","int","_int64","__int64","long",
"signed","unsigned","float","double","void","_decl
spec","__declspec",LPAREN,"struct","union","class",SCOPE
CPP_parser.g:1222:     between alt 1 and exit branch of block
----------------------------------------------------------------------

However, the CPPParser and CPPLexer are created (.cpp and .hpp). So, I
tried to compile the CPPParser doing "gcc CPPParser.cpp" but I got
several errors including the "CPPParser.hpp:4xx: ..." statement in
them. I tried to find out if the grammar supports some ANTLR versions
only but I didnt find any information about that.

am I doing something wrong? do I need something else to do? Are there
others C++ grammars available?

Thanks in advance for your help. 

Ward.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list