For your second and third question, solution is to use 'composite grammar'.
You'll be able to extend the existing grammar file. You can also form a
grammar by combining multiple .g files. One file might contain the lexer and
the parser itself could be spread across multiple grammar files. There is an
example in the examples folder.

 

For C++ target, I guess people use the C target which as you say generates
C++ compatible code. I'm not very sure about this one. Just saw it in one of
the list conversations.

 

Cheers, Indhu

 

From: [email protected]
[mailto:[email protected]] On Behalf Of ajit vilasrao shinde
Sent: Wednesday, June 03, 2009 2:10 PM
To: antlr-interest
Subject: [antlr-interest] Grammer file queries...

 

Hello Everyone
1. I am new to ANLTR and I have tried out some example available on site. I
have some questions regarding grammer file.
2. Is there any way to extend the existing grammer file?
3. Is there any way to combine multiple grammer files while lexer/parser
code generation. 

Is it possible to generate Lexer/Parser for C++ language. 
I think as of now ANTLR support generation for C language which is C++
compatible.



Ajit V. Shinde

        

 


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to