> RogerV, could you please explain a little more on the "lazy-man approach" > that you mentioned?
There's two basic approaches: 1) Read books on the well-honed theory of how to do various things (lexically and grammatically parse a language, devise a type system, emit code, optimize, etc.), and then go undertake a project. or 2) Just grab one of the excellent high-level tools and start whacking away at a small example, i.e., just dive in with both feet and start learning by doing as you go along. Refer to the books as you need to solve more sophisticated undertakings. (The ANLTR book I keep referencing has a great beginning section to get you waist deep in parser writing in exactly this manner.) Now with the latter approach, you may have proceeded in a non-ideal manner as you went along - but just chalk it up to learning experience. Be prepared to toss your initial learning project and then start again with something that you have in mind that is a bit more serious - a real, useful tool of some sort. This time around you'll apply some better approach and technique. As to compiler code generation - you could employ roughly the same tactic by using the javac compiler to generate code for some language construct that is similar to one you're trying to handle in your own compiler. Just mimic the output that you dump from the class file. You could immediately begin to tackle that aspect of your own compiler - without having cracked a book on the subject. But once you get your hands dirty with some experience, then go drag out the books and let them enlighten you further on what you've already become engaged in. The problem with absorbing the theory all up front is that it doesn't sink in all that well. It sinks in better when you can relate it to working experience. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---