At 10:44 10/12/2009, Michael Matera wrote:
 >It seems that the '.' operator has become more greedy in
 >the 3.2 release.

I haven't tried 3.2 myself yet, but from what I recall of prior 
discussion on the list:
  - in 3.0 and 3.1 the . operator was "match a single token" and 
did not consume an entire subtree.
  - in 3.2, the . operator is supposed to be "match a single token 
or subtree".

So 3.2's . should be the equivalent of 3.0 or 3.1's "(. | ^(. 
.+))".  (Whether that's actually the case or not, I don't know.)


ie. given a rule:
   rule : ^(ROOT a=. b=. c=.) ;

under 3.0/3.1 people were reporting:
   input = ^(ROOT ID ^(BLOCK ONE TWO) THREE)
   a = ID
   b = BLOCK
   c = DOWN
(I think.  c might have been ONE or THREE instead [I don't 
remember], but b wasn't the whole subtree.)

Under 3.2 it's supposed to do what you'd expect.  (Again, whether 
it does or not...)


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--

You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.


Reply via email to