On 2010-05-27 11:57, Panciz wrote:
> It's trivial in simple grammars like 
> 
> NonTerm1 <-- NonTerm3 / NonTerm2  
> NonTerm2 <-- NonTerm3 "sym" 

In this case, the "/ NonTerm2" alternative in NonTerm1 is 
useless.  If NonTerm3 "sym" would match, then NonTerm3 will 
match, and so the second branch of the ordered choice in 
NonTerm1 will never be tried in any case in which it could 
succeed, right?

> In order to compare NonTerm3 with NonTerm2 I need to check for their 
> definition
> and then recursevly check in their definition until I found 
> out if NonTerm2 prevents or not the choice NonTerm3.

This sounds to me like something other than PEG ordered 
choice, (and undecidable) but maybe I'm not understanding 
what it is you are after.


-- 
Michaeljohn Clement
http://inimino.org/~inimino/blog/ 

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to