[antlr-interest] About tree duplication ?
Bryan Ewbank
ewbank at gmail.com
Fri Nov 18 08:25:32 PST 2005
No dumb questions, just different experiences...
On 11/18/05, Mathieu Clabaut <mathieu.clabaut at gmail.com> wrote:
> .
> > A production like this will generate an exactly duplicate of a
> > tree....
> >
> > // duplicate tree rooted at current node
> > duptree: #( . ( duptree )* );
>
> What does the dot stand for ?
"." means "match anything here", so #( . (duptree)* ) means
-- match any node (the ".") as the root of the tree (first token in a
"#( )" list).
-- match zero or more children (the "*") with the rule "duptree"
More information about the antlr-interest
mailing list