On Thu, Aug 13, 2009 at 6:35 PM, Trent W. Buck <t...@cybersource.com.au>wrote:
> Eric Kow <ko...@darcs.net> writes: > > > Just forwarding a comment from Gwern on the bugtracker: > > - http://bugs.darcs.net/issue1373 > > - http://bugs.darcs.net/msg7364 > > > > | On a side note, does anyone know why this fails? I've read the manual > but it > > | doesn't help much: > > | > > | [10:31 AM] 1.2Mb$ darcs replace > > | "https://secure.wikimedia.org/wikipedia/en/wiki/" "Wikipedia" > Threats.page > > | darcs failed: 'https://secure.wikimedia.org/wikipedia/en/wiki/' is > not a valid > > | token! > > > > It'd be good to work out what's going on. I'm sure it's fairly > straightforward, > > perhaps room for documentation tweaks? > > Neither of the two (sigh) default tokenizers allow / within a token. > I really do think that the "darcs replace" in its current form is too > dangerous to use, because absolutely nothing has the exact lexical > structure assumed by it. Well... I suppose /etc/passwd would be lexable > by darcs replace, but certainly not C or a CSV file, for example. I seem to recall a conversation with David once where he mentioned haskell's identifier syntax as being an inspiration for the token parser. I think the error message should try to suggest why the token is not valid. If it could, for example, identify at least one character to tell the user about, that would help. The the user could try different things until they get it right. It could also tell the user the full set of allowed things. Jason
_______________________________________________ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users