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... On Jan 8, 8:41 pm, "Jan Goyvaerts" <[email protected]> wrote: > On Wed, Jan 7, 2009 at 10:48 PM, Kram <[email protected]> wrote: > > > Well I guess thats really the million dollar question, "what am I > > looking to learn out of all this?". I guess Im sort of a bit lost when > > it comes to even that question, perhaps you could help me out there. > > > What I really constantly finding myself interested in is languages as > > a whole, not just the bytecode, or the compilation, but rather the > > entire language platform itself. It interests me to know just how > > people go about writing the languages that developers all over the > > world use. > > Have a try with Antlr-like stuff then - The book I mentioned is well > written, has a kind of theoretical language approach of the thing and last > but not least: it's a thin book. Something I particularly appreciate about > books. :-) > > If you managed to read the book without getting bored, I guess grammars of > programming languages is what you like. > > If I'm not mistaken the Eclipse plugin of Antlr is quite nice also. > > > The most interesting Java Posse podcast that I have heard so far, > > (starting from around mid-late 2007) was the JVM lanugages summit > > episode where they talked a lot about different bytecode proposals, > > tail recursion, etc... so that gives me some indication that languages > > are where I want to focus some of my learning at this point in my > > life. So I said to myself that I want to write my own language on the > > JVM. But had no idea where to start, and hence this discussion... :) > > > Mark, thanks for the link, Ill be sure to give that a read, looks like > > a very comprehensive article. > > > On Jan 8, 3:32 am, Jan Goyvaerts <[email protected]> wrote: > > > Well, it all depends of what you want to learn about of course: the > > > JVM bytecode or the creation of a DSL. In the former case it might be > > > a bit of an overkill to start learning about language parser > > > frameworks. If you keep your syntax simple and straightforward you can > > > quickly write your own basic parser and concentrate on the bytecode > > > generation. > > > > On Jan 7, 12:25 pm, Kram <[email protected]> wrote: > > > > > Thanks all very much, strangely, I was for some reason expecting a > > > > whole heap of posts from people saying things like: > > > > > "You must create your own c++ compiler that does A, B and C" (is javac > > > > written in c++?) > > > > > But I guess not... thanks for the links so far! I really appreciate > > > > the help. > > > > > Mark > > > > > On Jan 7, 8:08 pm, "Jan Goyvaerts" <[email protected]> wrote: > > > > > > Personally I don't know about Rats - but I would also advise to go > > for the > > > > > language parser approach. A structured approach towards implementing > > a DSL. > > > > > I certainly recommend the Antlr book of Pragmatic Programmers ( > >http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference). > > > > > > You could be the first to create a DSL with a feature we all use but > > is > > > > > provided by no language so far: Say "Hello World". ;-) > > > > > > On Wed, Jan 7, 2009 at 9:21 AM, Reinier Zwitserloot < > > [email protected]>wrote: > > > > > > > Personally i advise using rats instead of ANTLR, but, ymmv. > > > > > > > On Jan 7, 3:16 am, RogerV <[email protected]> wrote: > > > > > > > I've been using ANTLR for my "little" language, SFig: > > > > > > > >http://code.google.com/p/sfig/ > > > > > > > > I've used flex/bison (GUN lex and yacc clones) in the past to > > roll a > > > > > > > XSLT parser and have very much liked working with ANTLR as a > > contrast. > > > > > > > > ANTLR by default is geared toward creating language parsers that > > > > > > > target the Java JVM, however, it can also target C/C++, C# .NET, > > > > > > > ActionScript3. (This turns out to be quite advantageous to my > > > > > > > particular language project.) > > > > > > > > I like that lexical definitions are rolled into the same source > > file > > > > > > > as the grammar. > > > > > > > > I like the ANTLR concept of optionally being able to devise a > > tree > > > > > > > grammar to process AST. I structured SFig in this manner. > > > > > > > > The first pass creates tree structure AST, and then a second pass > > can > > > > > > > be made over the AST to do actions. In ANTLR you actually encode > > a > > > > > > > tree grammar that looks very similar to the language grammar. > > > > > > > > For ultra simple languages with very minimalist purposes, doing a > > tree > > > > > > > grammar might be overkill, but it's a handy way to structure > > things > > > > > > > when you get to have a bit more complexity going on. > > > > > > > > Also, if you buy the ANTLR book, it has a section on doing byte > > code > > > > > > > enhancement, which is way to get introduced to messing with Java > > byte > > > > > > > code. > > > > > > > > Messing with ANTLR is bound to give inspiration for doing some > > > > > > > actually practical language tools - in addition to being a good > > > > > > > environment to learn language parsing with. > > > > > > > > --Roger > > > > > > > > On Jan 6, 3:43 am, Kram <[email protected]> wrote: > > > > > > > > > For a while now, I've been wanting to get my hands dirty on > > Java and > > > > > > > > the JVM, by this is mean getting to know bytecode, and how > > compilers > > > > > > > > work, JIT, the JVM in general, etc... > > > > > > > > > So the best thing I figure to do is to write my own, very > > basic, > > > > > > > > language for the JVM. Even if it provides no real benefit to > > anyone, I > > > > > > > > would really like to give this a try. > > > > > > > > > Languages really interest me and any help on this topic would > > be > > > > > > > > greatly appreciated. > > > > > > > > > Thanks a lot, > > > > > > > > Mark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
