[antlr-interest] Learning ANTLR (was: Comments on ANTLR book)

Jonathan Thomas jonathan.thomas at ca.com
Sun Jul 8 18:05:04 PDT 2007


Hi Richard,
                By looking at the messages coming through, and comparing 
to what's available, I'd say the wish list is for:
a) Rewrite Rules, which then leads into:
b) AST Tree creation / parsing.

So, some broken down/well explained examples on these would be great, 
including what sorts of alternative end-uses you can put the above too.

Liviu, I also experienced the frustration beginning learning - because 
most of us newbies _language parsing itself_ is something we need to 
learn - something maybe we should go away and learn without ANTLR 
whatsover, then come back and apply our theory to ANTLR.  As you can 
see, it often requires thinking in ways different to normal, and just by 
playing around a little you have answered your own list questions - a 
process we all need to go through I believe to learn something new, and 
no amount of examples/tutorials is going to cover that gap.

Also, I don't know if this sounds a bit harsh, forgive me if it is, but 
it kind of seems as if you'd like to do cut & paste coding - something 
that I believe is bound to fail if you don't understand the underlying 
way the lexer/parser works - which is, as people have pointed out 
before, quite complex with ANTLR.

Currently, I have no frustrations whatsoever with learning language 
parsing/ANTLR - coz my project is on hold in that area ;-) hehe ... but 
just about to get back into it ...

BTW - examples - the examples in the download sample grammars aren't 
enough for you (again, they are only going to help if you have played 
with ANTLR enough to know what they are achieving) 
http://www.antlr.org/download/examples-v3.tar.gz ?

Cheers,
Jonathan.


Richard Clark said the following on 9/07/2007 10:01 AM:
> Liviu, I hear your frustrations -- it is hard for a novice to go all
> the way from getting started up to fluency. At the same time, the book
> is what it is (and is a very good reference once you know what to look
> for).
>
> We have the wiki, so let's talk about ways build good instruction
> there. There are some good starting points with step by step
> instructions, though I suspect there are *too many* places to get
> started. I wonder if a roadmap would help. I'm also wondering if
> people would contribute to a "wish list" to help prioritize new
> learning materials.
>
> Re: doing a complete grammar, I've always liked using a simple but
> complete application for introductory programming courses. (I design
> and deliver training for a living.) The trick is picking something
> that's familiar to a wide audience, sized appropriately, and whos
> structure matches most people's projects  -- COBOL is too obscure,
> Java is too big, and FORTH too dissimilar to the algol-like languages.
>
> SQL is also probably too big, though SQLLite might be reasonable. I
> need to give this more thought and welcome suggestions.
>
> ...Richard
>
> On 7/8/07, Liviu U <liviu.u at gmail.com> wrote:
>> When I have problems, I google for it, when dispair comes I post here 
>> ...
>> but i feel i don't have a complete example where i can look and even
>> "borrow" some patterns.
>>
>> And I feel this is exactly what is lacking to the ANTLR project: a 
>> very good
>> HELP that is targeted to the beginners, and that goes step by step.
>


More information about the antlr-interest mailing list