Hi Terrence, does that approach require extensions to ANTLR or ST? Are you defining the object traversal in a declarative grammar instead of plain procedural code? Can you specify predicates like "only process methods that have a certain Java annotation applied"?
Could you just leak a bit more? :-) When is your book up for grabs? Mike Terence Parr schrieb: Hi Mike, I've currently got a nice example in my upcoming language design patterns book where I build a poor man's object relational database model using reflection. The basic idea is that you iterate over the list of methods in a class or whatever and build up the output (using templates optimally). Ter On Dec 3, 2008, at 3:14 PM, Mike Pagel wrote: > Hi there, > > first of all: I am pretty new to ANTLR and to this mailing list. I did > search the archive for information but could not find anything > addressing my question. If it's in there, just send the link, > please... > > Now: > > I am coming from a modeling (UML-like, graphical DSLs) background, > where > you typically design the abstract syntax of a language in form of a > meta-model consisting of meta-classes, their attributes and relations > among each other. I have used a number of code generators before but I > am wondering whether ANTLR can also generate code from models > (=meta-model instances). By this I mean by using grammars similar to > how > ASTs are walked in a tree grammar. > > Does something like this already exist? That way you could also > generate > code from business objects (POJOs) through reflection... > > Any input and direction is welcome. If this is something not > done/possible so far I might try and explore this route a bit. > > Thanks a lot, > Mike > > > 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 il-antlr-interest@googlegroups.com 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:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address