[antlr-interest] ANTLR itself written using treewalkers?
Loring Craymer
lgcraymer at yahoo.com
Fri Nov 3 10:18:08 PST 2006
--- Andy Tripp <antlr at jazillian.com> wrote:
> Trying to grok the overall structure of ANTLR
> itself...my first question...
>
> ANTLR2 itself doesn't seem to use a treewalker. Why
> not?
Ter was in the midst of starting a company and did the
high-level design and some of the new feature
implementation for ANTLR 2; John Lilley did much of
the grunt work to translate antlr (parser generator)
and sorcerer (tree walker generator; late addition to
PCCTS) code from PCCTS to ANTLR 2.0. There is a
heterogeneous tree internal to ANTLR 2 which is
converted to a graph, but that was done manually
rather than with a tree walker as a direct
transliteration of antlr internals. [In other
words,the lack of tree walkers is not by design but by
an accident of historical necessity.]
ANTLR 3 uses tree walkers, although the 3.0 tree
grammars have some defects. Rewriting ANTLR 3 in
ANTLR will help.
>
> And is there any sort of description of the internal
> design of ANTLR
> itself,
> or do I need to just start at Tool.java and drill
> down?
"Abandon hope all ye who enter here." The internals
of ANTLR 2 are _messy_!
--Loring
>
> Andy
>
>
____________________________________________________________________________________
Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates
(http://voice.yahoo.com)
More information about the antlr-interest
mailing list