[antlr-interest] Re: C++ parser

Ric Klaren klaren at cs.utwente.nl
Thu Jun 3 09:13:15 PDT 2004


On Thu, Jun 03, 2004 at 03:33:15PM -0000, geofuntasma wrote:
> I'm having the same problem. The message I got exactly at the
> beginning is: 
> 
> -------------------------------------------------------------------
> [@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","_inline","__inline","virtual","explicit","friend","_stdcall","__stdcall","auto","register","static","mutable","const","const_cast","volatile","char","wchar_t","bool","short","int","_int64","__int64","long","signed","unsigned","float","double","void","_declspec","__declspec",LPAREN,"struct","union","class",SCOPE
> CPP_parser.g:1222:     between alt 1 and exit branch of block
> -------------------------------------------------------------------

That one could be harmless. I noticed a comment on the offending line that
David was unable to shut off the warning.

> However there is no specification for what ANTLR versions supports. 

I managed to get it running with minor editing on 2.7.4. 

> So I really dont know the source of the problem. I wanna add that the
> CPPParser and CPPLexer files (.cpp and .hpp) are created. But, when I
> tried to do: "gcc CPPParser.cpp", I got all the errors having an
> "include CPPParser.hpp" statement in them.

What errors? Note also that you probably have to pass the path to the antlr
include files to gcc (unless these are installed in
/usr/include/antlr/*.hpp assuming unix)

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
  There are 10 kinds of people - those that understand binary and
  those that don't. --- Unknown



 
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