Skip to content
Tcl Source Code Artifact [dc8f9cd4db]
Login

Artifact [dc8f9cd4db]

Artifact dc8f9cd4dbcfd0f379686b9c06f97626d3c8fb22:

Ticket change [dc8f9cd4db] - New ticket [1201589fffffffff|1201589fff] <i>bareword madness in expr parser</i>. by dgp on 2005-05-13 18:31:45.
D 2005-05-13T18:31:45
J assignee dgp
J cmimetype text/plain
J comment dgp%\sif\s{yes}\s{puts\sfoo}\nfoo\n%\sif\s{!no}\s{puts\sfoo}\nfoo\n%\sif\s{y}\s{puts\sfoo}\nfoo\n%\sif\s{!n}\s{puts\sfoo}\nsyntax\serror\sin\sexpression\s"!n":\sthe\sword\s"n"\nrequires\sa\spreceding\s$\sif\sit's\sa\svariable\sor\sfunction\narguments\sif\sit's\sa\sfunction\n\nkbkdgp\s-\sYou\shave\sthe\sappropriate\slogic\sin\sthe\s'n'\ncase\sin\stclParseExpr.c(GetLexeme)?\n\nkbkHmmm,\sok,\sI\ssee\sthat\syou\sdid\sit\sfarther\sdown,\sin\nthe\s'default'\sbranch,\sbut\slook\sfor\sthose\sliterals\nexactly,\snot\swith\sunique-prefix\smatching.\n\n[14:22]kbkHmm.\sI\sdon't\sreally\slike\sunique-prefix\nmatching\sin\sthis\scontext.\n[14:23]kbkbut\sif\swe\sdo\sit,\swe\sshould\sdo\sit\sonly\sif\nall\selse\sfails.\n[14:23]dgpwell,\sthe\sparser\sdoesn't\s(can't?)\scheck\sthe\nvalidity\sof\sfunction\snames.\n[14:23]kbkwhich\sis\sto\ssay,\s*don't*\sdo\sit\sif\sthe\nbareword\sis\sfollowed\sby\soptional\swhitespace\sand\sa\sleft\nparen.\n[14:24]kbkbecause\sfalse()\sisn't\sa\svalid\sexpr.\n[14:24]dgphmmm....\sparens...\n[14:24]kbkunless\sthere's\sa\sfunction\sso\snamed.\n[14:25]kbkeq,\sne,\sin,\sni,\swould\sneed\sfurther\shandling\nsomehow,\sthough,\sbecase\s$a\seq("stuff")\sis\svalid,\sand\sis\nnot\sa\sfunction\scall.\n[14:27]kbkand\s*that*\sinterpretation\sdepends\son\s\sleft\ncontext;\sthe\seq,\sne,\sin,\sni\soperators\sare\soperators\nonly\sif\sthey\sfollow\sa\sconstant,\sa\svariable,\sor\sa\sright\nparen.\n[14:27]kbkUgh.\n[14:27]kbkI'm\sstarting\sto\sthink\sthat\sexpr\shas\noutgrown\sa\srecursive-descent\sparser.\n
J foundin obsolete:\s8.5a3
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 45.\sParsing\sand\sEval
J title bareword\smadness\sin\sexpr\sparser
J type Bug
K 1201589fffffffffffffffffffffffffffffffff
U dgp
Z 9815816943475acd5ad49e061b66ebc9