Skip to content
Tcl Source Code History Of Ticket 219275ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 219275ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 219275ffffffffffffffffffffffffffffffffff

  1. Ticket change [993159f8e3] (rid 110743) by nobody on 2000-10-26 05:09:44:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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...
      
      
      
      
      
    5. foundin initialized to: "final: 8.0.5"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Deleted"
    9. submitter initialized to: "nobody"
    10. subsystem initialized to: "69. Other"
    11. title initialized to:
      Compiler support for custom preprocessors written in Tcl
      
    12. type initialized to: "RFE"
  2. Ticket change [7a361e5b3c] (rid 90271) by hobbs on 2000-12-10 10:09:07:

    1. foundin changed to: "obsolete: 8.4a3"
  3. Ticket change [882a2b98fc] (rid 131826) by dkf on 2001-01-31 17:58:13:

    1. 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].
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. subsystem changed to: "45. Parsing and Eval"
    5. username: "dkf"
  4. Ticket change [c792d98e13] (rid 121950) by dgp on 2001-04-04 04:43:27:

    1. subsystem changed to: "10. Objects"
  5. Ticket change [e4898ea1f2] (rid 87969) by dkf on 2001-06-26 05:35:42:

    1. priority changed to: "1 Zero"
  6. Ticket change [b2b78e7092] (rid 98391) by dgp on 2003-11-13 06:07:33:

    1. assignee changed to: "dkf"