Let me say that I really like ANTLR and have been using both books
extensively. Thus I hope this is taken as constructive criticism.
I think what Ray is saying is what I've been running into. I'm teaching
the Compiler's class (for the first time) and using the ANTLR reference
book. It has been a bit of a struggle to get things in an order that I
think they can easily assimilate. I want to focus on the higher-level
issues and less on the details of the underlying programming, until it
has to be addressed. For example, the progression so far has been :
lexer/parser for a simple language, output an AST for that simple
language, now interpret (AST->Java Tree Walker) with global scope, no
functions. Next I hope is language with scope, then probably translation
to (probably) Java bytecode using templates. Each project adds a little
more of the language, so we have something at the end. I'm working with
Logo at the moment, with some Java/Swing for the turtle.
What I've found is that I need something in-between the two books. The
reference book has most of the stuff I need, but a bit spread around and
with what seems like a lot of detail in between. The LIP has far too
much detail in many ways, which makes getting the point across difficult.
As with Ray, I would prefer a better progression like the LIP book, but
at a level above the Java details that come up. One can go quite a ways
without having to write a lot of Java, and then it can be introduced
slowly. They didn't really have to write much Java till the interpreter,
and even then I took the Pie example and stripped out most of the scope
stuff (took out functions, error checking) to get down to a basic
skeleton. I think a lot of that material could have been discussed
(Symbol, Scope, resolve, etc.) at a higher level and then shown
implemented in Java. I think a lot of the details get caught up in the
language and it really shouldn't have to.
If done as described, I suppose it would be easier to get other targets
in, though I think if the concepts are clear and one implementation is
provided, others would be easily done (perhaps as appendicies).
Anyway, it has been something I've been thinking about.
>>>bill<<<
On 2/15/11 8:40 PM, Terence Parr wrote:
> Hi Ray,
>
> Yeah, the language implementation patterns book is much more amenable to a
> class I would say. the reference guide is more of an accompanying text. do
> think that is working out for you this semester would be examples in the LIP
> book?
>
> I'm actually teaching a programming language is classed myself this
> semester. I have been doing six projects that take anywhere from 3 to 10
> hours depending on their abilities. This gives them the skills necessary to
> tackle the Smalltalk compiler and interpreter starting next month. yikes. I
> hope it does anyway ;)
>
> Ter
> On Feb 15, 2011, at 5:01 PM, Raymond J. Schneider wrote:
>
>> An orderly sequence of structured examples of increasing difficulty
>> illustrating the concepts covering all the bases would be nice. This is
>> especially true as one enters the realm of trees and then string rewriting.
>> I used the book for a class on writing language parsers and we had a good
>> deal of difficulty after the first part. We're currently using the Language
>> Implementation Patterns book with a bit more success so far because of the
>> orderly presentation that the use of patterns is providing.
>>
>> Regards, Ray
>> --
>> Ray Schneider,PE, Ph.D
>> Associate Professor
>> Math and Computer Science
>> Bridgewater College
>> http://www.bridgewater.edu/~rschneid/
>> http://theweedlessgarden.blogspot.com
>> ________________________________________
>> From: [email protected] [[email protected]] On
>> Behalf Of Terence Parr [[email protected]]
>> Sent: Tuesday, February 15, 2011 18:36
>> To: antlr-interest Interest
>> Subject: [antlr-interest] what would ANTLR ref guide revised edition have?
>>
>> Howdy. I'm thinking about revising the ref guide for ANTLR 3 (ANTLR v4 might
>> be awhile so I should update book). Any suggestions to improve? One
>> obvious thing: discuss not just java target :)
>>
>> Ter
>>
>> 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
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.