Artifacts Associated With Ticket 218980
Ticket change [5f68913ec9] (rid 115819) by nobody on 2000-10-26 01:08:54:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 3434 RFE Version: 8.2.1 SubmitDate: '1999-11-05' LastModified: '1999-12-03' Severity: MED Status: Released Submitter: techsupp ChangedBy: hobbs OS: HP-UX OSVersion: 10.20 FixedDate: '1999-12-03' FixedInVersion: 8.3b1 ClosedDate: '2000-10-25' Name: Bob Techentin Comments: Perhaps a little different wording in the message? DesiredBehavior: Per http://www.deja.com/getdoc.xp?AN=544049227 Here is a patch to tclParse.c which will issue a little more detailed message if it detects a missing close brace in a block which might contains a comment character preceeding an open-brace. Patch: *** ../generic/tclParse.c Wed Nov 3 15:06:36 1999 --- ../generic/tclParse.c.orig Wed Nov 3 14:07:47 1999 *************** *** 1895,1901 **** Tcl_Token *tokenPtr; register char *src, *end; int startIndex, level, length; - int openBrace; if ((numBytes >= 0) || (string == NULL)) { end = string + numBytes; --- 1895,1900 ---- *************** *** 1976,2010 **** } else if (src == end) { if (interp != NULL) { Tcl_SetResult(interp, "missing close-brace", TCL_STATIC); - - /* - * Search the source string for a possible open - * brace within the context of a comment. Since we - * aren't performing a full Tcl parse, just look for - * an open brace preceeded by a '<whitspace>#' on - * the same line. - */ - openBrace = 0; - while ( src > string ) { - switch (*src) { - case '{': - openBrace = 1; - break; - case '\n': - openBrace = 0; - break; - case '#': - if ((openBrace == 1) && (isspace(*(--src)))) { - Tcl_SetResult(interp, "missing close-brace:\nYou probably screwed up by putting an open brace in a comment.\nBraces must be balanced, EVEN IN COMMENTS!\nDo NOT, under any circumstances, post a question about it on comp.lang.tcl", TCL_STATIC); - openBrace = -1; - break; - } - } - if (openBrace == -1) { - break; - } - src--; - } } parsePtr->errorType = TCL_PARSE_MISSING_BRACE; parsePtr->term = string; --- 1975,1980 ---- PatchFiles: generic/tclParse.c improved error messages in 8.3b1. -- 12/03/1999 hobbs - foundin initialized to: "obsolete: 8.2.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "Improve error message for missing close brace"
- type initialized to: "RFE"
Ticket change [2493fe542a] (rid 131130) by welch on 2000-10-26 08:33:07:
- closedate changed to: "2000-10-26T01:33:07"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [1c091a6dd9] (rid 90536) by dgp on 2001-04-19 04:20:26:
- foundin changed to: "None"
- status changed to: "Open"
- subsystem changed to: "None"
Ticket change [eb8fb21fa3] (rid 103561) by dgp on 2001-04-19 04:21:00:
- closedate changed to: "2001-04-18T21:21:00"
- closer changed to: "dgp"
- status changed to: "Deleted"
- subsystem changed to: "45. Parsing and Eval"