Talk:Multisplit: Difference between revisions

clarification needed in task and mandatory output
(clarification needed in task and mandatory output)
Line 33:
 
Vincent> Program does exactly what you describe, except your mistake: spearators doesn't reused once they are finished, so for “a!===b=!=c” ("!=", "==", "=") it produces “a <!=> <==> b <=> !=c” - note that '!=' separator doesn't used AGAIN.
 
===Clarification in order===
While the text says "the order of the separators is significant; where there would otherwise be an ambiguity as to which separator to use at a particular point (e.g., because one separator is a prefix of another) the first separator in the collection should be used." your interpretation doesn't follow. If you have x!==y and the separators !==, !=, and = the ambiguity referred to could equally be do you parse out x !== y or x != = y. Because of the order !== precedes != the first is correct. The example I gave above slid the rules I described over the characters left to right. And as for not reusing a separator, nowhere does it say that. Basically, either interpretation could be correct at this point as the task isn't specific enough.
 
Most of the examples don't even clearly show output, so it's difficult to tell which are matched (The reader should not have to figure it out from listings of indices). It should be a requirement to show the output so you can see how it's being parsed out. As it stands it's difficult to tell if some of the solutions are correct under either interpretation.
--[[User:Dgamey|Dgamey]] 23:11, 21 April 2011 (UTC)
 
==Small inaccuracy in the smaller non-RE Python version?==
Anonymous user