Artifacts Associated With Ticket 219275ffffffffff
Ticket change [993159f8e3] (rid 110743) by nobody on 2000-10-26 05:09:44:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1709 RFE Version: 8.0.5 SubmitDate: '1999-04-05' LastModified: '1999-04-05' Severity: LOW Status: UnAssn Submitter: pat ChangedBy: pat OS: All OSVersion: NA Machine: NA FixedDate: '2000-10-25' FixedInVersion: NA ClosedDate: '2000-10-25' Name: Alexandre FERRIEUX email: [email protected] Support: None Synopsis: Compiler support for custom preprocessors written in Tcl DesiredBehavior: A modification of the bytecode-compiler that would allow people to add their own preprocessing step, even written in Tcl. Obvious application: bang-comments. Proponents of the approach could test it out for themselves. Explanation: the idea would be to give a '<<'-like capability to Tcl commands (now it is restricted to child processes), so that we could hand *any* kind of text garbage in-line to an arbitrary Tcl command: inlinedata -until EOFEOFEOF myproc hey boys this is unrestricted {{{{{{{ text]]]]]]] ! EOFEOFEOF The example above would call myproc with the text as a single string argument. The key is that 'inlinedata' has to be known by the compiler, so that it takes the new delimiter syntax into account immediately. Of course, this can only happen if the stream is being compiled as code at this point, so it's necessarily at toplevel of a script file or of an evalled (uplevelled) string; however it is very flexible since it allows any kind of preprocessing to be written and tested in pure Tcl ! For example, the bang comment: proc nobangs s { regsub -all "\n\[ \t\]*!\[^\n\]*" \n$s "" s uplevel $s } inlinedata nobangs ;# without -until, goes to end of current script ! Ha, this one works: }}} ! Just as a #. No big deal proc butthisone {} { ! is more }}}}} ! impressive indeed ]]]] puts yes } Notice also that the natural restriction of the scope allows to avoid many backward compatibility problems (especially ominous in the bang case), since the preprocessing can be done on a per-script or even per-procedure basis. Comments: This idea has already been posted in the kilometer-long braces-in-comment thread, but Jeff Hobbs pointed out that it was off-topic there and could easily be overlooked...
- foundin initialized to: "final: 8.0.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Deleted"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Compiler support for custom preprocessors written in Tcl
- type initialized to: "RFE"
Ticket change [7a361e5b3c] (rid 90271) by hobbs on 2000-12-10 10:09:07:
- foundin changed to: "obsolete: 8.4a3"
Ticket change [882a2b98fc] (rid 131826) by dkf on 2001-01-31 17:58:13:
- icomment:
This can now be done in pure Tcl by writing a procedure that updates the name of the loaded file, [read]s in the script to process, performs the processing, and then passes it to [eval] or [uplevel #0].
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "45. Parsing and Eval"
- username: "dkf"
- icomment:
Ticket change [c792d98e13] (rid 121950) by dgp on 2001-04-04 04:43:27:
- subsystem changed to: "10. Objects"
Ticket change [e4898ea1f2] (rid 87969) by dkf on 2001-06-26 05:35:42:
- priority changed to: "1 Zero"
Ticket change [b2b78e7092] (rid 98391) by dgp on 2003-11-13 06:07:33:
- assignee changed to: "dkf"