diff --git a/tconfpy.py b/tconfpy.py index 6063bc0..e94d9ba 100755 --- a/tconfpy.py +++ b/tconfpy.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "tconfpy" -RCSID = "$Id: tconfpy.py,v 1.160 2004/04/02 09:21:19 tundra Exp $" +RCSID = "$Id: tconfpy.py,v 1.161 2004/04/06 19:50:17 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -300,7 +300,7 @@ Messages["eTYPEBAD"] = FILENUM + "Type Mismatch. '%s' Must Be Assigned Values Of Type %s Only" Messages["eVALLARGE"] = FILENUM + "%s Is Larger Than The Maximum Allowed, %s, For Variable '%s'" Messages["eVALSMALL"] = FILENUM + "%s Is Smaller Than The Minimum Allowed, %s, For Variable '%s'" -Messages["eVARDOLLAR"] = FILENUM + "Variable Name Cannot Begin With The '%s' Symbol" % DOLLAR +Messages["eVARRESERVED"] = FILENUM + "Variable Name Cannot Begin With The '%s' Symbol" Messages["eVARNAMESPC"] = FILENUM + "Variable Names May Not Contain Whitespace" Messages["eVARNONAME"] = FILENUM + "Variable Name Evaluates To Null String. Not Permitted" Messages["eVARREADONLY"] = FILENUM + "Variable '%s' Is Read-Only. Cannot Change Its Value" @@ -726,7 +726,7 @@ ErrorMsg("eELSENOIF", (cfgfile, linenum)) CondStack.append(["", False]) # Error makes all that follows False - # We *are* in an IF block and ELSE is appropriate. + # We *are* in an IF block an ELSE is appropriate. # To determine whether the ELSE should be taken or not we have # to look at the state of that IF block AND the state of # the block that contains the IF. This is because the IF @@ -1020,10 +1020,12 @@ if not l: ErrorMsg("eVARNONAME", (cfgfile, linenum)) - # Suppress attempts to set variables named with leading DOLLAR + # Suppress attempts to set variables named starting + # with certain reserved symbols because dereferencing + # such variable names is impossible - elif l[0] == DOLLAR: - ErrorMsg("eVARDOLLAR", (cfgfile, linenum)) + elif l[0] in (COMMENT, ENVIRO): + ErrorMsg("eVARRESERVED", (cfgfile, linenum, l[0])) # Suppress any attempt to change a RO variable