[antlr-interest] Understanding priorities in lexing (newbie)
Kay Roepke
kroepke at classdump.org
Fri Jul 13 02:48:14 PDT 2007
On Jul 13, 2007, at 10:21 AM, Gavin Lambert wrote:
> (I kinda prefer V2's style a little in that regard, since it made
> it more explicit that they were separate by not permitting combined
> grammars, thereby removing some of the potential for confusion.
> But once I figured out the whole first-letter-uppercase bit I was
> happy with the V3 style too. Though I tend to avoid using
> character literals in the parser because I prefer getting nice
> token names ;))
:)
ANTLRWorks really helps keeping the confusion to a minimum (or for
that matter any kind of syntax highlighting is step in the right
direction).
Once we have the ANTLR grammar ported to v3 I'll start working on an
editor, too. ANTLRWorks is cool, I love it, but I really really do
not like Java desktop apps, esp. on the Mac.
I think combined grammars are a really big improvement for
readability and development speed. Having said that, I can imagine it
to be helpful to have a different "view" onto a combined grammar,
which could show you the lexer and parser parts separately. That
might help to get a better view of what really happens behind the
scenes :)
Just a thought,
-k
--
Kay Röpke
http://classdump.org/
More information about the antlr-interest
mailing list