[antlr-interest] revised subject: tree matcher problem with validating semantic predicate

Tom Smith yotommy at gmail.com
Thu Aug 6 03:08:18 PDT 2009


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<yotommy at gmail.com> wrote:
> On Thu, Aug 6, 2009 at 5:51 AM, Gavin Lambert<antlr at 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.
>


More information about the antlr-interest mailing list