[antlr-interest] findAllPartial() - Why is that?

Terence Parr parrt at jguru.com
Fri May 23 09:11:11 PDT 2003


On Friday, May 23, 2003, at 08:08  AM, rustydstone wrote:

> Hi,
>
> Consider the following expression: (a_1=true) || (a_2=true) || 
> (a_3=false)
>
> I'm using findAllPartial() to find all nodes in the expression above
> that match empty "=" node.
>
> The following is the result of the search:
>
> i = 0 ( = a_1 true ) ( = a_2 true )
> i = 1 ( = a_2 true )
> i = 2 ( = a_3 false )
>
>
> Why is the result for i = 0 is "( = a_1 true ) ( = a_2 true )" and not
> just "( = a_1 true )"?

That's a print out issue.  The node is (= a_1 true) but the sibling is 
also shown when you print with say toStringList().

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list