Sorry about giving the wrong impression. My point wasn't that you need to pile up a bunch of theory to do what you want to do. My point was just that parsing is 1/10th to 1/100th of the effort of building a compiler so all the focus on ANTLR, et al was over-emphasizing the wrong part. How you learn this stuff - by book, by experimentation, or (most likely) both - is a separate issue.
Syntax is the UI to your language. As such, it IS important. But it's still just UI - just like any program you need to give some thought to what the language does before you can put an interface on it. And unlike the complexities of, say, graphical user interfaces, language grammars are deliberately very simple things. It's not uncommon to start with a bonehead simple syntax, say something based on S expressions (think Lisp) while you explore semantic issues, code generation issues, etc. Once you have a solid base figured out it's actually pretty easy to reskin your language (at least it is if you've kept semantic and syntactic issues cleanly separated). Or, you might even decide that S expressions are perfect for your goals. By all means, start playing with parser generators if that's what interests you. Just remember there's plenty more depth to plumb. On Jan 11, 6:25 pm, Kram <[email protected]> wrote: > Thanks James, your are right, a lot of the conversations were on > parsing, and like you said, its been done. but thats a good thing in > my situation as I do not really know anything yet and parsing is a > great way to get started and familiar with different ideas and > concepts. > > Those books you mentioned I have added to my wish list on amazon and > will have a go at them in due time, thanks for the advice. > > RogerV, could you please explain a little more on the "lazy-man > approach" that you mentioned? > > Thanks all for the help so far, I also think i'll be joining that > google-group too! > > Cheers, > Mark > > On Jan 9, 1:03 am, James Iry <[email protected]> wrote: > > > I'm a little late to this conversation. > > > For some reason, all the responses have been about parsing. Parsing > > is the easiest problem related to languages - a zillion man hours of > > research have made it a "solved" problem. ANTLR, Rats, Scala's parser > > combinators, whatever. There are reasons to prefer one over the > > other, but in the end whichever route you go the mechanics are all > > pretty easy. > > > The part that does semantic analysis and optimization and code > > generation - that's the fun part. > > > Fortunately, there are plenty of great books on compilers. > > > This one is a classic, but IMHO goes too deep in some areas for a > > first compiler book while simultaneously ignoring many modern compiler > > techniques (at least in the older edition I own). Still, it's a > > classic for a > > reason:http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/03... > > > This one is in Java, but probably needs supplementary material if you > > want to move beyond the compiler he presents (again, at least in the > > edition I own). On the plus side it's a very easy read, especially as > > compared to the previous > > one:http://www.amazon.com/Modern-Compiler-Implementation-Andrew-Appel/dp/... > > > This one is also in Java and gets a lot of rave reviews, but I've > > never read > > it:http://www.amazon.com/Programming-Language-Processors-Java-Interprete... > > > If you're targeting the JVM, there's a google group devoted to > > discussing the design and implementation of languages for the > > JVM:http://groups.google.com/group/jvm-languages > > > Somebody else mentioned Lambda the Ultimate. It's a great resource, > > but we (I'm a contributing editor) generally don't discuss basic how- > > to kinds of issues. Be sure to search the site and read the FAQ > > before posting. > > > On Jan 8, 2:13 am, Kram <[email protected]> wrote: > > > > Thanks Jan for the advice, I will definitely go ahead and start on > > > that trail. > > > > I too appreciate the thinness of books, and also when they get strait > > > to the point and skip the bloating that can occur in many text > > > books... > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" 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/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
