Anonymous user
Talk:Brace expansion: Difference between revisions
m
fix typos
m (fix typos) |
|||
Line 12:
:::: Another thing, what's supposed to happen when the string ends with an extra "\"? --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 03:29, 26 January 2014 (UTC)
:::::I've attempted to clarify what to do in the case of ambiguity; in general, the closest brace that makes sense in context is used. I suppose a backslash at the end of the string should just be taken as a literal. --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 04:00, 26 January 2014 (UTC)
::::: Yeah, I thought the "closest brace" disambiguation was implied by ''"} closes the last opened alternation group "'' and all the talk about "balanced" brace pairs, but
::::: Regarding backslash at the end of the string, I semi-purposefully left that case unspecced, because such inputs may well be impossible in real-life scenarios, and I didn't want to force implementors to complicate their solutions because of it. But I did implement it as "interpret literally and pass along to output" in the Perl solution, just in case. If you think it makes sense as a hard requirement, I'm OK with having it in the spec. Although I would also be fine with something like "''You may assume that input strings will not end with an unescaped backslash''" in the spec. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 10:16, 26 January 2014 (UTC)
::::
:: Hm yeah, I guess requiring solutions to demonstrate the four test cases (with a listing of the actual output), instead of some "toy output", might make sense after all (even if it will make the page very long once there are many implementations). Btw, that Perl 6 solution looks pretty sweet... :) --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 10:16, 26 January 2014 (UTC)
::: I updated both the task description and the Perl solution accordingly now. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 10:57, 26 January 2014 (UTC)
|