[antlr-interest] Grammer file queries...

Indhu Bharathi indhu.b at s7software.com
Wed Jun 3 01:50:32 PDT 2009


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: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] 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

	

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090603/c31d06e2/attachment.html 


More information about the antlr-interest mailing list