[antlr-interest] Re: Tree parser question
edcjones
edcjones at yahoo.com
Fri May 14 16:20:10 PDT 2004
--- In antlr-interest at yahoogroups.com, "lgcraymer" <lgc at m...> wrote:
> --- In antlr-interest at yahoogroups.com, "edcjones" <edcjones at y...> wrote:
> > In the ANTLR docs it says:
> >
> > For example, #( A B ) will report a match for any larger tree with the
> > same structure such as #( A #(B C) D).
>
> That is, match A as root and B as first child. ANTLR does not check
> if A or B have siblings or not, nor if B has a child.
>
> >
> > Will #( A B ) report a match for #(A D #(B C))?
>
> No.
>
So B must be the first child.
What is the difference between these two rules? What will the rules match?
structSpecifier
: #( a:"struct" structOrUnionBody )
;
structSpecifier
: "struct" structOrUnionBody
;
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list