On Thu, 2008-11-13 at 17:51 -0600, Vishwanath Hawargi wrote:
> Hello,
> I am newbie to ANTLR and I am trying to implement a parser.
> I wrote a grammar file and the grammar check is fine and i can
> successfully generate either java /  c code.
> 
> My grammar file has only list of Literals and Parser rules. and to
> generate the C code, i have put
>                        options { language = Cpp;}
> 
> other than these, there are no  more sections.
> 
> I am not able to use the generated files now. Couldnt get any  sample
> code to use the lexer.c and parser. files.
> What do i have to write in the main() ? Can i write one independantly
> without writing the @init part in the grammar?
> Kindly throw some light on this... treat me as a layman and show me
> the steps please!
> 
> Also, I am not able to locate C++ include files in the ANTLR site,
> could someone help me locate them?
>  (trying to change the 'language' to cpp, gives a cpp.stg file error.)
> 
> Eventually i want c++ code generated..
> please help

Assumign you ar suign ANTLR 3, then use language=C; but compile the
generated files as C++. I am working on C++ target reasonably actively
now in the hope to complete it before the end of the year.

Jim

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


List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/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