Skip to content
Tcl Source Code View Ticket
Login

View Ticket

A command to dissect strings the same way `eval' does

Closed / Fixed218613ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:03:06
OriginalBugID: 1452 RFE
Version: 8.0p2
SubmitDate: '1999-03-04'
LastModified: '1999-12-03'
Severity: LOW
Status: Released
Submitter: pat
ChangedBy: hobbs
OS: Linux
OSVersion: Evolved slackware
Machine: Other
FixedDate: '1999-12-03'
FixedInVersion: 8.2
ClosedDate: '2000-10-25'


Name:
Harald

DesiredBehavior:
As an example, take a look at

  eval {puts hallo; puts tschuess}

Obviously `eval' takes its argument apart at nonstandard places,
in particular at (non-escaped) semicolons and newlines. It is
rather tedious to write a pure-tcl proc which does the same
dissection. Examples were posted and may be found in dejanews
with keyword `commandsplit'.

It would be great to have such a command in the Tcl-core because
it would allow a lot of interesting applications which enhance
``simpler'' syntax exposed to users before commands are really
executed.

I assume the Tcl-core would be the best place for such a command
because eval does already all the work. If only I could tell it
to return the commands it finds instead of executing them.





The 8.1 core adding a new parser that is available in the C API.
Moving this to the Tcl level is not in the forseeable future. 
-- 12/03/1999 hobbs
welch Closed ticket [218613ffff]. [History diff]2000-10-26 08:25:10
dgp Open ticket [218613ffff]. [History diff]2001-04-16 20:28:51
dgp Closed ticket [218613ffff]. [History diff]2001-04-16 20:29:46
Log in (anonymous is fine) to add a comment.