[antlr-interest] #include on generated hpp files
    Jerry Dy 
    jerrydy at sbcglobal.net
       
    Thu Mar  4 17:40:58 PST 2004
    
    
  
My grammar file has a header that #include's the string header file. 
Now I wanted to defined my parser rule to return a std::string as 
such:
page returns [string output]:
But I get a compile error because the header is inserted in the 
generated cpp file. Is there an option to make the header show up in 
the parser's generated hpp file?
When I compile, I get the:
warning:lexical nondeterminism upon
k==1:'-'
k==2:'-'
between alt 1 and exit branch of block
What's the exit branch of a block? Here's the relevant grammar entry:
COMMENT_DATA: (
        {LA(2)!='-' && LA(3)!='>'}? '-' // allow '-' if not "-->"
        | NEWLINE
        | ~('-'|'\n'|'\r')
        )*
        ;
Thanks!
-Jerry
 
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