Overview
| Artifact ID: | 6a200487e264cfcd55d5b96b819c196cdbad4dc4 |
|---|---|
| Ticket: | 217891ffffffffffffffffffffffffffffffffff
tcl parser has problems with braces in strings |
| User & Date: | nobody on 2000-10-26 00:45:30 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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. - foundin changed to: "final: 8.0.5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "tcl parser has problems with braces in strings"
- type changed to: "Bug"