I sounded rude! You are all legends, I just didn't want to delve into the C/Java bytecode yet, just in order to learn the basic syntax. It's the basic syntax is all I need right now, hence my request for an example translator of "hi" -> "hello", and I can't find it "bunched together" as such.
Many thanks, N 2009/10/26 Naveen Chawla <naveen.c...@googlemail.com> > Sorry if I sound rushed, I'm doing so many other things as well. > > Regards, N > > 2009/10/26 Naveen Chawla <naveen.c...@googlemail.com> > > I can't open the "tpantlr-code" file in that archive, for some reason. Can >> somebody give me, for example "a: 'hello'; ", just that single symbol >> grammar, then making an AST from it, then a Tree grammar, and using >> StringTemplate to output "hi" from it. I can't find such a simple example >> anywhere. i.e. "hi" -> "hello". Surely someone who has used the >> features many times would take just a few seconds even from memory. >> >> 2009/10/24 Indhu Bharathi <indh...@s7software.com> >> >> Section 9.6 of ANTLR definitive reference (Building a Java Bytecode >>> Generator Using a Tree Grammar and Templates) does this. >>> >>> >>> >>> The free code samples are available at >>> http://media.pragprog.com/titles/tpantlr/code/tpantlr-code.tgz >>> >>> >>> >>> Samples for this specific section is available at >>> ‘Code/templates/generator’ inside the archive. >>> >>> >>> >>> The book has a very good explanation too. >>> >>> >>> >>> Cheers, Indhu >>> >>> >>> >>> >>> >>> *From:* antlr-interest-boun...@antlr.org [mailto: >>> antlr-interest-boun...@antlr.org] *On Behalf Of *Naveen Chawla >>> *Sent:* Saturday, October 24, 2009 9:11 AM >>> *To:* Terence Parr >>> *Cc:* ANTLR Interest Mailing List >>> *Subject:* Re: [antlr-interest] Can somebody give me the very simplest >>> example of grammar to AST to StringTemplate output >>> >>> >>> >>> No, where? >>> Many thanks, N >>> >>> 2009/10/23 Terence Parr <pa...@cs.usfca.edu> >>> >>> have you looked at the (free) code for both books? >>> Ter >>> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com 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