[antlr-interest] Starting my first parser...

Mark Mandel mark.mandel at gmail.com
Fri Dec 22 17:29:24 PST 2006


Thanks for pointing me in the right direction.

>
> The HQL grammar uses an action to call a weakKeywords() method, defined
> in a Parser subclass, here, I think,
>
> http://anonsvn.jboss.org/repos/hibernate/trunk/Hibernate3/src/org/hibernate/hql/ast/HqlParser.java
>
> This appears to do the magic of transumting keywords into identifiers
> were allowed.  Also, the HQL lexer has
>
>   options { testLiterals=true; }
>
> in the definition of it's IDENT token,
>
>   http://anonsvn.jboss.org/repos/hibernate/trunk/Hibernate3/grammar/hql.g
>
>
> > I've also just downloaded and started looking at AntrWorks 1.08b,
> > which is amazing, but haven't really started delving into it yet, but
> > I will start playing with it shortly.
>
> NB. AltlrWorks is for ANTLR v3, while the above examples are for v2.

Duly noted, but just to make life more complicated for myself, figured
I'd move onto Antlr3.. just looking at the example grammer files, I
think I find it a little more intuitive.

Also being able to see the diagram for lexers and parsers makes the
learning process *a lot* easier.

Thanks for your help.

Mark

-- 
E: mark.mandel at gmail.com
W: www.compoundtheory.com


More information about the antlr-interest mailing list