Thanks RogerV, thats good advice, I actually took a similar approach to learning programming in general, just dove in with some tutorials, and then googled the bits i didn't know, eventually reading books and learning the finer points of Java.
Your advice is greatly appreciated On Jan 12, 9:06 pm, RogerV <[email protected]> wrote: > > 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 [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 -~----------~----~----~----~------~----~------~--~---
