[resending to proper list]
On Jun 10, 2011, at 10:01 AM, Payam Fard wrote:

> Dear all,
> 
> I have a grammar for a fairly small and simple language that I have created 
> for our project. Once every command in this language is parsed through this 
> grammar, a Java object is returned. Everything is working fine.
> 
> Now, I have a requirement to read all the available rules/commands of the 
> language (I am only interested in the command/rule names). In order to do so, 
> I have been trying to get the AST tree working by adding options to my 
> grammar for AST tree. For some reason, when I add these options to my 
> grammar, I am getting compilation error complaining that my grammar rules 
> cannot return any Java objects! Can I have commands/rules of my grammar 
> return some Java objects and at the same time be able to build an AST tree 
> off of my grammar?
> 
> Is there an easy way to read these grammar command/rule names using antlr 
> runtime API's?
> 
> Any code sample out there that shows how do to the above (namely returning 
> objects from grammar rules and building the tree at the same time)?
> 
> Any help here would be greatly appreciate.
> _______________________________________________
> antlr-dev mailing list
> [email protected]
> http://www.antlr.org/mailman/listinfo/antlr-dev


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