William, This is a complex question to answer, and it really depends on your needs. For example, creating a whole compiler from scratch is difficult, but possible. We have our own compiler (with an ANTLR front end), that integrates our own custom language, called HOP, which is basically a novice programming language we distribute to schools for the blind. Our implementation is on sourceforge and is under GPL2, so you are welcome to look at it (Search for "Sodbeans"). We also integrate our custom compiler into NetBeans.
On the other hand, if your needs allow it, you can also do things like have your antlr grammar generate java byte code or assembly directly, which is sometimes easier, again depending on what you need. And very simple interpreters for very simple languages aren't too tough, if you know what you are doing, and depending on your requirements. Hope that gives you some tips, at least. Short answer: Yes, it's definitely possible, but it depends on your goals, and it's typically not something you would bang out in a weekend. Andreas Stefik, Ph.D. Department of Computer Science Southern Illinois University Edwardsville On Fri, Apr 9, 2010 at 1:44 PM, William v Doorn <[email protected]> wrote: > Hello all, > > I've been reading the The definitive ANTLR book and I've made my own small > language using the AST strcuture. > > Now I was wondering, is it hard to make my own compiler/interpeter for this? > I can feed files and such to it, but how would I make my own > interpreter/compiler? > > Thanks, > > William van Doorn > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > 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.
