Hi gang.  We have a problem in terms of wildcards. bug:

http://www.antlr.org:8888/browse/ANTLR-248

says it all:

wildcard is single node in tree grammar analysis but node or tree at  
runtime

We need both single node wildcard and tree wildcard. DFA analysis sees  
'.' as a single node.

If you say ^('+' . .), that expects two single nodes as children at  
analysis time. The problem is that at runtime we want wildcard to  
match a subtree as well. We need to tell the analysis specifically  
which one we mean. I can see a situation where you want to match  
literally a single node versus a subtree. I don't want to flip  
wildcard mean subtree.

I proposed a syntax to mean wildcard subtree: ^. instead of simple .  
or, perhaps ^(.) as special syntax, which might be a bit more explicit  
right? The new syntax would force the analysis to see ". DOWN .+ UP".   
Ack, the way to do this is actually to make the grammar create the  
appropriate NFA rather than tweaking the analysis.

Anyway, those in favor of ^(.) and . to mean wild-card tree (must be a  
tree) and wildcard (single node)?  those opposed?

I need to fix this for the new book examples. I'm doing this really  
cool filter mode for trees where you can say "for any addition you  
find in the tree, do this".

Ter

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/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 il-antlr-interest@googlegroups.com
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