When a semantic predicate fails to validate when matching in filter mode, it assumes that the rule is not viable, rewind, and tries the next alternative. Ter On Aug 6, 2009, at 3:08 AM, Tom Smith wrote:
> Five more minutes' thought, and I'm no longer sure. =;^) > > There are other kinds of semantic predicates that can be used for > disabling alternatives. Is it really by design that a validating > semantic predicate does not validate when filter=true? > > On Thu, Aug 6, 2009 at 5:59 AM, Tom Smith<yoto...@gmail.com> wrote: >> On Thu, Aug 6, 2009 at 5:51 AM, Gavin Lambert<an...@mirality.co.nz> >> wrote: >>> I've never really played with filter=true in tree grammars, but >>> when used in >>> lexers the whole point is to only define the rules you care about >>> and >>> anything that doesn't successfully match a rule is ignored. >>> >>> Thus if the predicate fails, it's not an error -- it's simply not >>> a match >>> for that rule, and the parser will go try another alternative, or >>> give up >>> and skip it. >>> >>> So I'm not surprised that the exception isn't being produced. >>> >> >> Gavin: >> >> Presented this way, your reasoning makes sense to me. Thanks for >> taking the time to respond. >> >> Tom. >> > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address 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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---