.
D 2008-11-09T21:14:04
J assignee msofer
J cmimetype text/plain
J comment The\ssyntax\s{*}\suses\swhen\sreparsing\sa\sliterate\sconstant\sappears\sto\sdeviate\sfrom\sthe\susual\slist\ssyntax\sin\sthat\sit\sdoes\snot\sperform\sbackslash\ssubstitution.\n\nShort\sexample:\n%\sset\sL1\s[list\s\\{]\s;\s#\sList\sintrep\n\\{\n%\sset\sL2\s{\\{}\s;\s#\sNo\sintrep\n\\{\n%\sset\sL3\s[list\s{*}$L1\s{*}$L2\s{*}{\\{}\s{*}"\\\\\\{"]\n\\{\s\\{\s{\\{}\s\\{\n\nIn\sall\sof\sthese\scases,\sthe\sstring\sbeing\sreparsed\sby\s{*}\shas\sa\sbackslash\sas\sfirst\scharacter\sand\sa\sleft\sbrace\sas\ssecond\scharacter\s(i.e.,\sthe\scanonical\sstring\srepresentation\sfor\sthe\slength\s1\slist\swhose\sonly\selement\sis\sthe\sleft\sbrace),\sbut\swhen\sthat\sstring\sis\sbrace-delimited\sthen\ssomething\sgoes\shorribly\swrong;\sit\sappears\sthe\s{*}\slist\sparser\sthinks\sthe\sbackslash\sis\sjust\san\sordinary\scharacter:\n\n%\sset\sL4\s{{a\sb}\s{\\\\}\s\\\\\s"c\s\\n\sd"}\n{a\sb}\s{\\\\}\s\\\\\s"c\s\\n\sd"\n%\slist\s{*}$L4\s{*}{{a\sb}\s{\\\\}\s\\\\\s"c\s\\n\sd"}\n{a\sb}\s{\\\\}\s\\\\\s{c\s\n\sd}\s{a\sb}\s{\\\\}\s{\\\\}\s{c\s\\n\sd}\n\nThis\smay\shave\sbeen\ssupported\sby\sthe\sfollowing\slanguage\sin\sthe\sdodekalogue:\n[5]\sArgument\sexpansion.\sIf\sa\sword\sstarts\swith\sthe\sstring\s{*}\sfollowed\sby\sa\snon-whitespace\scharacter,\sthen\sthe\sleading\s{*}\sis\sremoved\sand\sthe\srest\sof\sthe\sword\sis\sparsed\sand\ssubstituted\sas\sany\sother\sword.\sAfter\ssubstitution,\sthe\sword\sis\sparsed\sagain\swithout\ssubstitutions,\sand\sits\swords\sare\sadded\sto\sthe\scommand\sbeing\ssubstituted.\n\nThat\sis\snot\sconsistent\swith\sTIP#157\showever,\ssince\sthis\sclearly\sspecifies\sthe\s{*}-reparsing\sas\s"After\ssubstitution,\sthe\sword\sis\sthen\sparsed\sas\sa\s_list_\s(as\sif\swith\sTcl_SplitList()\sor\sTcl_GetListFromObj)".\sBackslash\ssubstitution\sis\sa\snecessary\spart\sof\slist\ssyntax,\ssince\sthe\sstring\srepresentation\sfor\slist\selements\swhich\sare\snot\sbalanced\swith\srespect\sto\sbraces\srequires\sbackslash\ssubstitution.\s\n\nI\salso\snote\sthat\sthere\sdoesn't\sseem\sto\sbe\sany\stests\sfor\s{*}\swhich\sinvolves\sapplying\sit\sto\slists\swith\sa\sstring\sreperesentation\sthat\scontains\sbackslashes.\n\n
J foundin obsolete:\s8.6a3
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter lars_h
J subsystem 45.\sParsing\sand\sEval
J title Expand\s({*}),\sconstants,\sand\slist\ssyntax
J type Bug
K 2251175fffffffffffffffffffffffffffffffff
U lars_h
Z b543ec7d88e9f05d32a6edc7872d7bba