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

History Of Ticket 217891ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 217891ffffffffffffffffffffffffffffffffff

  1. Ticket change [6a200487e2] (rid 128090) by nobody on 2000-10-26 00:45:30:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2441 Bug
      Version: 8.0.5
      SubmitDate: '1999-07-23'
      LastModified: '1999-08-04'
      Severity: CRIT
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      RelatedBugIDs: 2474
      OS: IRIX
      OSVersion: also, NT 4.0sp4
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '1999-08-04'
      
      
      Name:
      
      David Laur
      
      
      
      CustomShell:
      
      using ONLY Scriptics supplied,
      
      
      
      Comments:
      
      Obviously for the simple example above I can easily escape the braces,
      
          this is phenomenally untrue of the real app.
      
          
      
          Thanks!
      
          David
      
      
      
      ReproducibleScript:
      
      As far as I know, this is a long-standing problem with the Tcl parser,
      
          so long in fact that I wonder if this is maybe a user-error on my part?
      
          
      
          There appear to be several "parsing scenarios" in effect when using
      
          Tcl,
      
          and their behavior regarding this problem is subtly different, although
      
          related.  Also, behavior on Windows is slightly different than Unix.
      
          
      
          Basically, string containing curly braces are not always parsed
      
          correctly.
      
          
      
          I'm being hit very hard by this problem right now since I'm trying to
      
          use
      
          Tcl to generate code (Tcl and C source code) which contains braces.
      
          
      
          Consider the following five lines:
      
          
      
          --------- begin snippet -------
      
          puts "}"
      
          proc x {} {
      
             puts "}"
      
          }
      
          x
      
          ----------- end snippet -------
      
          
      
          I expect that this code will print:
      
          }
      
          }
      
          in all circumstances.
      
      
      
      ObservedBehavior:
      
      Scenario One - entering the commands via the tcl stdin prompt:
      
          
      
          <dml> protclsh80
      
          % puts "}"
      
          }
      
          % proc x {} {
      
             puts "}"
      
          extra characters after close-brace
      
          %
      
          
      
          
      
          Scenario Two -  sourcing a file containing those five lines:
      
          
      
          <dml> protclsh80
      
          % source test.tcl
      
          extra characters after close-brace
      
          % set errorInfo
      
          extra characters after close-brace
      
              while compiling
      
          "proc x {} { ..."
      
              (file "test.tcl" line 2)
      
              invoked from within
      
          "source test.tcl"
      
          %
      
          
      
          
      
          Scenario Three - the test file specified as tclsh startup script
      
          
      
          <dml> protclsh80 test.tcl
      
          extra characters after close-brace
      
              while compiling
      
          "proc x {} { ..."
      
              (file "test.tcl" line 2)
      
          
      
          
      
          On Windows (NT) I get similar, but not identical errors.
      
      
      
      DesiredBehavior:
      
      I would expect the parser to recognize when it has entered a quoted
      
          string and when it hasn't.
      
      
      
      
      
      
      
    4. foundin initialized to: "final: 8.0.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "tcl parser has problems with braces in strings"
    11. type initialized to: "Bug"
  2. Ticket change [2a549ec836] (rid 118540) by welch on 2000-10-26 08:09:11:

    1. closedate changed to: "2000-10-26T01:09:11"
    2. closer changed to: "welch"
    3. priority changed to: "3 Low"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [61dbb9e0f7] (rid 92320) by dgp on 2001-04-14 02:00:53:

    1. closedate changed to: "2001-04-13T19:00:53"
    2. closer changed to: "dgp"
    3. subsystem changed to: "45. Parsing and Eval"