
commands that don't expand their arguments
Here's my problem.
I'm writing a piece of software with a command-driven syntax. A typical
command might be
node_cap $1I17\$1I18\ABC[7] 9.6E-12
(the backslashes are really part of the argument - they're not being used
to escape anything).
Now, I'd like to use tcl as the main interpreter, for obvious flexibility
and not-reinventing-the-round-rolling-thing reasons.
However, if I passed that command to Tcl_Eval, the first argument would
be mangled by the interpreter, due to the backslashes, brackets, and
$'s. The users will be chasing me out of town with pitchforks and
torches if I tell them to put braces around the first argument.
In lisp, you can specify that a function doesn't evaluate one or more of
its parameters (for example, setq is just a version of set that doesn't
evaluate ["quotes"] its first argument). Does anyone have any suggestions
for doing the same or similar in tcl?
Hacking on the main input loop in my C program is acceptable. Hacking
on Tcl_Eval (in the library) is not. I'd like "source" to work with the
new command type, but I could live without it.
Send mail if possible, I will summarize responses.
-Matt
P.S. I'm not using tk now, but I may want to integrate it in the future.