[antlr-interest] Difference in tree parsers
serafettin_sentuerk at intergral.com
Wed Aug 24 01:17:51 PDT 2005
First, thanks for your instructions for sample tree parsers.
I had a look at the "treewalk/treewalk.g" where the LCURLY is used as the
root of the AST. In the "imagNodeAST/treewalk.g" file it uses the imaginary
BLOCK token as the root. What is the difference between these taking
different kinds of roots, one is normal root with "^" and one is imaginary
token. Are they really different from each other?
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org]On Behalf Of Chris Black
Sent: 12 May 2005 15:23
To: Serafettin Senturk
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Tree parser samples
Serafettin Senturk wrote:
> I read almost all the documentations about tree parsers and reference
>manual of Antlr for tree parsers. Now I want to use it practically. For
>reason, can anybody send a couple of sample files that contain tree
>parser(walker) grammar. In the documents i cannot find that much practical
>usage of tree walkers.
> Thanks in advance
In addition to the manual, there are fully working examples in an
examples directory if you download the full source tarball of antlr.
examples/java/treewalk/treewalk.g, transform and imagNodeAST might be
good starting points.
More information about the antlr-interest