
14 Oct
2009
14 Oct
'09
10:09 a.m.
My fix would be to parse as many letters as possible "many1 alpha" (that's longest match) and then check the result with "isPrefixOf" for all your alternatives (and return the alternative that matches first). Cheers Christian Martijn van Steenbergen wrote:
Brandon S. Allbery KF8NH wrote:
My fix would be to have myPrefixOf require the prefix be terminated in whatever way is appropriate (end of input, white space, operator?) instead of simply accepting as soon as it gets a prefix match regardless of what follows.
Maybe you can use notFollowedBy for this.
HTH,
Martijn.