Trailing context is getting confused with trailing optional patterns
To: Adoram Rogel <firstname.lastname@example.org>
Subject: Re: Flex 2.5.4 BOF ???
In-reply-to: Your message of Tue, 26 Nov 1996 16:10:41 PST.
Date: Wed, 27 Nov 1996 10:56:25 PST
From: Vern Paxson <vern>
> This matched "Organizations" (looking in debug mode, the trailing s
> was matched with trailing context instead of the optional (s) in the
> end of the word.
That should only happen with lex. Flex can properly match this pattern.
(That might be what you're saying, I'm just not sure.)
> Is there a way to avoid this dangerous trailing context problem ?
Unfortunately, there's no easy way. On the other hand, I don't see why
it should be a problem. Lex's matching is clearly wrong, and I'd hope
that usually the intent remains the same as expressed with the pattern,
so flex's matching will be correct.